Skip to content

Commit

Permalink
build: added testcommon target to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorenzo Delgado committed Mar 31, 2023
1 parent bd9857c commit 048ca45
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,22 @@ clean-librln:
clean: | clean-librln


#################
## Waku Common ##
#################
.PHONY: testcommon

testcommon: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim testcommon $(NIM_PARAMS) waku.nims


#############
## Waku v2 ##
#############
.PHONY: test2 wakunode2 example2 sim2 scripts2 wakubridge chat2 chat2bridge

test2: | build deps librln
test2: | build deps librln testcommon
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim test2 $(NIM_PARAMS) $(EXPERIMENTAL_PARAMS) waku.nims

Expand Down Expand Up @@ -190,11 +200,11 @@ networkmonitor: | build deps
#################
.PHONY: testwhisper test1 wakunode1 example1 sim1

testwhisper: | build deps
testwhisper: | build deps testcommon
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim testwhisper $(NIM_PARAMS) waku.nims

test1: | build deps
test1: | build deps testcommon
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim test1 $(NIM_PARAMS) waku.nims

Expand Down
6 changes: 0 additions & 6 deletions tests/all_tests_v2.nim
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
## Common

# Waku common test suite
import ./all_tests_common


## Waku v2

# Waku message test suite
Expand Down
10 changes: 8 additions & 2 deletions waku.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,16 @@ proc test(name: string, params = "-d:chronicles_log_level=DEBUG", lang = "c") =
buildBinary name, "tests/", params
exec "build/" & name

### Whisper tasks

### Waku common tasks
task testcommon, "Build & run common tests":
test "all_tests_common", "-d:chronicles_log_level=WARN -d:chronosStrictException"


### Whisper & Waku v1 tasks
task testwhisper, "Build & run Whisper tests":
test "all_tests_whisper", "-d:chronicles_log_level=WARN -d:chronosStrictException"

### Waku v1 tasks
task wakunode1, "Build Waku v1 cli node":
buildBinary "wakunode1", "waku/v1/node/",
"-d:chronicles_log_level=DEBUG -d:chronosStrictException"
Expand All @@ -63,6 +68,7 @@ task example1, "Build Waku v1 example":
task test1, "Build & run Waku v1 tests":
test "all_tests_v1", "-d:chronicles_log_level=WARN -d:chronosStrictException"


### Waku v2 tasks
task wakunode2, "Build Waku v2 (experimental) cli node":
let name = "wakunode2"
Expand Down
5 changes: 2 additions & 3 deletions waku/common/envvar_serialization/utils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ when (NimMajor, NimMinor) < (1, 4):
else:
{.push raises: [].}


import
std/[os, strutils],
stew/byteutils,
stew/ranges/ptr_arith
stew/byteutils,
stew/ptrops


type
Expand Down

0 comments on commit 048ca45

Please sign in to comment.