mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-05 23:13:10 +00:00
pathing in tests
This commit is contained in:
parent
a865b3242e
commit
2fd6c7dd03
@ -1,23 +1,23 @@
|
||||
import std / [os, strutils, sequtils]
|
||||
|
||||
task testAll, "Run DHT tests":
|
||||
exec "nim c -r tests/testAll.nim"
|
||||
rmFile "./tests/testAll"
|
||||
exec "nim c -r testAll.nim"
|
||||
rmFile "./testAll"
|
||||
|
||||
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 tests/testAll.nim"
|
||||
rmFile "./tests/testAll"
|
||||
exec "nim c -r -d:testsAll --verbosity:0 tests/testAllParallel.nim"
|
||||
rmFile "./tests/testAllParallel"
|
||||
exec "nim c -d:testsAll -d:chronicles_enabled=on -d:chronicles_log_level=TRACE testAll.nim"
|
||||
rmFile "./testAll"
|
||||
exec "nim c -r -d:testsAll --verbosity:0 testAllParallel.nim"
|
||||
rmFile "./testAllParallel"
|
||||
|
||||
task testPart1, "Run DHT tests A":
|
||||
exec "nim c -r -d:testsPart1 tests/testAllParallel.nim"
|
||||
rmFile "./tests/testAllParallel"
|
||||
exec "nim c -r -d:testsPart1 testAllParallel.nim"
|
||||
rmFile "./testAllParallel"
|
||||
|
||||
task testPart2, "Run DHT tests B":
|
||||
exec "nim c -r -d:testsPart2 tests/testAllParallel.nim"
|
||||
rmFile "./tests/testAllParallel"
|
||||
exec "nim c -r -d:testsPart2 testAllParallel.nim"
|
||||
rmFile "./testAllParallel"
|
||||
|
||||
task coverage, "generates code coverage report":
|
||||
var (output, exitCode) = gorgeEx("which lcov")
|
||||
@ -50,7 +50,7 @@ task coverage, "generates code coverage report":
|
||||
if f.endswith(".nim"): nimSrcs.add " " & f.absolutePath.quoteShell()
|
||||
|
||||
echo "======== Running Tests ======== "
|
||||
exec("nim c -r tests/coverage.nim")
|
||||
exec("nim c -r coverage.nim")
|
||||
exec("rm nimcache/*.c")
|
||||
rmDir("coverage"); mkDir("coverage")
|
||||
echo " ======== Running LCOV ======== "
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user