From b0d484d66da70017e2f7617211629a579a3b6056 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 25 Mar 2018 21:28:04 +0000 Subject: l3build (24mar18) git-svn-id: svn://tug.org/texlive/trunk@47114 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/l3build/README.md | 2 +- Master/texmf-dist/doc/latex/l3build/l3build.pdf | Bin 668931 -> 669920 bytes Master/texmf-dist/doc/man/man1/l3build.1 | 2 +- Master/texmf-dist/doc/man/man1/l3build.man1.pdf | Bin 15131 -> 15195 bytes .../texmf-dist/scripts/l3build/l3build-check.lua | 54 +++++++++++++++------ .../scripts/l3build/l3build-variables.lua | 2 +- Master/texmf-dist/scripts/l3build/l3build.lua | 2 +- Master/texmf-dist/source/latex/l3build/l3build.dtx | 6 +-- 8 files changed, 45 insertions(+), 23 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md index b8047ac51ef..db5cc9be3ba 100644 --- a/Master/texmf-dist/doc/latex/l3build/README.md +++ b/Master/texmf-dist/doc/latex/l3build/README.md @@ -1,7 +1,7 @@ l3build: a testing and building system for LaTeX3 ================================================= -Release 2018-03-10 +Release 2018-03-24 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf index 2427fa2ff34..6229b12c90b 100644 Binary files a/Master/texmf-dist/doc/latex/l3build/l3build.pdf and b/Master/texmf-dist/doc/latex/l3build/l3build.pdf differ diff --git a/Master/texmf-dist/doc/man/man1/l3build.1 b/Master/texmf-dist/doc/man/man1/l3build.1 index 806f21cc632..2fe7d469f47 100644 --- a/Master/texmf-dist/doc/man/man1/l3build.1 +++ b/Master/texmf-dist/doc/man/man1/l3build.1 @@ -1,4 +1,4 @@ -.TH l3build 1 "2018-03-10" +.TH l3build 1 "2018-03-24" .SH NAME l3build \- Checking and building packages .SH SYNOPSIS diff --git a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf index 1633ccd4594..3127cc78a6f 100644 Binary files a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf and b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf differ 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") diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx index a87e0724efc..76a943f6265 100644 --- a/Master/texmf-dist/source/latex/l3build/l3build.dtx +++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx @@ -89,7 +89,7 @@ \luavarset{makeindexfiles} {\{"*.ist"\}}{MakeIndex files to be included in a TDS-style zip} \luavarset{scriptfiles} {\{ \}}{Files to install to the \texttt{scripts} area of the \texttt{texmf} tree} \luavarset{scriptmanfiles} {\{ \}}{Files to install to the \texttt{doc/man} area of the \texttt{texmf} tree} -\luavarset{sourcefiles} {\{"*.dtx", "*.ins"\}}{Files to copy for unpacking} +\luavarset{sourcefiles} {\{"*.dtx", "*.ins", "*-????-??-??.sty"\}}{Files to copy for unpacking} \luavarset{tagfiles} {\{"*.dtx"\}}{Files for automatic tagging} \luavarset{textfiles} {\{"*.md", "*.txt"\}}{Plain text files to send to CTAN as-is} \luavarset{typesetdemofiles} {\{\}}{Files to typeset before the documentation for inclusion in main documentation files} @@ -216,7 +216,7 @@ % }^^A % } % -% \date{Released 2018-03-10} +% \date{Released 2018-03-24} % % \maketitle % \tableofcontents @@ -364,7 +364,7 @@ % By default, each test is executed with all three, being compared against the \texttt{.tlg} file produced from the \var{pdftex} engine (these defaults are controlled by the |checkengines| and |stdengine| variable respectively). % The format used for tests can be altered by setting \var{checkformat}: the default setting \texttt{latex} means that tests are run using \emph{e.g.}~\texttt{pdflatex}, whereas setting to \texttt{plain} will run tests using \emph{e.g.}~\texttt{pdftex}. % (Currently, this should be one of \texttt{latex} or \texttt{plain}.) -% To perform the check, the engine typesets each test \var{checkruns} times. +% To perform the check, the engine typesets each test up to \var{checkruns} times. % More detail on this in the documentation on |save|. % Options passed to the binary are defined in the variable \var{checkopts}. % -- cgit v1.2.3