diff options
author | Karl Berry <karl@freefriends.org> | 2018-03-25 21:28:04 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-03-25 21:28:04 +0000 |
commit | b0d484d66da70017e2f7617211629a579a3b6056 (patch) | |
tree | 75a7afb10823d86efcfdaa64db03ef210620c1bf /Master/texmf-dist/scripts | |
parent | 64a86b6f5f34949239097b2846e6f1867b95e651 (diff) |
l3build (24mar18)
git-svn-id: svn://tug.org/texlive/trunk@47114 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts')
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-check.lua | 54 | ||||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-variables.lua | 2 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/l3build/l3build.lua | 2 |
3 files changed, 40 insertions, 18 deletions
diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua index 2239fe97a76..f378893b14a 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-check.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua @@ -46,6 +46,7 @@ local utf8_char = unicode.utf8.char local exit = os.exit local execute = os.execute +local remove = os.remove -- -- Auxiliary functions which are used by more than one main function @@ -495,7 +496,7 @@ function runcheck(name, hide) engine = "luatex" end checkpdf = setup_check(name, engine) - runtest(name, i, hide, lvtext, checkpdf) + runtest(name, i, hide, lvtext, checkpdf, true) -- Generation of results depends on test type local errlevel if checkpdf then @@ -535,7 +536,7 @@ function setup_check(name, engine) ) exit(1) end - runtest(name, engine, true, lveext, true) + runtest(name, engine, true, lveext, true, false) pdffile = testdir .. "/" .. testname .. pdfext -- If a PDF is generated use it for comparisons if not fileexists(pdffile) then @@ -583,19 +584,19 @@ function compare_pdf(name, engine) .. " " .. pdffile .. " > " .. cmpfile ) if errorlevel == 0 then - os.remove(cmpfile) + remove(cmpfile) end return errorlevel end -function compare_tlg(name, engine) +function compare_tlg(name, engine,cleanup) local errorlevel local testname = name .. "." .. engine local difffile = testdir .. "/" .. testname .. os_diffext local logfile = testdir .. "/" .. testname .. logext local tlgfile = locate({testdir}, {testname .. tlgext, name .. tlgext}) if not tlgfile then - return + return 1 end -- Do additional log formatting if the engine is LuaTeX, there is no -- LuaTeX-specific .tlg file and the default engine is not LuaTeX @@ -604,23 +605,32 @@ function compare_tlg(name, engine) and stdengine ~= "luatex" and stdengine ~= "luajittex" then - local luatlgfile = testdir .. "/" .. name .. ".luatex" .. tlgext + local lualogfile = logfile + if cleanup then + lualogfile = testdir .. "/" .. testname .. ".tmp" .. logext + end + local luatlgfile = testdir .. "/" .. testname .. tlgext formatlualog(tlgfile, luatlgfile, false) - formatlualog(logfile, logfile, true) - -- This allows code sharing below: we only need the .tlg name in one place - tlgfile = luatlgfile + formatlualog(logfile, lualogfile, true) + errorlevel = execute(os_diffexe .. " " + .. normalize_path(luatlgfile .. " " .. lualogfile .. " > " .. difffile)) + if cleanup then + remove(lualogfile) + remove(luatlgfile) + end + else + errorlevel = execute(os_diffexe .. " " + .. normalize_path(tlgfile .. " " .. logfile .. " > " .. difffile)) end - errorlevel = execute(os_diffexe .. " " - .. normalize_path(tlgfile .. " " .. logfile .. " > " .. difffile)) - if errorlevel == 0 then - os.remove(difffile) + if errorlevel == 0 or cleanup then + remove(difffile) end return errorlevel end -- Run one of the test files: doesn't check the result so suitable for -- both creating and verifying .tlg files -function runtest(name, engine, hide, ext, makepdf) +function runtest(name, engine, hide, ext, makepdf, breakout) local lvtfile = name .. (ext or lvtext) cp(lvtfile, fileexists(testfiledir .. "/" .. lvtfile) and testfiledir or unpackdir, testdir) @@ -653,8 +663,12 @@ function runtest(name, engine, hide, ext, makepdf) checkopts = checkopts .. " -no-pdf" end -- Special casing for ConTeXt + local function setup(file) + return " -jobname=" .. name .. " " .. ' "\\input ' .. file .. '" ' + end if match(checkformat, "^context$") then format = "" + function setup(file) return ' "' .. file .. '" ' end if engine == "luatex" or engine == "luajittex" then realengine = "context" elseif engine == "pdftex" then @@ -690,12 +704,20 @@ function runtest(name, engine, hide, ext, makepdf) -- Ensure lines are of a known length os_setenv .. " max_print_line=" .. maxprintline .. os_concat .. - realengine .. format .. " -jobname=" .. name .. " " - .. asciiopt .. " " .. checkopts .. " \"\\input " .. lvtfile .. "\" " + realengine .. format + .. " " .. asciiopt .. " " .. checkopts + .. setup(lvtfile) .. (hide and (" > " .. os_null) or "") .. os_concat .. runtest_tasks(jobname(lvtfile)) ) + -- Break the loop if the result is stable + if breakout and i < checkruns then + formatlog(logfile, newfile, engine, errlevels) + if compare_tlg(name,engine,true) == 0 then + break + end + end end if makepdf and fileexists(testdir .. "/" .. name .. dviext) then dvitopdf(name, testdir, engine, hide) diff --git a/Master/texmf-dist/scripts/l3build/l3build-variables.lua b/Master/texmf-dist/scripts/l3build/l3build-variables.lua index 5d4e3265c2a..4dbe06634cb 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-variables.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-variables.lua @@ -86,7 +86,7 @@ installfiles = installfiles or {"*.sty","*.cls"} makeindexfiles = makeindexfiles or {"*.ist"} scriptfiles = scriptfiles or { } scriptmanfiles = scriptmanfiles or { } -sourcefiles = sourcefiles or {"*.dtx", "*.ins"} +sourcefiles = sourcefiles or {"*.dtx", "*.ins", "*-????-??-??.sty"} tagfiles = tagfiles or {"*.dtx"} textfiles = textfiles or {"*.md", "*.txt"} typesetdemofiles = typesetdemofiles or { } diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua index c1151bbc7b6..6e493c05baa 100755 --- a/Master/texmf-dist/scripts/l3build/l3build.lua +++ b/Master/texmf-dist/scripts/l3build/l3build.lua @@ -25,7 +25,7 @@ for those people who are interested. --]] -- Version information -release_date = "2018-03-10" +release_date = "2018-03-24" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") |