[latex3-commits] [git/LaTeX3-latex3-l3build] master: Allow for breaking check loop cycle (see #59) (c5a7514)
Joseph Wright
joseph.wright at morningstar2.co.uk
Wed Mar 21 11:07:07 CET 2018
Repository : https://github.com/latex3/l3build
On branch : master
Link : https://github.com/latex3/l3build/commit/c5a75142afb5d51cef604611217395ea147ae9dd
>---------------------------------------------------------------
commit c5a75142afb5d51cef604611217395ea147ae9dd
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date: Wed Mar 21 10:07:07 2018 +0000
Allow for breaking check loop cycle (see #59)
At present this just covers .tlg-based tests.
>---------------------------------------------------------------
c5a75142afb5d51cef604611217395ea147ae9dd
l3build-check.lua | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/l3build-check.lua b/l3build-check.lua
index fbecccd..b43e23f 100644
--- a/l3build-check.lua
+++ b/l3build-check.lua
@@ -28,6 +28,7 @@ local close = io.close
local write = io.write
local output = io.output
+local abs = math.abs
local rnd = math.random
local luatex_version = status.luatex_version
@@ -676,7 +677,7 @@ function runtest(name, engine, hide, ext, makepdf)
end
end
local errlevels = {}
- for i = 1, checkruns do
+ for i = 1, abs(checkruns) do
errlevels[i] = run(
testdir,
-- No use of localdir here as the files get copied to testdir:
@@ -696,6 +697,13 @@ function runtest(name, engine, hide, ext, makepdf)
.. os_concat ..
runtest_tasks(jobname(lvtfile))
)
+ -- Break the loop if the result is stable
+ if checkruns < 0 then
+ formatlog(logfile, newfile, engine, errlevels)
+ if compare_tlg(name,engine) == 0 then
+ break
+ end
+ end
end
if makepdf and fileexists(testdir .. "/" .. name .. dviext) then
dvitopdf(name, testdir, engine, hide)
More information about the latex3-commits
mailing list