]> arthur.barton.de Git - bup.git/blobdiff - GNUmakefile
Add BUP_TEST_RANDOM_SEED
[bup.git] / GNUmakefile
index 48725d2f5413659dad5d374f1ac6d0f558697d41..812ea38851c79eb344d14b86c525b35d4db67437 100644 (file)
@@ -4,6 +4,12 @@ MAKEFLAGS += --warn-undefined-variables
 SHELL := bash
 .DEFAULT_GOAL := all
 
+# So where possible we can make tests more reproducible
+export BUP_TEST_RANDOM_SEED ?= $(shell echo "$$RANDOM")
+
+# Guard against accidentally using/testing a local bup
+export PATH := $(CURDIR)/dev/shadow-bin:$(PATH)
+
 clean_paths :=
 generated_dependencies :=
 
@@ -208,6 +214,7 @@ lint: dev/bup-exec dev/bup-python
        ./pylint
 
 test: all test/tmp dev/python lint
+       ! bup version  # Ensure we can't test the local bup (cf. dev/shadow-bin)
        ./bup features
        if test yes = "$$(dev/python -c 'import xdist; print("yes")' 2>/dev/null)"; then \
           (set -x; ./pytest $(xdist_opt);) \