diff --git a/ethp2p.nimble b/ethp2p.nimble index b568130..31fb1e5 100644 --- a/ethp2p.nimble +++ b/ethp2p.nimble @@ -16,11 +16,19 @@ requires "nim > 0.18.0", "https://github.com/status-im/nim-stint", "https://github.com/status-im/nim-byteutils" -proc runTest(name: string, lang = "c") = exec "nim " & lang & " -r tests/" & name +proc runTest(name: string, lang = "c") = + if not dirExists "build": + mkDir "build" + if not dirExists "nimcache": + mkDir "nimcache" + --run + --nimcache: "nimcache" + switch("out", ("./build/" & name)) + setCommand lang, "tests/" & name & ".nim" task test, "Runs the test suite": runTest "testecies" runTest "testauth" runTest "testcrypt" runTest "testenode" - runTest("tdiscovery", "cpp") + runTest "tdiscovery"