diff --git a/codexdht.nimble b/codexdht.nimble index 34085b1..990d045 100644 --- a/codexdht.nimble +++ b/codexdht.nimble @@ -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" diff --git a/tests/build.nims b/tests/build.nims index cd1f7ff..d871f6e 100644 --- a/tests/build.nims +++ b/tests/build.nims @@ -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" diff --git a/tests/coverage.nim b/tests/coverage.nim deleted file mode 100644 index e9146c9..0000000 --- a/tests/coverage.nim +++ /dev/null @@ -1,2 +0,0 @@ - -include ./testAll diff --git a/tests/coverage.nims b/tests/coverage.nims deleted file mode 100644 index f14fce4..0000000 --- a/tests/coverage.nims +++ /dev/null @@ -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") diff --git a/tests/testAllParallel.nim b/tests/testAllParallel.nim index f29c975..cbeeedb 100644 --- a/tests/testAllParallel.nim +++ b/tests/testAllParallel.nim @@ -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