mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-05 23:13:10 +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"
|
exec "nimble install -d -y"
|
||||||
withDir "tests":
|
withDir "tests":
|
||||||
exec "nimble testPart2"
|
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"
|
exec "nim c -r test.nim"
|
||||||
rmFile "./test"
|
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":
|
task test, "Run DHT tests":
|
||||||
# compile with trace logging to make sure it doesn't crash
|
# 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"
|
exec "nim c -d:testsAll -d:chronicles_enabled=on -d:chronicles_log_level=TRACE test.nim"
|
||||||
rmFile "./test"
|
rmFile "./test"
|
||||||
|
compileParallelTestsTask()
|
||||||
exec "nim c -r -d:testsAll --verbosity:0 testAllParallel.nim"
|
exec "nim c -r -d:testsAll --verbosity:0 testAllParallel.nim"
|
||||||
rmFile "./testAllParallel"
|
rmFile "./testAllParallel"
|
||||||
|
|
||||||
task testPart1, "Run DHT tests A":
|
task testPart1, "Run DHT tests A":
|
||||||
|
compileParallelTestsTask()
|
||||||
exec "nim c -r -d:testsPart1 testAllParallel.nim"
|
exec "nim c -r -d:testsPart1 testAllParallel.nim"
|
||||||
rmFile "./testAllParallel"
|
rmFile "./testAllParallel"
|
||||||
|
|
||||||
task testPart2, "Run DHT tests B":
|
task testPart2, "Run DHT tests B":
|
||||||
|
compileParallelTestsTask()
|
||||||
exec "nim c -r -d:testsPart2 testAllParallel.nim"
|
exec "nim c -r -d:testsPart2 testAllParallel.nim"
|
||||||
rmFile "./testAllParallel"
|
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):
|
when defined(testsPart1) or defined(testsAll):
|
||||||
cmds.add [
|
cmds.add [
|
||||||
"nim c -r --hints:off --verbosity:0 tests/dht/test_providers.nim",
|
"nim c -r --hints:off --verbosity:0 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_providermngr.nim",
|
||||||
]
|
]
|
||||||
when defined(testsPart2) or defined(testsAll):
|
when defined(testsPart2) or defined(testsAll):
|
||||||
cmds.add [
|
cmds.add [
|
||||||
"nim c -r --hints:off --verbosity:0 tests/discv5/test_discoveryv5.nim",
|
"nim c -r --hints:off --verbosity:0 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_encoding.nim",
|
||||||
]
|
]
|
||||||
|
|
||||||
echo "Running Test Commands: ", cmds
|
echo "Running Test Commands: ", cmds
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user