mirror of
https://github.com/logos-storage/logos-storage-nim-dht.git
synced 2026-01-03 05:53:06 +00:00
27 lines
751 B
Nim
27 lines
751 B
Nim
# import
|
|
# ./dht/[test_providers, test_providermngr],
|
|
# ./discv5/[test_discoveryv5, test_discoveryv5_encoding]
|
|
|
|
import std/[os, osproc, strutils]
|
|
|
|
## we wanna get nimble paths if set
|
|
let nimblePaths = getEnv("NIMBLE_PATHS", "").split($PathSep & $PathSep).join(" ")
|
|
|
|
var cmds: seq[string]
|
|
for d in walkDirRec("tests", {pcDir}):
|
|
for (kind, file) in walkDir(d):
|
|
if kind == pcFile and file.endswith(".nim") and file.startsWith("t"):
|
|
cmds.add "nim c " & nimblePaths & " " & file.absolutePath.quoteShell()
|
|
|
|
when defined(testsPart1):
|
|
cmds = cmds[0..cmds.len div 2 - 1]
|
|
when defined(testsPart2):
|
|
cmds = cmds[cmds.len div 2 - 1..<cmds.len]
|
|
|
|
echo "Running Test Commands: "
|
|
for cmd in cmds:
|
|
echo "\t", cmd
|
|
echo ""
|
|
|
|
quit execProcesses(cmds)
|