[latex3-commits] [l3svn] r6900 - l3build: luaotfload normalisation, and diff printing
noreply at latex-project.org
noreply at latex-project.org
Sun Feb 12 12:13:56 CET 2017
Author: will
Date: 2017-02-12 12:13:56 +0100 (Sun, 12 Feb 2017)
New Revision: 6900
Modified:
trunk/l3build/l3build.dtx
trunk/l3build/l3build.lua
Log:
l3build: luaotfload normalisation, and diff printing
1. (luc: path/to/font.luc) -> (luc: [..]/font.luc)
2. when -H is used, print the diff directly.
The idea of #2 is that you're asking it to stop when coming to a problem, so it kind of makes sense to display that problem immediately. More pragmatically, I needed that to debug problems in remove installations where only l3build output was able to be queried (Travis CI in this case).
Happy to switch this behaviour to be optional if people prefer.
Modified: trunk/l3build/l3build.dtx
===================================================================
--- trunk/l3build/l3build.dtx 2017-02-12 06:07:46 UTC (rev 6899)
+++ trunk/l3build/l3build.dtx 2017-02-12 11:13:56 UTC (rev 6900)
@@ -306,7 +306,7 @@
% testing
% \item \texttt{--halt-on-error} (\texttt{-H}) Specifies that checks
% should stop as soon as possible, rather than running all requested
-% tests
+% tests; the difference file is printed in the terminal directly in the case of failure
% \item \texttt{--pdf} (\texttt{-p}) Test PDF file against a reference
% version rather than using a log comparison
% \item \texttt{--quiet} (\texttt{-q}) Suppresses output from unpacking
@@ -688,7 +688,7 @@
% years due to a \TeX{} bug).
% \item Conversion of \texttt{on line \meta{number}} to \texttt{on line ...}
% to allow flexibility in changes to test files.
-% \item
+% \item Removal of file path for fonts loaded with \texttt{luaotfload}.
% \end{itemize}
%
% \LuaTeX{} makes several additional changes to the log file. As normalising
Modified: trunk/l3build/l3build.lua
===================================================================
--- trunk/l3build/l3build.lua 2017-02-12 06:07:46 UTC (rev 6899)
+++ trunk/l3build/l3build.lua 2017-02-12 11:13:56 UTC (rev 6900)
@@ -818,6 +818,12 @@
line,
"cm, mm, dd, cc, bp, or sp", "cm, mm, dd, cc, nd, nc, bp, or sp"
)
+ -- Remove luaotfload absolute paths
+ line = string.gsub(
+ line,
+ "%(load luc: (.*)/(.-%.luc)%)",
+ "(load luc: [..]/%2)"
+ )
-- Normalise a case where fixing a TeX bug changes the message text
line = string.gsub(line, "\\csname\\endcsname ", "\\csname\\endcsname")
-- Zap "on line <num>" and replace with "on line ..."
@@ -1124,7 +1130,7 @@
errlevel = compare_tlg(name, engine)
end
if errlevel ~= 0 and opthalt then
- checkdiff()
+ showfaileddiff()
if errlevel ~= 0 then
return 1
end
@@ -1604,6 +1610,23 @@
print("")
end
+function showfaileddiff()
+ print("\nCheck failed with difference file")
+ for _,i in ipairs(filelist(testdir, "*" .. os_diffext)) do
+ print(" - " .. testdir .. "/" .. i)
+ print("")
+ local f = io.open(testdir .. "/" .. i,"r")
+ local content = f:read("*all")
+ f:close()
+ print("-----------------------------------------------------------------------------------")
+ print(content)
+ print("-----------------------------------------------------------------------------------")
+ end
+ for _,i in ipairs(filelist(testdir, "*" .. os_cmpext)) do
+ print(" - " .. testdir .. "/" .. i)
+ end
+end
+
-- Remove all generated files
function clean()
-- To make sure that distribdir never contains any stray subdirs,
More information about the latex3-commits
mailing list