diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-05-27 15:18:17 +0000 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-05-27 15:18:17 +0000 |
commit | 696488642defb5846b3b69904ffbf6684160c322 (patch) | |
tree | 6e99c379bb5f189d6fa373fc4bbf69210a04a95f | |
parent | a88908c3a44db6bc372d5ec30ebd74e73919efc0 (diff) | |
download | txr-696488642defb5846b3b69904ffbf6684160c322.tar.gz txr-696488642defb5846b3b69904ffbf6684160c322.tar.bz2 txr-696488642defb5846b3b69904ffbf6684160c322.zip |
make tests: remove failed .out.
* Makefile (%.ok): If the .out file differs from .expected,
don't just fail this rule. Remove the .out file also, so
that when "make tests" is repeated, the test is re-run to
regenerate it. Otherwise "make tests" will only run diff
again on the previously generated .out file.
-rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -358,7 +358,10 @@ tst/%.out: %.tl $(V)mv $(TESTS_TMP) $@ %.ok: %.out - $(V)diff -u $(patsubst tst/%.out,%.expected,$<) $< + $(V)if ! diff -u $(patsubst tst/%.out,%.expected,$<) $< ; then \ + rm $< ; \ + exit 1 ; \ + fi $(V)touch $@ %.expected: %.out |