summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-05-27 15:18:17 +0000
committerKaz Kylheku <kaz@kylheku.com>2017-05-27 15:18:17 +0000
commit696488642defb5846b3b69904ffbf6684160c322 (patch)
tree6e99c379bb5f189d6fa373fc4bbf69210a04a95f
parenta88908c3a44db6bc372d5ec30ebd74e73919efc0 (diff)
downloadtxr-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--Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 681fbede..531395cd 100644
--- a/Makefile
+++ b/Makefile
@@ -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