From 71269839f7c76e6cd666d85bc1a1b32103db70a1 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Tue, 18 Jul 2023 15:49:26 -0700 Subject: [PATCH] setup to use env variable for parallel tests --- build.nims | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/build.nims b/build.nims index 155eddc..3dd35e7 100644 --- a/build.nims +++ b/build.nims @@ -1,10 +1,14 @@ -import std / [os, strutils, sequtils] +import std / [os, strutils] when declared(getPathsClause): - proc nimc(): string = "nim c " & getPathsClause() + proc nimc(): string = + # set this for compiling parallel tests + putEnv("NIMBLE_PATHS", getPathsClause().split(" ").join($PathSep & $PathSep)) + "nim c " & getPathsClause() else: - proc nimc(): string = "nim c" - proc getPathsClause(): string = "" + proc nimc(): string = + putEnv("NIMBLE_PATHS", "") + "nim c " switch("define", "libp2p_pki_schemes=secp256k1") @@ -12,7 +16,6 @@ task testAll, "Run DHT tests": exec nimc() & " -r tests/testAll.nim" task test, "Run DHT tests": - putEnv("NIMBLE_PATHS", getPathsClause().split(" ").join($PathSep & $PathSep)) exec nimc() & " -r -d:testsAll --verbosity:0 tests/testAllParallel.nim" task testPart1, "Run DHT tests A":