diff options
author | Karl Berry <karl@freefriends.org> | 2023-12-12 21:08:32 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2023-12-12 21:08:32 +0000 |
commit | c3fcd795c13c097cc78140e88b0107b903ac36f4 (patch) | |
tree | 65d04c17fdfedbfa816148215aa9abf74e8fa455 | |
parent | 6daea46922cb0b14fc0ee24a5531fecff71c8f9f (diff) |
l3build (12dec23)
git-svn-id: svn://tug.org/texlive/trunk@69100 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/l3build/l3build.lua | 19 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/CHANGELOG.md | 14 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/README.md | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/l3build/l3build.pdf | bin | 746427 -> 747893 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/l3build.1 | 2 | ||||
-rw-r--r-- | Master/texmf-dist/doc/man/man1/l3build.man1.pdf | bin | 14823 -> 14822 bytes | |||
-rw-r--r-- | Master/texmf-dist/scripts/l3build/l3build-check.lua | 74 | ||||
-rwxr-xr-x | Master/texmf-dist/scripts/l3build/l3build.lua | 19 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/l3build/l3build.dtx | 43 |
9 files changed, 97 insertions, 76 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua b/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua index cf8f66cc1fb..4919d9377f3 100644 --- a/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua +++ b/Build/source/texk/texlive/linked_scripts/l3build/l3build.lua @@ -1,5 +1,3 @@ -#!/usr/bin/env texlua - --[[ File l3build.lua Copyright (C) 2014-2022 The LaTeX Project @@ -25,7 +23,7 @@ for those people who are interested. --]] -- Version information -release_date = "2023-11-01" +release_date = "2023-12-12" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") @@ -165,16 +163,7 @@ if #checkconfigs > 1 then end if next(failed) then for _,config in ipairs(failed) do - print("Failed tests for configuration \"" .. config .. "\":") - print("\n Check failed with difference files") - local testdir = testdir - if config ~= "build" then - testdir = testdir .. "-" .. config - end - for _,i in ipairs(ordered_filelist(testdir,"*" .. os_diffext)) do - print(" - " .. testdir .. "/" .. i) - end - print("") + checkdiff(config) end if options["show-saves"] then local savecmds, recheckcmds = "", "" @@ -200,8 +189,8 @@ if #checkconfigs > 1 then end print"To regenerate the test files, run\n" print(savecmds) - if recheckcmds ~= "" then - print"To detect engine specific differences, run after that\n" + if recheckcmds ~= "" and #checkengines ~= 1 then + print"To detect engine-specific differences, run after that\n" print(recheckcmds) end end diff --git a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md index 6b6e1c7f164..ba6b1deae57 100644 --- a/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md +++ b/Master/texmf-dist/doc/latex/l3build/CHANGELOG.md @@ -7,6 +7,17 @@ this project uses date-based 'snapshot' version identifiers. ## [Unreleased] +## [2023-12-12] + +### Changed +- Document default value of `ctanpkg` as a valid lua expression +- Improve log for failed checks with no diff files +- Document full syntaxes of `\SHOWFILE` and `\ASSERT(STR)` + +### Fixed +- Short-circuit `check --rerun` if `testdir` doesn't exist +- Retain errorlevel on Windows during `check` target + ## [2023-11-01] ### Changed @@ -721,7 +732,8 @@ this project uses date-based 'snapshot' version identifiers. - Rationalise short option names: removed `-d`, `-E`, `-r` - Target `cmdcheck`: specific to LaTeX kernel work -[Unreleased]: https://github.com/latex3/l3build/compare/2023-11-01...HEAD +[Unreleased]: https://github.com/latex3/l3build/compare/2023-12-12...HEAD +[2023-12-12]: https://github.com/latex3/l3build/compare/2023-11-01...2023-12-12 [2023-11-01]: https://github.com/latex3/l3build/compare/2023-09-13...2023-11-01 [2023-09-13]: https://github.com/latex3/l3build/compare/2023-09-07...2023-09-13 [2023-09-07]: https://github.com/latex3/l3build/compare/2023-09-05...2023-09-07 diff --git a/Master/texmf-dist/doc/latex/l3build/README.md b/Master/texmf-dist/doc/latex/l3build/README.md index 7288867655e..55b22f68086 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 LaTeX ================================================= -Release 2023-11-01 +Release 2023-12-12 Overview -------- diff --git a/Master/texmf-dist/doc/latex/l3build/l3build.pdf b/Master/texmf-dist/doc/latex/l3build/l3build.pdf Binary files differindex fdd536d4ac4..e6d9b9f1a43 100644 --- a/Master/texmf-dist/doc/latex/l3build/l3build.pdf +++ b/Master/texmf-dist/doc/latex/l3build/l3build.pdf diff --git a/Master/texmf-dist/doc/man/man1/l3build.1 b/Master/texmf-dist/doc/man/man1/l3build.1 index 0ff62545158..da81ed4d260 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 "2023-11-01" +.TH l3build 1 "2023-12-12" .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 Binary files differindex 68a3f5c7344..c4a4d42fb24 100644 --- a/Master/texmf-dist/doc/man/man1/l3build.man1.pdf +++ b/Master/texmf-dist/doc/man/man1/l3build.man1.pdf diff --git a/Master/texmf-dist/scripts/l3build/l3build-check.lua b/Master/texmf-dist/scripts/l3build/l3build-check.lua index 3279f2c4a16..75e2fc2bcf9 100644 --- a/Master/texmf-dist/scripts/l3build/l3build-check.lua +++ b/Master/texmf-dist/scripts/l3build/l3build-check.lua @@ -799,29 +799,37 @@ function runtest(name, engine, hide, ext, test_type, breakout) -- Ensure there is no stray .log file rmfile(testdir,name .. logext) local errlevels = {} + local preamble = + -- No use of localdir here as the files get copied to testdir: + -- avoids any paths in the logs + os_setenv .. " TEXINPUTS=." .. localtexmf() + .. (checksearch and os_pathsep or "") + .. os_concat .. + os_setenv .. " LUAINPUTS=." .. localtexmf() + .. (checksearch and os_pathsep or "") + .. os_concat .. + -- ensure epoch settings + set_epoch_cmd(epoch, forcecheckepoch) .. + -- Ensure lines are of a known length + os_setenv .. " max_print_line=" .. maxprintline + .. os_concat for i = 1, checkruns do errlevels[i] = runcmd( - -- No use of localdir here as the files get copied to testdir: - -- avoids any paths in the logs - os_setenv .. " TEXINPUTS=." .. localtexmf() - .. (checksearch and os_pathsep or "") - .. os_concat .. - os_setenv .. " LUAINPUTS=." .. localtexmf() - .. (checksearch and os_pathsep or "") - .. os_concat .. - -- ensure epoch settings - set_epoch_cmd(epoch, forcecheckepoch) .. - -- Ensure lines are of a known length - os_setenv .. " max_print_line=" .. maxprintline - .. os_concat .. + preamble .. binary .. format .. " " .. asciiopt .. " " .. checkopts .. setup(lvtfile) - .. (hide and (" > " .. os_null) or "") - .. os_concat .. - runtest_tasks(jobname(lvtfile),i), + .. (hide and (" > " .. os_null) or ""), testdir ) + -- On Windows, concatenting here will suppress any non-zero errorlevel + -- from the main run, so we split into two parts. + if errlevels[i] == 0 then + local errorlevel = + runcmd(preamble .. runtest_tasks(jobname(lvtfile),i) + .. (hide and (" > " .. os_null) or ""),testdir) + if errorlevel ~= 0 then errlevels[i] = errorlevel end + end -- Break the loop if the result is stable if breakout and i < checkruns then if test_type.generated == pdfext then @@ -926,7 +934,13 @@ end function check(names) local errorlevel = 0 if testfiledir ~= "" and direxists(testfiledir) then - if not options["rerun"] then + if options["rerun"] then + if not direxists(testdir) then + print("\n Test directory \"" .. testdir .. "\" doesn't exist.") + print(" Try again without \"--rerun\".\n") + return 1 + end + else errorlevel = checkinit() if errorlevel ~= 0 then return errorlevel @@ -1031,7 +1045,7 @@ function check(names) end end if errorlevel ~= 0 then - checkdiff() + checkdiff() -- this leaves "config" parameter of "checkdiff()" nil if options["show-saves"] then showsavecommands(failurelist) end @@ -1043,10 +1057,26 @@ function check(names) end -- A short auxiliary to print the list of differences for check -function checkdiff() - print("\n Check failed with difference files") - for _,i in ipairs(ordered_filelist(testdir, "*" .. os_diffext)) do - print(" - " .. testdir .. "/" .. i) +function checkdiff(config) + local diff_files = ordered_filelist(testdir, "*" .. os_diffext) + if next(diff_files) then + if config then + print("Failed tests for configuration \"" .. config .. "\":") + local testdir = testdir + if config ~= "build" then + testdir = testdir .. "-" .. config + end + end + print("\n Check failed with difference files") + for _,i in ipairs(diff_files) do + print(" - " .. testdir .. "/" .. i) + end + else + if config then + print("Check failed for configuration \"" .. config .. "\" with no difference files.") + else + print("Check failed with no difference files.") + end end print("") end diff --git a/Master/texmf-dist/scripts/l3build/l3build.lua b/Master/texmf-dist/scripts/l3build/l3build.lua index cf8f66cc1fb..4919d9377f3 100755 --- a/Master/texmf-dist/scripts/l3build/l3build.lua +++ b/Master/texmf-dist/scripts/l3build/l3build.lua @@ -1,5 +1,3 @@ -#!/usr/bin/env texlua - --[[ File l3build.lua Copyright (C) 2014-2022 The LaTeX Project @@ -25,7 +23,7 @@ for those people who are interested. --]] -- Version information -release_date = "2023-11-01" +release_date = "2023-12-12" -- File operations are aided by the LuaFileSystem module local lfs = require("lfs") @@ -165,16 +163,7 @@ if #checkconfigs > 1 then end if next(failed) then for _,config in ipairs(failed) do - print("Failed tests for configuration \"" .. config .. "\":") - print("\n Check failed with difference files") - local testdir = testdir - if config ~= "build" then - testdir = testdir .. "-" .. config - end - for _,i in ipairs(ordered_filelist(testdir,"*" .. os_diffext)) do - print(" - " .. testdir .. "/" .. i) - end - print("") + checkdiff(config) end if options["show-saves"] then local savecmds, recheckcmds = "", "" @@ -200,8 +189,8 @@ if #checkconfigs > 1 then end print"To regenerate the test files, run\n" print(savecmds) - if recheckcmds ~= "" then - print"To detect engine specific differences, run after that\n" + if recheckcmds ~= "" and #checkengines ~= 1 then + print"To detect engine-specific differences, run after that\n" print(recheckcmds) end end diff --git a/Master/texmf-dist/source/latex/l3build/l3build.dtx b/Master/texmf-dist/source/latex/l3build/l3build.dtx index e425786e03e..444f6f86799 100644 --- a/Master/texmf-dist/source/latex/l3build/l3build.dtx +++ b/Master/texmf-dist/source/latex/l3build/l3build.dtx @@ -52,10 +52,10 @@ \def\allluavars{ \luavarset{module}{""}{The name of the module} \luavarset{bundle}{""}{The name of the bundle in which the module belongs (where relevant)} -\luavarset{ctanpkg}{module/bundle}{Name of the CTAN package matching this module} +\luavarset{ctanpkg}{bundle == "" and module or bundle}{Name of the CTAN package matching this module} \luavarseparator -\luavarset{modules}{\{\}}{The list of all modules in a bundle (when not auto-detecting)} -\luavarset{exclmodules}{\{\}}{Directories to be excluded from automatic module detection} +\luavarset{modules}{\{ \}}{The list of all modules in a bundle (when not auto-detecting)} +\luavarset{exclmodules}{\{ \}}{Directories to be excluded from automatic module detection} \luavarseparator \luavarset{maindir} {"."} {Top level directory for the module/bundle} \luavarset{docfiledir} {"."} {Directory containing documentation files} @@ -85,8 +85,8 @@ \luavarset{checkfiles} {\{~\}}{Extra files unpacked purely for tests} \luavarset{checksuppfiles} { }{Files needed for performing regression tests} \luavarset{cleanfiles} {\{"*.log", "*.pdf", "*.zip"\}}{Files to delete when cleaning} -\luavarset{demofiles} {\{\}}{Files which show how to use a module} -\luavarset{docfiles} {\{\}}{Files which are part of the documentation but should not be typeset} +\luavarset{demofiles} {\{ \}}{Files which show how to use a module} +\luavarset{docfiles} {\{ \}}{Files which are part of the documentation but should not be typeset} \luavarset{dynamicfiles} {\{ \}}{Secondary files to cleared before each test is run} \luavarset{excludefiles} {\{"*\string~","build.lua","config-*.lua"\}}{Files to ignore entirely (default for Emacs backup files)} \luavarset{installfiles} {\{"*.sty","*.cls"\}}{Files to install to the \texttt{tex} area of the \texttt{texmf} tree} @@ -96,19 +96,19 @@ \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} +\luavarset{typesetdemofiles} {\{ \}}{Files to typeset before the documentation for inclusion in main documentation files} \luavarset{typesetfiles} {\{"*.dtx"\}}{Files to typeset for documentation} -\luavarset{typesetsuppfiles} {\{\}}{Files needed to support typesetting when \enquote{sandboxed}} -\luavarset{typesetsourcefiles}{\{\}}{Files to copy to unpacking when typesetting} +\luavarset{typesetsuppfiles} {\{ \}}{Files needed to support typesetting when \enquote{sandboxed}} +\luavarset{typesetsourcefiles}{\{ \}}{Files to copy to unpacking when typesetting} \luavarset{unpackfiles} {\{"*.ins"\}}{Files to run to perform unpacking} -\luavarset{unpacksuppfiles} {\{\}}{Files needed to support unpacking when \enquote{sandboxed}} +\luavarset{unpacksuppfiles} {\{ \}}{Files needed to support unpacking when \enquote{sandboxed}} \luavarseparator \luavarset{includetests}{\{"*"\}}{Test names to include when checking} -\luavarset{excludetests}{\{\}} {Test names to exclude when checking} +\luavarset{excludetests}{\{ \}} {Test names to exclude when checking} \luavarseparator -\luavarset{checkdeps} {\{\}}{List of dependencies for running checks} -\luavarset{typesetdeps}{\{\}}{List of dependencies for typesetting docs} -\luavarset{unpackdeps} {\{\}}{List of dependencies for unpacking} +\luavarset{checkdeps} {\{ \}}{List of dependencies for running checks} +\luavarset{typesetdeps}{\{ \}}{List of dependencies for typesetting docs} +\luavarset{unpackdeps} {\{ \}}{List of dependencies for unpacking} \luavarseparator \luavarset{checkengines}{\{"pdftex", "xetex", "luatex"\}}{Engines to check with \texttt{check} by default} \luavarset{stdengine} {checkengines[1] or "pdftex"}{Engine to generate \texttt{.tlg} file from} @@ -117,7 +117,7 @@ \luavarset{\detokenize{test_types}} {\meta{table}} {Custom test variants} \luavarset{\detokenize{test_order}} {\{"log", "pdf"\}} {Which kinds of tests to evaluate} \luavarseparator -\luavarset{checkconfigs}{\{\}}{Configurations to use for tests} +\luavarset{checkconfigs}{\{ \}}{Configurations to use for tests} \luavarseparator \luavarset{typesetexe} {"pdflatex"} {Executable for compiling \texttt{doc(s)}} \luavarset{unpackexe} {"pdftex"} {Executable for running \texttt{unpack}} @@ -190,7 +190,7 @@ \setlength\LTleft{-0.21\linewidth} \begin{longtable}{@{}% >{\small} - p{0.18\linewidth} + p{0.20\linewidth} @{\hspace{0.03\linewidth}} >{\footnotesize\hangindent=1em} p{0.34\linewidth} @@ -251,7 +251,7 @@ % }^^A % } % -% \date{Released 2023-11-01} +% \date{Released 2023-12-12} % % \maketitle % \tableofcontents @@ -977,12 +977,13 @@ % \cs{BEGINTEST}\marg{title} \dots \cs{ENDTEST} is an environment form of % \cs{TEST}, allowing verbatim material, \emph{etc.} to appear. % \item -% \cs{SHOWFILE} (\eTeX{} only) Shows the content of the file given as an -% argument. +% \cs{SHOWFILE}\marg{filename} (\eTeX{} only) Shows the content of +% \meta{filename}. % \item -% \cs{ASSERT} and \cs{ASSERTSTR} Asserts if the full expansion -% of the two required arguments are the same: the \cs{ASSERT} function is -% token-based, the \cs{ASSERTSTR} works on a string basis. +% \cs{ASSERT}\marg{arg_1}\marg{arg_2} and \cs{ASSERTSTR}\marg{arg_1}\marg{arg_2} +% Asserts if the full expansion of \meta{arg_1} and \meta{arg_2} are the same: +% the \cs{ASSERT} function is token-based, +% the \cs{ASSERTSTR} works on a string basis. % \end{itemize} % An example of some of these commands is shown following. % \begin{Verbatim} |