summary refs log tree commit diff stats
path: root/koch.nim
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-03-12 06:45:51 -0800
committerGitHub <noreply@github.com>2021-03-12 15:45:51 +0100
commitc6f9c38892a6351d2bfd0c796bbb6b10b3a68a96 (patch)
tree8a2f7deb879d8a01fdaf6ce315a0805167b1c8d1 /koch.nim
parent4f0bac791a3d8ae198d8bbbbed29410d3d7d3d7c (diff)
downloadNim-c6f9c38892a6351d2bfd0c796bbb6b10b3a68a96.tar.gz
use NIM_TESTAMENT_BATCH for important_packages, improve formatting, code cleanups (#17301)
* use NIM_TESTAMENT_BATCH for important_packages, improve formatting, code cleanups
* workaround for nimcrypto not having `--path:.`; remove workaround "two are special snowflakes"
* add comment explaining why nimcrypto fails and what packages need to be testable
Diffstat (limited to 'koch.nim')
-rw-r--r--koch.nim13
1 files changed, 5 insertions, 8 deletions
diff --git a/koch.nim b/koch.nim
index 973f21b9d..03e4a9d00 100644
--- a/koch.nim
+++ b/koch.nim
@@ -531,10 +531,9 @@ proc runCI(cmd: string) =
   ## build nimble early on to enable remainder to depend on it if needed
   kochExecFold("Build Nimble", "nimble")
 
+  let batchParam = "--batch:$1" % "NIM_TESTAMENT_BATCH".getEnv("_")
   if getEnv("NIM_TEST_PACKAGES", "0") == "1":
-    execFold("Test selected Nimble packages (1)", "nim c -r testament/testament cat nimble-packages-1")
-  elif getEnv("NIM_TEST_PACKAGES", "0") == "2":
-    execFold("Test selected Nimble packages (2)", "nim c -r testament/testament cat nimble-packages-2")
+    execFold("Test selected Nimble packages", "nim r testament/testament $# pcat nimble-packages" % batchParam)
   else:
     buildTools()
 
@@ -551,11 +550,9 @@ proc runCI(cmd: string) =
       execFold("Compile tester", "nim c -d:nimCoroutines --os:genode -d:posix --compileOnly testament/testament")
 
     # main bottleneck here
-    # xxx: even though this is the main bottlneck, we could use same code to batch the other tests
-    #[
-    BUG: with initOptParser, `--batch:'' all` interprets `all` as the argument of --batch
-    ]#
-    execFold("Run tester", "nim c -r -d:nimCoroutines --putenv:NIM_TESTAMENT_REMOTE_NETWORKING:1 -d:nimStrictMode testament/testament --batch:$1 all -d:nimCoroutines" % ["NIM_TESTAMENT_BATCH".getEnv("_")])
+    # xxx: even though this is the main bottleneck, we could speedup the rest via batching with `--batch`.
+    # BUG: with initOptParser, `--batch:'' all` interprets `all` as the argument of --batch, pending bug #14343
+    execFold("Run tester", "nim c -r -d:nimCoroutines --putenv:NIM_TESTAMENT_REMOTE_NETWORKING:1 -d:nimStrictMode testament/testament $# all -d:nimCoroutines" % batchParam)
 
     block CT_FFI:
       when defined(posix): # windows can be handled in future PR's