diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-07-11 21:36:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-11 21:36:23 +0200 |
commit | 3d88d06b32d1337fda45d419e9cd2ad845b74d5d (patch) | |
tree | 195ec50d46fe2cd4403e46286adb7829737bdbf1 /nimdoc/tester.nim | |
parent | b8be1ccb855f8bde82ed1721e4231119ffa48e9f (diff) | |
download | Nim-3d88d06b32d1337fda45d419e9cd2ad845b74d5d.tar.gz |
better run [feature] (#11709)
* track the checksums of all involved Nim files for smarter 'nim c -r' recompiles * don't recompile unless necessary for 'nim c -r' [feature] * [feature] koch boot uses a two step process in order to free the RAM before the GCC/Clang invocations * fixes a serious regression
Diffstat (limited to 'nimdoc/tester.nim')
-rw-r--r-- | nimdoc/tester.nim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/nimdoc/tester.nim b/nimdoc/tester.nim index 43e146faf..a1500455e 100644 --- a/nimdoc/tester.nim +++ b/nimdoc/tester.nim @@ -14,6 +14,10 @@ type doc: seq[string] buildIndex: seq[string] +proc exec(cmd: string) = + if execShellCmd(cmd) != 0: + quit("FAILURE: " & cmd) + proc testNimDoc(prjDir, docsDir: string; switches: NimSwitches; fixup = false) = let nimDocSwitches = switches.doc.join(" ") @@ -22,12 +26,10 @@ proc testNimDoc(prjDir, docsDir: string; switches: NimSwitches; fixup = false) = putEnv("SOURCE_DATE_EPOCH", "100000") if nimDocSwitches != "": - if execShellCmd("nim doc $1" % [nimDocSwitches]) != 0: - quit("FAILURE: nim doc failed") + exec("nim doc $1" % [nimDocSwitches]) if nimBuildIndexSwitches != "": - if execShellCmd("nim buildIndex $1" % [nimBuildIndexSwitches]) != 0: - quit("FAILURE: nim buildIndex failed") + exec("nim buildIndex $1" % [nimBuildIndexSwitches]) for expected in walkDirRec(prjDir / "expected/"): let produced = expected.replace('\\', '/').replace("/expected/", "/$1/" % [docsDir]) |