Enable make tests

This commit is contained in:
Jazz Turner-Baggs 2025-11-24 18:41:06 -08:00
parent 127d16641c
commit 644a0367f8
No known key found for this signature in database
3 changed files with 14 additions and 0 deletions

View File

@ -71,6 +71,12 @@ build-waku-nat:
@echo "Start building waku nat-libs"
$(MAKE) -C vendor/nwaku nat-libs
@echo "Completed building nat-libs"
.PHONY: tests
tests: | build-waku-librln build-waku-nat nim_chat_poc.nims
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim tests $(NIM_PARAMS) nim_chat_poc.nims
##########
## Example ##

View File

@ -33,6 +33,13 @@ proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
exec "nim " & lang & " --out:build/" & name & " --mm:refc " & extra_params & " " &
srcDir & name & ".nim"
proc test(name: string, params = "-d:chronicles_log_level=DEBUG", lang = "c") =
buildBinary name, "tests/", params
exec "build/" & name
task tests, "Build & run tests":
test "all_tests", "-d:chronicles_log_level=DEBUG -d:chronosStrictException"
task waku_example, "Build Waku based simple example":
let name = "waku_example"

1
tests/all_tests.nim Normal file
View File

@ -0,0 +1 @@
# import indivdual test suites