[latex3-commits] [git/LaTeX3-latex3-l3build] master: Extend runtest_task() to pass run number (9b77be3)
Joseph Wright
joseph.wright at morningstar2.co.uk
Fri Nov 1 18:52:32 CET 2019
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/9b77be3a6a66d23f659968d3f6a6a8b481f914f2
>---------------------------------------------------------------
commit 9b77be3a6a66d23f659968d3f6a6a8b481f914f2
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Fri Nov 1 17:52:32 2019 +0000
Extend runtest_task() to pass run number
https://chat.stackexchange.com/transcript/message/52398498#52398498
>---------------------------------------------------------------
9b77be3a6a66d23f659968d3f6a6a8b481f914f2
CHANGELOG.md | 1 +
l3build-check.lua | 4 ++--
l3build.dtx | 13 +++++++++----
3 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 77a484e..7446199 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@ this project uses date-based 'snapshot' version identifiers.
- Avoid normalisation of (u)pTeX data when this is standard engine
(fixes #103)
- Normalise Lua data references (#107)
+- Extend `runtest_task()` to include run number
## [2019-10-02]
diff --git a/l3build-check.lua b/l3build-check.lua
index fdb1e18..ea55032 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -754,7 +754,7 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
.. setup(lvtfile)
.. (hide and (" > " .. os_null) or "")
.. os_concat ..
- runtest_tasks(jobname(lvtfile))
+ runtest_tasks(jobname(lvtfile),i)
)
-- Break the loop if the result is stable
if breakout and i < checkruns then
@@ -801,7 +801,7 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
end
-- A hook to allow additional tasks to run for the tests
-runtest_tasks = runtest_tasks or function(name)
+runtest_tasks = runtest_tasks or function(name,run)
return ""
end
diff --git a/l3build.dtx b/l3build.dtx
index 8cc7534..98f29a2 100644
--- a/l3build.dtx
+++ b/l3build.dtx
@@ -1108,9 +1108,10 @@
% or more engines, but will not carry out any additional processing. For
% some tests, for example bibliography generation, it may be desirable to
% call one or more tools in addition to the engine. This can be arranged
-% by defining |runtest_tasks|, a function taking one argument, the name
+% by defining |runtest_tasks|, a function taking two arguments, the name
% of the current test (this is equivalent to \TeX{}'s \cs{jobname},
-% \emph{i.e.}~it lacks an extension). The function |runtest_tasks|
+% \emph{i.e.}~it lacks an extension) and the current run number.
+% The function |runtest_tasks|
% is is into a call to the system to run the engine. As such, it
% should take return a string with the appropriate command(s)
% and option(s). If more than one task is required, these should be separated
@@ -1119,8 +1120,12 @@
% suitable for calling Biber is shown in Listing~\ref{fig:test-tasks}.
% \begin{figure}
% \begin{lstlisting}[frame=single,language={[5.2]Lua},gobble = 6]
-% function runtest_tasks(name)
-% return "biber " .. name
+% function runtest_tasks(name,run)
+% if run == 1 then
+% return "biber " .. name
+% else
+% return 0
+% end
% end
% \end{lstlisting}
% \caption{Example \texttt{runtest_tasks} function.}
More information about the latex3-commits
mailing list