Skip to content

Commit

Permalink
Simplfy handling of LuaTeX-like engines
Browse files Browse the repository at this point in the history
Rather than try to coerce them to be 'the same', simply
accept that each is different. Means that they will need
their own `.tlg` files, but probably that's OK.
  • Loading branch information
josephwright committed Feb 6, 2019
1 parent 22f1b07 commit be6ffec
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions l3build-check.lua
Expand Up @@ -552,17 +552,17 @@ function runcheck(name, hide)
end
local errorlevel = 0
for _,engine in pairs(checkengines) do
local binary = engine
local enginename = engine
-- Allow for luatex == luajittex for .tlg/.tpf purposes
if match(engine,"^lua") then
engine = "luatex"
end
setup_check(name,engine)
local errlevel = 0
if fileexists(testfiledir .. "/" .. name .. pvtext) then
errlevel = check_and_diff(pvtext,engine,binary,compare_pdf,true)
errlevel = check_and_diff(pvtext,engine,enginename,compare_pdf,true)
else
errlevel = check_and_diff(lvtext,engine,binary,compare_tlg)
errlevel = check_and_diff(lvtext,engine,enginename,compare_tlg)
end
if errlevel ~= 0 and options["halt-on-error"] then
return 1
Expand Down Expand Up @@ -610,9 +610,9 @@ function setup_check(name, engine)
end
end
function compare_pdf(name,engine,binary,cleanup)
function compare_pdf(name,engine,enginename,cleanup)
local testname = name .. "." .. engine
local difffile = testdir .. "/" .. name .. "." .. binary
local difffile = testdir .. "/" .. name .. "." .. enginename
.. pdfext .. os_diffext
local pdffile = testdir .. "/" .. testname .. pdfext
local tpffile = locate({testdir}, {testname .. tpfext, name .. tpfext})
Expand All @@ -627,10 +627,10 @@ function compare_pdf(name,engine,binary,cleanup)
return errorlevel
end
function compare_tlg(name,engine,binary,cleanup)
function compare_tlg(name,engine,enginename,cleanup)
local errorlevel
local testname = name .. "." .. engine
local difffile = testdir .. "/" .. name .. "." .. binary .. os_diffext
local difffile = testdir .. "/" .. name .. "." .. enginename .. os_diffext
local logfile = testdir .. "/" .. testname .. logext
local tlgfile = locate({testdir}, {testname .. tlgext, name .. tlgext})
if not tlgfile then
Expand Down Expand Up @@ -745,12 +745,12 @@ function runtest(name, engine, hide, ext, pdfmode, breakout)
if breakout and i < checkruns then
if pdfmode then
rewrite(pdffile,npffile,normalize_pdf)
if compare_pdf(name,engine,binary,true) == 0 then
if compare_pdf(name,engine,true) == 0 then
break
end
else
rewrite(logfile,newfile,normalize_log,engine,errlevels)
if compare_tlg(name,engine,binary,true) == 0 then
if compare_tlg(name,engine,true) == 0 then
break
end
end
Expand Down

0 comments on commit be6ffec

Please sign in to comment.