mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-05 15:08:44 +00:00
make tests green
This commit is contained in:
@@ -74,6 +74,18 @@ proc parseTest(filename: string; epcMode=false): Test =
|
||||
# else: ignore empty lines for better readability of the specs
|
||||
inc i
|
||||
tmp.close()
|
||||
# Give every run a private, freshly-wiped NIF cache. Under IC nimsuggest reuses
|
||||
# the on-disk NIFs of a previous session, but per-symbol usage counts are not
|
||||
# serialized, so a warm start ranks `sug`/`con` results differently than a cold
|
||||
# one (e.g. `string` outranks `int` because `system` was loaded, not re-walked).
|
||||
# The tester runs the stdio and EPC variants of a test as two processes sharing
|
||||
# the same temp project name — without isolation the second inherits the first's
|
||||
# NIFs and the result order flips. A dedicated, cleared cache keeps both cold and
|
||||
# deterministic.
|
||||
let nimcache = getTempDir() / ("nimsuggest_cache_" &
|
||||
extractFilename(result.dest).changeFileExt("") & (if epcMode: "_epc" else: "_stdin"))
|
||||
removeDir(nimcache)
|
||||
result.cmd.add " --nimcache:" & nimcache
|
||||
# now that we know the markers, substitute them:
|
||||
for a in mitems(result.script):
|
||||
a[0] = a[0] % markers
|
||||
|
||||
Reference in New Issue
Block a user