summaryrefslogtreecommitdiffstats
path: root/GNUmakefile
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-02-01 12:17:39 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-02-03 13:50:23 -0500
commitf090d34d559824b8ce11b5f4c4c55ac1e82a7ef3 (patch)
tree06acc0139d911991527986f3b9c96e5531201e48 /GNUmakefile
parent4d0d84f935159c395ccf3b95d5727a3553003b68 (diff)
downloadbfs-f090d34d559824b8ce11b5f4c4c55ac1e82a7ef3.tar.xz
tests: Run more integration tests by default
The traversal behaviour of -j1, -j2, and -jN (N >= 3) are all different enough to be worth running the whole test suite against them. Sorting (-s) is another dimension worth testing. Having these tests run automatically would have caught some recently-fixed bugs earlier.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile18
1 files changed, 12 insertions, 6 deletions
diff --git a/GNUmakefile b/GNUmakefile
index e01e93a..87a5753 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -291,12 +291,12 @@ $(BIN)/tests/units: \
tests: $(TESTS)
.PHONY: tests
-# The different search strategies that we test
-STRATEGIES := bfs dfs ids eds
-STRATEGY_CHECKS := $(STRATEGIES:%=check-%)
+# The different flag combinations we check
+INTEGRATIONS := default dfs ids eds j1 j2 j3 s
+INTEGRATION_CHECKS := $(INTEGRATIONS:%=check-%)
# All the different checks we run
-CHECKS := check-units $(STRATEGY_CHECKS)
+CHECKS := check-units $(INTEGRATION_CHECKS)
check: $(CHECKS)
.PHONY: check $(CHECKS)
@@ -304,8 +304,14 @@ check: $(CHECKS)
check-units: $(BIN)/tests/units
$<
-$(STRATEGY_CHECKS): check-%: $(BIN)/bfs $(TEST_UTILS)
- +./tests/tests.sh --make="$(MAKE)" --bfs="$(BIN)/bfs -S $*" $(TEST_FLAGS)
+check-default: $(BIN)/bfs $(TEST_UTILS)
+ +./tests/tests.sh --make="$(MAKE)" --bfs="$<" $(TEST_FLAGS)
+
+check-dfs check-ids check-eds: check-%: $(BIN)/bfs $(TEST_UTILS)
+ +./tests/tests.sh --make="$(MAKE)" --bfs="$< -S $*" $(TEST_FLAGS)
+
+check-j1 check-j2 check-j3 check-s: check-%: $(BIN)/bfs $(TEST_UTILS)
+ +./tests/tests.sh --make="$(MAKE)" --bfs="$< -$*" $(TEST_FLAGS)
# Custom test flags for distcheck
DISTCHECK_FLAGS := -s TEST_FLAGS="--sudo --verbose=skipped"