diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2024-01-12 12:01:07 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2024-01-12 12:01:07 -0500 |
commit | a9c9fc392bf2c3803251e5f63c944cd221a1ca67 (patch) | |
tree | f6074e70120eda712b96027835c9c799a561e4a4 /GNUmakefile | |
parent | 67eebd6fd514ede9e10cd4639b8d0cce690513f4 (diff) | |
download | bfs-a9c9fc392bf2c3803251e5f63c944cd221a1ca67.tar.xz |
tests: Merge unit test executables into one
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/GNUmakefile b/GNUmakefile index 66af797..34c7f37 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -269,32 +269,39 @@ LIBBFS := \ # The main executable $(BIN)/bfs: $(OBJ)/src/main.o $(LIBBFS) -# Standalone unit tests -UNITS := alloc bfstd bit trie xtimegm -UNIT_TESTS := $(UNITS:%=$(BIN)/tests/%) -UNIT_CHECKS := $(UNITS:%=check-%) - # Testing utilities TEST_UTILS := $(BIN)/tests/mksock $(BIN)/tests/xtouch -TESTS := $(UNIT_TESTS) $(TEST_UTILS) +$(BIN)/tests/mksock: $(OBJ)/tests/mksock.o $(LIBBFS) + +$(BIN)/tests/xtouch: $(OBJ)/tests/xtouch.o $(LIBBFS) + +# All test binaries +TESTS := $(BIN)/tests/units $(TEST_UTILS) + +$(BIN)/tests/units: \ + $(OBJ)/tests/alloc.o \ + $(OBJ)/tests/bfstd.o \ + $(OBJ)/tests/bit.o \ + $(OBJ)/tests/main.o \ + $(OBJ)/tests/trie.o \ + $(OBJ)/tests/xtime.o \ + $(LIBBFS) tests: $(TESTS) .PHONY: tests -$(TESTS): $(BIN)/tests/%: $(OBJ)/tests/%.o $(LIBBFS) - # The different search strategies that we test STRATEGIES := bfs dfs ids eds STRATEGY_CHECKS := $(STRATEGIES:%=check-%) # All the different checks we run -CHECKS := $(UNIT_CHECKS) $(STRATEGY_CHECKS) +CHECKS := check-units $(STRATEGY_CHECKS) check: $(CHECKS) .PHONY: check $(CHECKS) -$(UNIT_CHECKS): check-%: $(BIN)/tests/% +check-units: $(BIN)/tests/units $< JOBS := $(filter -j%,$(MAKEFLAGS)) |