Merge branch 'devel' into pr_remove_macros

This commit is contained in:
ringabout
2024-08-14 15:17:53 +08:00
committed by GitHub
251 changed files with 6721 additions and 10708 deletions

View File

@@ -58,15 +58,19 @@ pkg "cligen", "nim c --path:. -r cligen.nim"
pkg "combparser", "nimble test --mm:orc"
pkg "compactdict"
pkg "comprehension", "nimble test", "https://github.com/alehander92/comprehension"
pkg "constantine", "nimble make_lib"
pkg "cowstrings"
pkg "criterion", allowFailure = true # needs testing binary
pkg "datamancer"
pkg "dashing", "nim c tests/functional.nim"
pkg "delaunay"
pkg "dnsclient", allowFailure = true # super fragile
pkg "docopt"
pkg "dotenv"
# when defined(linux): pkg "drchaos"
pkg "easygl", "nim c -o:egl -r src/easygl.nim", "https://github.com/jackmott/easygl"
pkg "elvis"
pkg "faststreams"
pkg "fidget"
pkg "fragments", "nim c -r fragments/dsl.nim", allowFailure = true # pending https://github.com/nim-lang/packages/issues/2115
pkg "fusion"
@@ -79,10 +83,13 @@ pkg "gnuplot", "nim c gnuplot.nim"
# pending https://github.com/nim-lang/Nim/issues/16509
pkg "hts", "nim c -o:htss src/hts.nim"
pkg "httpauth"
pkg "httputils"
pkg "illwill", "nimble examples"
pkg "inim"
pkg "itertools", "nim doc src/itertools.nim"
pkg "iterutils"
pkg "json_rpc"
pkg "json_serialization"
pkg "jstin"
pkg "karax", "nim c -r tests/tester.nim"
pkg "kdtree", "nimble test -d:nimLegacyRandomInitRand", "https://github.com/jblindsay/kdtree"
@@ -124,6 +131,7 @@ pkg "nimwc", "nim c nimwc.nim"
pkg "nimx", "nim c test/main.nim", allowFailure = true
pkg "nitter", "nim c src/nitter.nim", "https://github.com/zedeus/nitter"
pkg "norm", "testament r tests/common/tmodel.nim"
pkg "normalize"
pkg "npeg", "nimble testarc"
pkg "numericalnim", "nimble nimCI"
pkg "optionsutils"
@@ -134,9 +142,9 @@ pkg "pixie"
pkg "plotly", "nim c examples/all.nim"
pkg "pnm"
pkg "polypbren"
pkg "presto"
pkg "prologue", "nimble tcompile"
pkg "protobuf", "nim c -o:protobuff -r src/protobuf.nim"
pkg "pylib"
pkg "rbtree"
pkg "react", "nimble example"
pkg "regex", "nim c src/regex"
@@ -145,6 +153,7 @@ pkg "RollingHash", "nim c -r tests/test_cyclichash.nim"
pkg "rosencrantz", "nim c -o:rsncntz -r rosencrantz.nim"
pkg "sdl1", "nim c -r src/sdl.nim"
pkg "sdl2_nim", "nim c -r sdl2/sdl.nim"
pkg "serialization"
pkg "sigv4", "nim c --mm:arc -r sigv4.nim", "https://github.com/disruptek/sigv4"
pkg "sim"
pkg "smtp", "nimble compileExample"
@@ -163,18 +172,22 @@ pkg "templates"
# pkg "tensordsl", "nim c -r --mm:refc tests/tests.nim", "https://krux02@bitbucket.org/krux02/tensordslnim.git"
pkg "terminaltables", "nim c src/terminaltables.nim"
pkg "termstyle", "nim c -r termstyle.nim"
pkg "testutils"
pkg "timeit"
pkg "timezones"
pkg "tiny_sqlite"
pkg "unicodedb", "nim c -d:release -r tests/tests.nim"
pkg "unicodeplus", "nim c -d:release -r tests/tests.nim"
pkg "union", "nim c -r tests/treadme.nim", url = "https://github.com/alaviss/union"
pkg "unittest2"
pkg "unpack"
pkg "weave", "nimble test_gc_arc", useHead = true
pkg "websock"
pkg "websocket", "nim c websocket.nim"
pkg "winim", "nim c winim.nim"
# pkg "winim", allowFailure = true
pkg "with"
pkg "ws", allowFailure = true
pkg "yaml"
pkg "zero_functional", "nim c -r test.nim"
pkg "zippy"
pkg "zxcvbn"

View File

@@ -10,9 +10,12 @@
## This program verifies Nim against the testcases.
import
strutils, pegs, os, osproc, streams, json, std/exitprocs,
backend, parseopt, specs, htmlgen, browsers, terminal,
algorithm, times, azure, intsets, macros
std/[strutils, pegs, os, osproc, streams, json,
parseopt, browsers, terminal, exitprocs,
algorithm, times, intsets, macros]
import backend, specs, azure, htmlgen
from std/sugar import dup
import compiler/nodejs
import lib/stdtest/testutils
@@ -528,6 +531,23 @@ proc testSpecHelper(r: var TResults, test: var TTest, expected: TSpec,
"exitcode: " & $given.exitCode & "\n\nOutput:\n" &
given.nimout, reExitcodesDiffer)
proc changeTarget(extraOptions: string; defaultTarget: TTarget): TTarget =
result = defaultTarget
var p = parseopt.initOptParser(extraOptions)
while true:
parseopt.next(p)
case p.kind
of cmdEnd: break
of cmdLongOption, cmdShortOption:
if p.key == "b" or p.key == "backend":
result = parseEnum[TTarget](p.val.normalize)
# chooses the last one
else:
discard
proc targetHelper(r: var TResults, test: TTest, expected: TSpec, extraOptions: string) =
for target in expected.targets:
inc(r.total)
@@ -540,6 +560,7 @@ proc targetHelper(r: var TResults, test: TTest, expected: TSpec, extraOptions: s
else:
let nimcache = nimcacheDir(test.name, test.options, target)
var testClone = test
let target = changeTarget(extraOptions, target)
testSpecHelper(r, testClone, expected, target, extraOptions, nimcache)
proc testSpec(r: var TResults, test: TTest, targets: set[TTarget] = {}) =