Skip to content
Snippets Groups Projects
Commit 1629237a authored by Vít Novotný's avatar Vít Novotný
Browse files

Added the UPDATE_FAILED conditional to the visual comparison Makefiles.

When UPDATE_FAILED=true, failed tests will update the prototype PDFs
instead of terminating the procedure.
parent 84d36bab
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,9 @@ all: ...@@ -18,7 +18,9 @@ all:
make -C $(EXAMPLEDIR) implode make -C $(EXAMPLEDIR) implode
$(FAKETIME) make -C $(EXAMPLEDIR) all $(FAKETIME) make -C $(EXAMPLEDIR) all
for PROTOTYPE in $(PROTOTYPES); do \ for PROTOTYPE in $(PROTOTYPES); do \
$(COMPARE) "$$PROTOTYPE" $(EXAMPLEDIR)/"$${PROTOTYPE##expected-}" || exit 1;\ $(COMPARE) "$$PROTOTYPE" $(EXAMPLEDIR)/"$${PROTOTYPE##expected-}" || \
{ [ "$(UPDATE_FAILED)" = true ] && \
mv $(EXAMPLEDIR)/"$${PROTOTYPE##expected-}" "$$PROTOTYPE"; } || exit 1; \
done done
make -C $(EXAMPLEDIR) implode make -C $(EXAMPLEDIR) implode
......
...@@ -66,7 +66,8 @@ expected-%-lualatex.pdf: %.tex ...@@ -66,7 +66,8 @@ expected-%-lualatex.pdf: %.tex
@# The second run. @# The second run.
$(FAKETIME) pdflatex -jobname $(basename $@) $< $(FAKETIME) pdflatex -jobname $(basename $@) $<
@# Compare the result with the prototype. @# Compare the result with the prototype.
! [ -e expected-$@ ] || $(COMPARE) expected-$@ $@ ! [ -e expected-$@ ] || $(COMPARE) expected-$@ $@ || \
{ [ "$(UPDATE_FAILED)" = true ] && mv $@ expected-$@; }
# This target typesets a LuaLaTeX test file and compares # This target typesets a LuaLaTeX test file and compares
# it against a prototype. # it against a prototype.
...@@ -83,7 +84,8 @@ expected-%-lualatex.pdf: %.tex ...@@ -83,7 +84,8 @@ expected-%-lualatex.pdf: %.tex
@# The second run. @# The second run.
$(FAKETIME) lualatex -jobname $(basename $@) $< $(FAKETIME) lualatex -jobname $(basename $@) $<
@# Compare the result with the prototype. @# Compare the result with the prototype.
! [ -e expected-$@ ] || $(COMPARE) expected-$@ $@ ! [ -e expected-$@ ] || $(COMPARE) expected-$@ $@ || \
{ [ "$(UPDATE_FAILED)" = true ] && mv $@ expected-$@; }
# This target removes any auxiliary files. # This target removes any auxiliary files.
clean: clean:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment