diff --git a/codexdht.nimble b/codexdht.nimble index fe03720..01e8be3 100644 --- a/codexdht.nimble +++ b/codexdht.nimble @@ -5,7 +5,6 @@ author = "Status Research & Development GmbH" description = "DHT based on Eth discv5 implementation" license = "MIT" skipDirs = @["tests"] -installFiles = @["build.nims"] # Dependencies requires "nim >= 1.6.18" @@ -20,9 +19,30 @@ requires "libp2p#cde5ed7e8ccc3b452878db4c82c6f2f2e70d28f4" requires "metrics" requires "stew#head" requires "stint" -requires "asynctest#12c356672d26053ddc4c1443491e9eee65ec03a2" requires "https://github.com/codex-storage/nim-datastore#042173085fe6ec035c8159e6c7cbcc149bab5213" requires "questionable" -include "build.nims" - \ No newline at end of file +task testAll, "Run all test suites": + exec "nimble install -d -y" + withDir "testmodule": + exec "nimble testAll" + +task test, "Run the test suite": + exec "nimble install -d -y" + withDir "testmodule": + exec "nimble test" + +task testPart1, "Run the test suite part 1": + exec "nimble install -d -y" + withDir "testmodule": + exec "nimble testPart1" + +task testPart2, "Run the test suite part 2": + exec "nimble install -d -y" + withDir "testmodule": + exec "nimble testPart2" + +task coverage, "Run the test coverage": + exec "nimble install -d -y" + withDir "testmodule": + exec "nimble coverage" diff --git a/build.nims b/tests/build.nims similarity index 100% rename from build.nims rename to tests/build.nims diff --git a/tests/test.nimble b/tests/test.nimble new file mode 100644 index 0000000..a88bfa1 --- /dev/null +++ b/tests/test.nimble @@ -0,0 +1,11 @@ +# Package + +version = "0.4.0" +author = "Status Research & Development GmbH" +description = "Tests for Codex DHT" +license = "MIT" + +# Dependencies +requires "asynctest >= 0.5.3 & < 0.6.0" + +include "build.nims"