From ee20bb23f59e4eda5bfec1f9d8cfd4170a6bd0b2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 12 Jul 2021 07:17:48 -0700 Subject: 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. --- Makefile | 11 ++++++----- 1 file 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) -- cgit v1.2.3