testament: don't rely on Nim source structure [backport:1.2] (#14077)

It's also just faster to get the current file name instead of scanning
the PATH.

(cherry picked from commit 4b43d42b98)
This commit is contained in:
alaviss
2020-04-23 07:26:06 +00:00
committed by narimiran
parent bd12e7fb17
commit abbf94127d

View File

@@ -679,7 +679,7 @@ proc main() =
of "all":
#processCategory(r, Category"megatest", p.cmdLineRest.string, testsDir, runJoinableTests = false)
var myself = quoteShell(findExe("testament" / "testament"))
var myself = quoteShell(getAppFilename())
if targetsStr.len > 0:
myself &= " " & quoteShell("--targets:" & targetsStr)