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
This commit is contained in:
Timothee Cour 2021-03-12 06:45:51 -08:00 • committed by GitHub
commit c6f9c38892
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 185 additions and 211 deletions

View file

@ -10,11 +10,12 @@ jobs:
matrix: matrix:
os: [ubuntu-18.04, macos-10.15] os: [ubuntu-18.04, macos-10.15]
cpu: [amd64] cpu: [amd64]
pkg: [1, 2] batch: ["0_3", "1_3", "2_3"] # list of `index_num`
name: '${{ matrix.os }} (pkg: ${{ matrix.pkg }})' name: '${{ matrix.os }} (batch: ${{ matrix.batch }})'
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
env: env:
NIM_TEST_PACKAGES: ${{ matrix.pkg }} NIM_TEST_PACKAGES: "1"
NIM_TESTAMENT_BATCH: ${{ matrix.batch }}
steps: steps:
- name: 'Checkout' - name: 'Checkout'
uses: actions/checkout@v2 uses: actions/checkout@v2

View file

@ -531,10 +531,9 @@ proc runCI(cmd: string) =
## build nimble early on to enable remainder to depend on it if needed ## build nimble early on to enable remainder to depend on it if needed
kochExecFold("Build Nimble", "nimble") kochExecFold("Build Nimble", "nimble")
let batchParam = "--batch:$1" % "NIM_TESTAMENT_BATCH".getEnv("_")
if getEnv("NIM_TEST_PACKAGES", "0") == "1": if getEnv("NIM_TEST_PACKAGES", "0") == "1":
execFold("Test selected Nimble packages (1)", "nim c -r testament/testament cat nimble-packages-1") execFold("Test selected Nimble packages", "nim r testament/testament $# pcat nimble-packages" % batchParam)
elif getEnv("NIM_TEST_PACKAGES", "0") == "2":
execFold("Test selected Nimble packages (2)", "nim c -r testament/testament cat nimble-packages-2")
else: else:
buildTools() buildTools()
@ -551,11 +550,9 @@ proc runCI(cmd: string) =
execFold("Compile tester", "nim c -d:nimCoroutines --os:genode -d:posix --compileOnly testament/testament") execFold("Compile tester", "nim c -d:nimCoroutines --os:genode -d:posix --compileOnly testament/testament")
# main bottleneck here # main bottleneck here
# xxx: even though this is the main bottlneck, we could use same code to batch the other tests # 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
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 $# all -d:nimCoroutines" % batchParam)
]#
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("_")])
block CT_FFI: block CT_FFI:
when defined(posix): # windows can be handled in future PR's when defined(posix): # windows can be handled in future PR's

View file

@ -30,8 +30,7 @@ const
"lib", "lib",
"longgc", "longgc",
"manyloc", "manyloc",
"nimble-packages-1", "nimble-packages",
"nimble-packages-2",
"niminaction", "niminaction",
"threads", "threads",
"untestable", # see trunner_special "untestable", # see trunner_special
@ -400,67 +399,48 @@ proc testStdlib(r: var TResults, pattern, options: string, cat: Category) =
testSpec r, testObj testSpec r, testObj
# ----------------------------- nimble ---------------------------------------- # ----------------------------- nimble ----------------------------------------
proc listPackages(packageFilter: string): seq[NimblePackage] =
var nimbleDir = getEnv("NIMBLE_DIR") # xxx document `packageFilter`, seems like a bad API (at least should be a regex; a substring match makes no sense)
if nimbleDir.len == 0: nimbleDir = getHomeDir() / ".nimble" var nimbleDir = getEnv("NIMBLE_DIR")
let if nimbleDir.len == 0: nimbleDir = getHomeDir() / ".nimble"
nimbleExe = findExe("nimble") let packageIndex = nimbleDir / "packages_official.json"
packageIndex = nimbleDir / "packages_official.json"
type
PkgPart = enum
ppOne
ppTwo
iterator listPackages(part: PkgPart): tuple[name, cmd, url: string, useHead: bool] =
let packageList = parseFile(packageIndex) let packageList = parseFile(packageIndex)
let importantList = proc findPackage(name: string): JsonNode =
case part for a in packageList:
of ppOne: important_packages.packages1 if a["name"].str == name: return a
of ppTwo: important_packages.packages2 for pkg in important_packages.packages.items:
for n, cmd, url, useHead in importantList.items: if isCurrentBatch(testamentData0, pkg.name) and packageFilter in pkg.name:
if url.len != 0: var pkg = pkg
yield (n, cmd, url, useHead) if pkg.url.len == 0:
else: let pkg2 = findPackage(pkg.name)
var found = false if pkg2 == nil:
for package in packageList.items: raise newException(ValueError, "Cannot find package '$#'." % pkg.name)
let name = package["name"].str pkg.url = pkg2["url"].str
if name == n: result.add pkg
found = true
let pUrl = package["url"].str
yield (name, cmd, pUrl, useHead)
break
if not found:
raise newException(ValueError, "Cannot find package '$#'." % n)
proc makeSupTest(test, options: string, cat: Category): TTest = proc makeSupTest(test, options: string, cat: Category, debugInfo = ""): TTest =
result.cat = cat result.cat = cat
result.name = test result.name = test
result.options = options result.options = options
result.debugInfo = debugInfo
result.startTime = epochTime() result.startTime = epochTime()
import std/private/gitutils import std/private/gitutils
proc testNimblePackages(r: var TResults; cat: Category; packageFilter: string, part: PkgPart) = proc testNimblePackages(r: var TResults; cat: Category; packageFilter: string) =
if nimbleExe == "": let nimbleExe = findExe("nimble")
echo "[Warning] - Cannot run nimble tests: Nimble binary not found." doAssert nimbleExe != "", "Cannot run nimble tests: Nimble binary not found."
return doAssert execCmd("$# update" % nimbleExe) == 0, "Cannot run nimble tests: Nimble update failed."
if execCmd("$# update" % nimbleExe) == QuitFailure:
echo "[Warning] - Cannot run nimble tests: Nimble update failed."
return
let packageFileTest = makeSupTest("PackageFileParsed", "", cat) let packageFileTest = makeSupTest("PackageFileParsed", "", cat)
let packagesDir = "pkgstemp" let packagesDir = "pkgstemp"
createDir(packagesDir) createDir(packagesDir)
var errors = 0 var errors = 0
try: try:
for name, cmd, url, useHead in listPackages(part): let pkgs = listPackages(packageFilter)
if packageFilter notin name: for i, pkg in pkgs:
continue
inc r.total inc r.total
var test = makeSupTest(name, "", cat) var test = makeSupTest(pkg.name, "", cat, "[$#/$#] " % [$i, $pkgs.len])
let buildPath = packagesDir / name let buildPath = packagesDir / pkg.name
template tryCommand(cmd: string, workingDir2 = buildPath, reFailed = reInstallFailed, maxRetries = 1): string = template tryCommand(cmd: string, workingDir2 = buildPath, reFailed = reInstallFailed, maxRetries = 1): string =
var outp: string var outp: string
let ok = retryCall(maxRetry = maxRetries, backoffDuration = 1.0): let ok = retryCall(maxRetry = maxRetries, backoffDuration = 1.0):
@ -473,13 +453,13 @@ proc testNimblePackages(r: var TResults; cat: Category; packageFilter: string, p
outp outp
if not dirExists(buildPath): if not dirExists(buildPath):
discard tryCommand("git clone $# $#" % [url.quoteShell, buildPath.quoteShell], workingDir2 = ".", maxRetries = 3) discard tryCommand("git clone $# $#" % [pkg.url.quoteShell, buildPath.quoteShell], workingDir2 = ".", maxRetries = 3)
if not useHead: if not pkg.useHead:
discard tryCommand("git fetch --tags", maxRetries = 3) discard tryCommand("git fetch --tags", maxRetries = 3)
let describeOutput = tryCommand("git describe --tags --abbrev=0") let describeOutput = tryCommand("git describe --tags --abbrev=0")
discard tryCommand("git checkout $#" % [describeOutput.strip.quoteShell]) discard tryCommand("git checkout $#" % [describeOutput.strip.quoteShell])
discard tryCommand("nimble install --depsOnly -y", maxRetries = 3) discard tryCommand("nimble install --depsOnly -y", maxRetries = 3)
discard tryCommand(cmd, reFailed = reBuildFailed) discard tryCommand(pkg.cmd, reFailed = reBuildFailed)
inc r.passed inc r.passed
r.addResult(test, targetC, "", "", reSuccess) r.addResult(test, targetC, "", "", reSuccess)
@ -701,10 +681,8 @@ proc processCategory(r: var TResults, cat: Category,
compileExample(r, "examples/*.nim", options, cat) compileExample(r, "examples/*.nim", options, cat)
compileExample(r, "examples/gtk/*.nim", options, cat) compileExample(r, "examples/gtk/*.nim", options, cat)
compileExample(r, "examples/talk/*.nim", options, cat) compileExample(r, "examples/talk/*.nim", options, cat)
of "nimble-packages-1": of "nimble-packages":
testNimblePackages(r, cat, options, ppOne) testNimblePackages(r, cat, options)
of "nimble-packages-2":
testNimblePackages(r, cat, options, ppTwo)
of "niminaction": of "niminaction":
testNimInAction(r, cat, options) testNimInAction(r, cat, options)
of "ic": of "ic":

View file

@ -1,5 +1,5 @@
##[ ##[
## note ## note 1
`useHead` should ideally be used as the default but lots of packages (e.g. `chronos`) `useHead` should ideally be used as the default but lots of packages (e.g. `chronos`)
don't have release tags (or have really old ones compared to HEAD), making it don't have release tags (or have really old ones compared to HEAD), making it
impossible to test them reliably here. impossible to test them reliably here.
@ -7,153 +7,150 @@ impossible to test them reliably here.
packages listed here should ideally have regularly updated release tags, so that: packages listed here should ideally have regularly updated release tags, so that:
* we're testing recent versions of the package * we're testing recent versions of the package
* the version that's tested is stable enough even if HEAD may occasionally break * the version that's tested is stable enough even if HEAD may occasionally break
## note 2: D20210308T165435:here
nimble packages should be testable as follows:
git clone $url $dir && cd $dir
NIMBLE_DIR=$TMP_NIMBLE_DIR XDG_CONFIG_HOME= nimble install --depsOnly -y
NIMBLE_DIR=$TMP_NIMBLE_DIR XDG_CONFIG_HOME= nimble test
if this fails (e.g. nimcrypto), it could be because a package lacks a `tests/nim.cfg` with `--path:..`,
so the above commands would've worked by accident with `nimble install` but not with `nimble install --depsOnly`.
When this is the case, a workaround is to test this package here by adding `--path:$srcDir` on the test `cmd`.
]## ]##
type NimblePackage* = object
name*, cmd*, url*: string
useHead*: bool
#[ var packages*: seq[NimblePackage]
xxx instead of pkg1, pkg2, use the more flexible `NIM_TESTAMENT_BATCH` (see #14823).
]#
template pkg1(name: string; cmd = "nimble test"; url = "", useHead = true): untyped = proc pkg(name: string; cmd = "nimble test"; url = "", useHead = true) =
packages1.add((name, cmd, url, useHead)) packages.add NimblePackage(name: name, cmd: cmd, url: url, useHead: useHead)
template pkg2(name: string; cmd = "nimble test"; url = "", useHead = true): untyped = # pkg "alea"
packages2.add((name, cmd, url, useHead)) pkg "argparse"
pkg "arraymancer", "nim c tests/tests_cpu.nim"
var packages1*: seq[tuple[name, cmd: string; url: string, useHead: bool]] = @[] # pkg "ast_pattern_matching", "nim c -r --oldgensym:on tests/test1.nim"
var packages2*: seq[tuple[name, cmd: string; url: string, useHead: bool]] = @[] pkg "awk"
pkg "bigints", url = "https://github.com/Araq/nim-bigints"
# packages A-M pkg "binaryheap", "nim c -r binaryheap.nim"
# pkg1 "alea" pkg "BipBuffer"
pkg1 "argparse" # pkg "blscurve" # pending https://github.com/status-im/nim-blscurve/issues/39
pkg1 "arraymancer", "nim c tests/tests_cpu.nim" pkg "bncurve"
# pkg1 "ast_pattern_matching", "nim c -r --oldgensym:on tests/test1.nim" pkg "brainfuck", "nim c -d:release -r tests/compile.nim"
pkg1 "awk" pkg "bump", "nim c --gc:arc --path:. -r tests/tbump.nim", "https://github.com/disruptek/bump"
pkg1 "bigints", url = "https://github.com/Araq/nim-bigints" pkg "c2nim", "nim c testsuite/tester.nim"
pkg1 "binaryheap", "nim c -r binaryheap.nim" pkg "cascade"
pkg1 "BipBuffer" pkg "cello"
# pkg1 "blscurve" # pending https://github.com/status-im/nim-blscurve/issues/39 pkg "chroma"
pkg1 "bncurve" pkg "chronicles", "nim c -o:chr -r chronicles.nim"
pkg1 "brainfuck", "nim c -d:release -r tests/compile.nim"
pkg1 "bump", "nim c --gc:arc --path:. -r tests/tbump.nim", "https://github.com/disruptek/bump"
pkg1 "c2nim", "nim c testsuite/tester.nim"
pkg1 "cascade"
pkg1 "cello"
pkg1 "chroma"
pkg1 "chronicles", "nim c -o:chr -r chronicles.nim"
# when not defined(osx): # testdatagram.nim(560, 54): Check failed # when not defined(osx): # testdatagram.nim(560, 54): Check failed
# pkg1 "chronos", "nim c -r -d:release tests/testall" # pkg "chronos", "nim c -r -d:release tests/testall"
# pending https://github.com/nim-lang/Nim/issues/17130 # pending https://github.com/nim-lang/Nim/issues/17130
pkg1 "cligen", "nim c --path:. -r cligen.nim" pkg "cligen", "nim c --path:. -r cligen.nim"
pkg1 "combparser", "nimble test --gc:orc" pkg "combparser", "nimble test --gc:orc"
pkg1 "compactdict" pkg "compactdict"
pkg1 "comprehension", "nimble test", "https://github.com/alehander42/comprehension" pkg "comprehension", "nimble test", "https://github.com/alehander42/comprehension"
# pkg1 "criterion" # pending https://github.com/disruptek/criterion/issues/3 (wrongly closed) # pkg "criterion" # pending https://github.com/disruptek/criterion/issues/3 (wrongly closed)
pkg1 "dashing", "nim c tests/functional.nim" pkg "dashing", "nim c tests/functional.nim"
pkg1 "delaunay" pkg "delaunay"
pkg1 "docopt" pkg "docopt"
pkg1 "easygl", "nim c -o:egl -r src/easygl.nim", "https://github.com/jackmott/easygl" pkg "easygl", "nim c -o:egl -r src/easygl.nim", "https://github.com/jackmott/easygl"
pkg1 "elvis" pkg "elvis"
# pkg1 "fidget" # pending https://github.com/treeform/fidget/issues/133 # pkg "fidget" # pending https://github.com/treeform/fidget/issues/133
pkg1 "fragments", "nim c -r fragments/dsl.nim" pkg "fragments", "nim c -r fragments/dsl.nim"
pkg1 "fusion" pkg "fusion"
pkg1 "gara" pkg "gara"
pkg1 "glob" pkg "glob"
pkg1 "ggplotnim", "nim c -d:noCairo -r tests/tests.nim" pkg "ggplotnim", "nim c -d:noCairo -r tests/tests.nim"
# pkg1 "gittyup", "nimble test", "https://github.com/disruptek/gittyup" # pkg "gittyup", "nimble test", "https://github.com/disruptek/gittyup"
pkg1 "gnuplot", "nim c gnuplot.nim" pkg "gnuplot", "nim c gnuplot.nim"
# pkg1 "gram", "nim c -r --gc:arc --define:danger tests/test.nim", "https://github.com/disruptek/gram" # pkg "gram", "nim c -r --gc:arc --define:danger tests/test.nim", "https://github.com/disruptek/gram"
# pending https://github.com/nim-lang/Nim/issues/16509 # pending https://github.com/nim-lang/Nim/issues/16509
pkg1 "hts", "nim c -o:htss src/hts.nim" pkg "hts", "nim c -o:htss src/hts.nim"
# pkg1 "httpauth" # pkg "httpauth"
pkg1 "illwill", "nimble examples" pkg "illwill", "nimble examples"
pkg1 "inim" pkg "inim"
pkg1 "itertools", "nim doc src/itertools.nim" pkg "itertools", "nim doc src/itertools.nim"
pkg1 "iterutils" pkg "iterutils"
pkg1 "jstin" pkg "jstin"
pkg1 "karax", "nim c -r tests/tester.nim" pkg "karax", "nim c -r tests/tester.nim"
pkg1 "kdtree", "nimble test", "https://github.com/jblindsay/kdtree" pkg "kdtree", "nimble test", "https://github.com/jblindsay/kdtree"
pkg1 "loopfusion" pkg "loopfusion"
pkg1 "macroutils" pkg "macroutils"
pkg1 "manu" pkg "manu"
pkg1 "markdown" pkg "markdown"
pkg1 "memo" pkg "memo"
pkg1 "msgpack4nim", "nim c -r tests/test_spec.nim" pkg "msgpack4nim", "nim c -r tests/test_spec.nim"
pkg "nake", "nim c nakefile.nim"
# these two are special snowflakes pkg "neo", "nim c -d:blas=openblas tests/all.nim"
pkg1 "nimcrypto", "nim c -r tests/testall.nim" # pkg "nesm", "nimble tests" # notice plural 'tests'
pkg1 "stint", "nim c -o:stintt -r stint.nim" # pkg "nico"
pkg "nicy", "nim c -r src/nicy.nim"
pkg "nigui", "nim c -o:niguii -r src/nigui.nim"
# packages N-Z pkg "nimcrypto", "nim r --path:. tests/testall.nim" # `--path:.` workaround needed, see D20210308T165435
pkg2 "nake", "nim c nakefile.nim" pkg "NimData", "nim c -o:nimdataa src/nimdata.nim"
pkg2 "neo", "nim c -d:blas=openblas tests/all.nim" pkg "nimes", "nim c src/nimes.nim"
# pkg2 "nesm", "nimble tests" # notice plural 'tests' pkg "nimfp", "nim c -o:nfp -r src/fp.nim"
# pkg2 "nico" # pkg "nimgame2", "nim c nimgame2/nimgame.nim" # XXX Doesn't work with deprecated 'randomize', will create a PR.
pkg2 "nicy", "nim c -r src/nicy.nim" pkg "nimgen", "nim c -o:nimgenn -r src/nimgen/runcfg.nim"
pkg2 "nigui", "nim c -o:niguii -r src/nigui.nim" pkg "nimlsp"
pkg2 "NimData", "nim c -o:nimdataa src/nimdata.nim" pkg "nimly", "nim c -r tests/test_readme_example.nim"
pkg2 "nimes", "nim c src/nimes.nim" # pkg "nimongo", "nimble test_ci"
pkg2 "nimfp", "nim c -o:nfp -r src/fp.nim" # pkg "nimph", "nimble test", "https://github.com/disruptek/nimph"
when false: pkg "nimpy", "nim c -r tests/nimfrompy.nim"
pkg2 "nimgame2", "nim c nimgame2/nimgame.nim" pkg "nimquery"
# XXX Doesn't work with deprecated 'randomize', will create a PR. pkg "nimsl"
pkg2 "nimgen", "nim c -o:nimgenn -r src/nimgen/runcfg.nim" pkg "nimsvg"
pkg2 "nimlsp" pkg "nimterop", "nimble minitest"
pkg2 "nimly", "nim c -r tests/test_readme_example.nim" pkg "nimwc", "nim c nimwc.nim"
# pkg2 "nimongo", "nimble test_ci" # pkg "nimx", "nim c --threads:on test/main.nim"
# pkg2 "nimph", "nimble test", "https://github.com/disruptek/nimph" # pkg "nitter", "nim c src/nitter.nim", "https://github.com/zedeus/nitter"
pkg2 "nimpy", "nim c -r tests/nimfrompy.nim" pkg "norm", "nim c -r tests/sqlite/trows.nim"
pkg2 "nimquery" pkg "npeg", "nimble testarc"
pkg2 "nimsl" pkg "numericalnim", "nim c -r tests/test_integrate.nim"
pkg2 "nimsvg" pkg "optionsutils"
pkg2 "nimterop", "nimble minitest" pkg "ormin", "nim c -o:orminn ormin.nim"
pkg2 "nimwc", "nim c nimwc.nim" pkg "parsetoml"
# pkg2 "nimx", "nim c --threads:on test/main.nim" pkg "patty"
# pkg2 "nitter", "nim c src/nitter.nim", "https://github.com/zedeus/nitter" pkg "pixie", useHead = false
pkg2 "norm", "nim c -r tests/sqlite/trows.nim" pkg "plotly", "nim c examples/all.nim"
pkg2 "npeg", "nimble testarc" pkg "pnm"
pkg2 "numericalnim", "nim c -r tests/test_integrate.nim" pkg "polypbren"
pkg2 "optionsutils" pkg "prologue", "nimble tcompile"
pkg2 "ormin", "nim c -o:orminn ormin.nim" pkg "protobuf", "nim c -o:protobuff -r src/protobuf.nim"
pkg2 "parsetoml" pkg "pylib"
pkg2 "patty" pkg "rbtree"
pkg2 "pixie", useHead = false pkg "react", "nimble example"
pkg2 "plotly", "nim c examples/all.nim" pkg "regex", "nim c src/regex"
pkg2 "pnm" pkg "result", "nim c -r result.nim"
pkg2 "polypbren" pkg "RollingHash", "nim c -r tests/test_cyclichash.nim"
pkg2 "prologue", "nimble tcompile" pkg "rosencrantz", "nim c -o:rsncntz -r rosencrantz.nim"
pkg2 "protobuf", "nim c -o:protobuff -r src/protobuf.nim" pkg "sdl1", "nim c -r src/sdl.nim"
pkg2 "pylib" pkg "sdl2_nim", "nim c -r sdl2/sdl.nim"
pkg2 "rbtree" pkg "sigv4", "nim c --gc:arc -r sigv4.nim", "https://github.com/disruptek/sigv4"
pkg2 "react", "nimble example" pkg "snip", "nimble test", "https://github.com/genotrance/snip"
pkg2 "regex", "nim c src/regex" pkg "stint", "nim r stint.nim"
pkg2 "result", "nim c -r result.nim" pkg "strslice"
pkg2 "RollingHash", "nim c -r tests/test_cyclichash.nim" pkg "strunicode", "nim c -r src/strunicode.nim"
pkg2 "rosencrantz", "nim c -o:rsncntz -r rosencrantz.nim" pkg "synthesis"
pkg2 "sdl1", "nim c -r src/sdl.nim" pkg "telebot", "nim c -o:tbot -r src/telebot.nim"
pkg2 "sdl2_nim", "nim c -r sdl2/sdl.nim" pkg "tempdir"
pkg2 "sigv4", "nim c --gc:arc -r sigv4.nim", "https://github.com/disruptek/sigv4" pkg "templates"
pkg2 "snip", "nimble test", "https://github.com/genotrance/snip" pkg "tensordsl", "nim c -r tests/tests.nim", "https://krux02@bitbucket.org/krux02/tensordslnim.git"
pkg2 "strslice" pkg "terminaltables", "nim c src/terminaltables.nim"
pkg2 "strunicode", "nim c -r src/strunicode.nim" pkg "termstyle", "nim c -r termstyle.nim"
pkg2 "synthesis" pkg "timeit"
pkg2 "telebot", "nim c -o:tbot -r src/telebot.nim" pkg "timezones"
pkg2 "tempdir" pkg "tiny_sqlite"
pkg2 "templates" pkg "unicodedb", "nim c -d:release -r tests/tests.nim"
pkg2 "tensordsl", "nim c -r tests/tests.nim", "https://krux02@bitbucket.org/krux02/tensordslnim.git" pkg "unicodeplus", "nim c -d:release -r tests/tests.nim"
pkg2 "terminaltables", "nim c src/terminaltables.nim" pkg "unpack"
pkg2 "termstyle", "nim c -r termstyle.nim" pkg "websocket", "nim c websocket.nim"
pkg2 "timeit" # pkg "winim"
pkg2 "timezones" pkg "with"
pkg2 "tiny_sqlite" pkg "ws"
pkg2 "unicodedb", "nim c -d:release -r tests/tests.nim" pkg "yaml", "nim build"
pkg2 "unicodeplus", "nim c -d:release -r tests/tests.nim" pkg "zero_functional", "nim c -r -d:nimWorkaround14447 test.nim"
pkg2 "unpack" pkg "zippy"
pkg2 "websocket", "nim c websocket.nim"
# pkg2 "winim"
pkg2 "with"
pkg2 "ws"
pkg2 "yaml", "nim build"
pkg2 "zero_functional", "nim c -r -d:nimWorkaround14447 test.nim"
pkg2 "zippy"

View file

@ -230,7 +230,7 @@ proc addLine*(self: var string; a, b: string) =
proc initSpec*(filename: string): TSpec = proc initSpec*(filename: string): TSpec =
result.file = filename result.file = filename
proc isCurrentBatch(testamentData: TestamentData; filename: string): bool = proc isCurrentBatch*(testamentData: TestamentData; filename: string): bool =
if testamentData.testamentNumBatch != 0: if testamentData.testamentNumBatch != 0:
hash(filename) mod testamentData.testamentNumBatch == testamentData.testamentBatch hash(filename) mod testamentData.testamentNumBatch == testamentData.testamentBatch
else: else:

View file

@ -76,6 +76,7 @@ type
args: seq[string] args: seq[string]
spec: TSpec spec: TSpec
startTime: float startTime: float
debugInfo: string
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
@ -285,7 +286,7 @@ proc addResult(r: var TResults, test: TTest, target: TTarget,
template disp(msg) = template disp(msg) =
maybeStyledEcho styleDim, fgYellow, msg & ' ', styleBright, fgCyan, name maybeStyledEcho styleDim, fgYellow, msg & ' ', styleBright, fgCyan, name
if success == reSuccess: if success == reSuccess:
maybeStyledEcho fgGreen, "PASS: ", fgCyan, alignLeft(name, 60), fgBlue, " (", durationStr, " sec)" maybeStyledEcho fgGreen, "PASS: ", fgCyan, test.debugInfo, alignLeft(name, 60), fgBlue, " (", durationStr, " sec)"
elif success == reDisabled: elif success == reDisabled:
if test.spec.inCurrentBatch: disp("SKIP:") if test.spec.inCurrentBatch: disp("SKIP:")
else: disp("NOTINBATCH:") else: disp("NOTINBATCH:")