From: Ian Jackson Date: Sat, 25 Aug 2018 11:31:38 +0000 (+0100) Subject: test suite: Honour DGIT_TEST_RUN_PFX env var X-Git-Tag: archive/debian/6.10~54 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=a11bdb16b533806efcfc5e529d9394963afa1ee6 test suite: Honour DGIT_TEST_RUN_PFX env var One might set this to `eatmydata', for example. (It's not a good idea to wrap run-all or the Makefile in eatmydata, because you actually want the stamp files etc. at least.) Signed-off-by: Ian Jackson --- diff --git a/tests/Makefile b/tests/Makefile index 88bc0a06..31eb7b62 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -11,11 +11,11 @@ all: $(foreach t,$(TESTNAMES),tests/tmp/$t.ok) tests/tmp/%.ok: tests/tests/% ifeq ($(DGIT_TEST_RETRY_COUNT),) - tests/tests/$* >tests/tmp/$*.log 2>&1 + $(DGIT_TEST_RUN_PFX) tests/tests/$* >tests/tmp/$*.log 2>&1 else @for retry in $$( seq 1 $(DGIT_TEST_RETRY_COUNT) ); do \ echo "[$$retry] $*"; \ - tests/tests/$* >tests/tmp/$*.$$retry.log 2>&1; \ + $(DGIT_TEST_RUN_PFX) tests/tests/$* >tests/tmp/$*.$$retry.log 2>&1; \ rc=$$?; \ if [ $$rc = 0 ]; then exit 0; fi; \ echo >&2 "[$$retry] $* TEST FAILED $$rc"; \