summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-07-12 07:17:48 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-07-12 07:17:48 -0700
commitee20bb23f59e4eda5bfec1f9d8cfd4170a6bd0b2 (patch)
treedbf4e8c53f12892574253d8282ab6ccce06d90b6 /Makefile
parent37e586b1079818afe12ca5157f2143118ebd4383 (diff)
downloadtxr-ee20bb23f59e4eda5bfec1f9d8cfd4170a6bd0b2.tar.gz
txr-ee20bb23f59e4eda5bfec1f9d8cfd4170a6bd0b2.tar.bz2
txr-ee20bb23f59e4eda5bfec1f9d8cfd4170a6bd0b2.zip
tests: .txr tests can skip using exit code 13.
* Makefile (tst/%.ok): If a .txr test terminates with status 13, that indicates that it should be skipped.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 0a3d21af..c59bcee0 100644
--- a/Makefile
+++ b/Makefile
@@ -438,11 +438,12 @@ tst/%.ok: %.txr %.expected $(TXR)
$(if $(TXR_SCRIPT_ON_CMDLINE), \
$(TXR) $(TXR_DBG_OPTS) $(TXR_OPTS) -c "$$(cat $<)" \
$(TXR_ARGS) > $(TST_OUT), \
- $(TXR) $(TXR_DBG_OPTS) $(TXR_OPTS) $< $(TXR_ARGS) > $(TST_OUT)))
- $(call SH, \
- if ! diff -u $(TST_EXPECTED) $(TST_OUT) ; then \
- exit 1 ; \
- fi)
+ $(TXR) $(TXR_DBG_OPTS) $(TXR_OPTS) $< $(TXR_ARGS) > $(TST_OUT)) ; \
+ case $$? in \
+ ( 0 ) diff -u $(TST_EXPECTED) $(TST_OUT) ;; \
+ ( 13 ) printf "SKIP %s\n" $< ; exit 0 ;; \
+ ( * ) exit 1 ;; \
+ esac)
$(call SH,touch $@)
tst/%.ok: %.tl %.expected $(TXR)