diff --git a/nimsuggest/tester.nim b/nimsuggest/tester.nim index 96473fe52d4..2d30e8797b1 100644 --- a/nimsuggest/tester.nim +++ b/nimsuggest/tester.nim @@ -26,7 +26,6 @@ import std/compilesettings proc parseTest(filename: string; epcMode=false): Test = const cursorMarker = "#[!]#" let nimsug = "bin" / addFileExt("nimsuggest_testing", ExeExt) - doAssert nimsug.fileExists, nimsug const libpath = querySetting(libPath) result.filename = filename result.dest = getTempDir() / extractFilename(filename) @@ -345,6 +344,14 @@ proc runTest(filename: string): int = result = report.len proc main() = + let nimsug = "bin" / addFileExt("nimsuggest_testing", ExeExt) + if not nimsug.fileExists(): + # xxx: ideally compiling a test binary should be done in `koch` + const args = "c -o:bin/nimsuggest_testing -d:release nimsuggest/nimsuggest" + let cmd = getCurrentCompilerExe() & " " & args + doAssert execShellCmd(getCurrentCompilerExe() & " " & args) == 0, cmd + + doAssert nimsug.fileExists, nimsug var failures = 0 if os.paramCount() > 0: let x = os.paramStr(1)