mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-02 13:33:08 +00:00
builds parallel tests before running
This commit is contained in:
parent
6d924439a1
commit
a1f7219758
@ -39,8 +39,3 @@ task testPart2, "Run the test suite part 2":
|
||||
exec "nimble install -d -y"
|
||||
withDir "tests":
|
||||
exec "nimble testPart2"
|
||||
|
||||
task coverage, "Run the test coverage":
|
||||
exec "nimble install -d -y"
|
||||
withDir "tests":
|
||||
exec "nimble coverage"
|
||||
|
||||
@ -4,18 +4,27 @@ task testAll, "Run DHT tests":
|
||||
exec "nim c -r test.nim"
|
||||
rmFile "./test"
|
||||
|
||||
task compileParallelTests, "Compile parallel tests":
|
||||
exec "nim c --hints:off --verbosity:0 dht/test_providers.nim"
|
||||
exec "nim c --hints:off --verbosity:0 dht/test_providermngr.nim"
|
||||
exec "nim c --hints:off --verbosity:0 discv5/test_discoveryv5.nim"
|
||||
exec "nim c --hints:off --verbosity:0 discv5/test_discoveryv5_encoding.nim"
|
||||
|
||||
task test, "Run DHT tests":
|
||||
# compile with trace logging to make sure it doesn't crash
|
||||
exec "nim c -d:testsAll -d:chronicles_enabled=on -d:chronicles_log_level=TRACE test.nim"
|
||||
rmFile "./test"
|
||||
compileParallelTestsTask()
|
||||
exec "nim c -r -d:testsAll --verbosity:0 testAllParallel.nim"
|
||||
rmFile "./testAllParallel"
|
||||
|
||||
task testPart1, "Run DHT tests A":
|
||||
compileParallelTestsTask()
|
||||
exec "nim c -r -d:testsPart1 testAllParallel.nim"
|
||||
rmFile "./testAllParallel"
|
||||
|
||||
task testPart2, "Run DHT tests B":
|
||||
compileParallelTestsTask()
|
||||
exec "nim c -r -d:testsPart2 testAllParallel.nim"
|
||||
rmFile "./testAllParallel"
|
||||
|
||||
|
||||
@ -1,2 +0,0 @@
|
||||
|
||||
include ./testAll
|
||||
@ -1,15 +0,0 @@
|
||||
switch("define", "testsAll")
|
||||
|
||||
switch("debugger", "native")
|
||||
switch("lineDir", "on")
|
||||
switch("define", "debug")
|
||||
# switch("opt", "none")
|
||||
switch("verbosity", "0")
|
||||
switch("hints", "off")
|
||||
switch("warnings", "off")
|
||||
switch("define", "chronicles_log_level=INFO")
|
||||
switch("nimcache", "nimcache")
|
||||
switch("passC", "-fprofile-arcs")
|
||||
switch("passC", "-ftest-coverage")
|
||||
switch("passL", "-fprofile-arcs")
|
||||
switch("passL", "-ftest-coverage")
|
||||
@ -8,13 +8,13 @@ var cmds: seq[string]
|
||||
|
||||
when defined(testsPart1) or defined(testsAll):
|
||||
cmds.add [
|
||||
"nim c -r --hints:off --verbosity:0 tests/dht/test_providers.nim",
|
||||
"nim c -r --hints:off --verbosity:0 tests/dht/test_providermngr.nim",
|
||||
"nim c -r --hints:off --verbosity:0 dht/test_providers.nim",
|
||||
"nim c -r --hints:off --verbosity:0 dht/test_providermngr.nim",
|
||||
]
|
||||
when defined(testsPart2) or defined(testsAll):
|
||||
cmds.add [
|
||||
"nim c -r --hints:off --verbosity:0 tests/discv5/test_discoveryv5.nim",
|
||||
"nim c -r --hints:off --verbosity:0 tests/discv5/test_discoveryv5_encoding.nim",
|
||||
"nim c -r --hints:off --verbosity:0 discv5/test_discoveryv5.nim",
|
||||
"nim c -r --hints:off --verbosity:0 discv5/test_discoveryv5_encoding.nim",
|
||||
]
|
||||
|
||||
echo "Running Test Commands: ", cmds
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user