test: added test framework for testing trie
This commit is contained in:
parent
2d7cce138d
commit
ccbc55350c
8 changed files with 2101 additions and 6 deletions
15
Makefile
15
Makefile
|
|
@ -14,13 +14,22 @@ all: build
|
|||
.PHONY: cmake
|
||||
cmake: $(BUILD_DIR)/Debug/Makefile
|
||||
$(BUILD_DIR)/Debug/Makefile: CMakeLists.txt
|
||||
@ cmake -B'$(BUILD_DIR)/Debug' -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .
|
||||
@ cmake -B'$(BUILD_DIR)/Debug' -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 .
|
||||
@ ln -sf '$(BUILD_DIR)/Debug/compile_commands.json' compile_commands.json
|
||||
|
||||
.PHONY: cmake-test
|
||||
cmake-test: $(BUILD_DIR)/Test/Makefile
|
||||
$(BUILD_DIR)/Test/Makefile: CMakeLists.txt
|
||||
@ cmake -B'$(BUILD_DIR)/Test' -DCMAKE_BUILD_TYPE=Test .
|
||||
|
||||
.PHONY: build
|
||||
build: cmake
|
||||
@ make -C '$(BUILD_DIR)/Debug'
|
||||
|
||||
.PHONY: build-test
|
||||
build-test: cmake-test
|
||||
@ make -C '$(BUILD_DIR)/Test'
|
||||
|
||||
.PHONY: cmake-release
|
||||
cmake-release: $(BUILD_DIR)/Release/Makefile
|
||||
$(BUILD_DIR)/Release/Makefile: CMakeLists.txt
|
||||
|
|
@ -38,6 +47,10 @@ run: build
|
|||
gdb: build
|
||||
@ LANDER_DATA_DIR=data LANDER_BASE_URL=http://localhost:18080/ LANDER_API_KEY=test gdb --args ./build/Debug/lander
|
||||
|
||||
.PHONY: test
|
||||
test: build-test
|
||||
@ $(MAKE) -C '$(BUILD_DIR)/Test' test ARGS=-j$(CORES) CTEST_OUTPUT_ON_FAILURE=1
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@ rm -rf '$(BUILD_DIR)' compile_commands.json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue