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
commit194297377d00935a4d5df2d162871b0da930f1d5 (patch)
tree6e99c379bb5f189d6fa373fc4bbf69210a04a95f
parent6e114c1e82d0ebe2611a4ab1ea6c68e88a90524f (diff)
downloadtxr-194297377d00935a4d5df2d162871b0da930f1d5.tar.gz
txr-194297377d00935a4d5df2d162871b0da930f1d5.tar.bz2
txr-194297377d00935a4d5df2d162871b0da930f1d5.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