compilesettings: add libpath (#16997)

* compilesettings: add libpath

* add test

* changelog

* fixup

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
This commit is contained in:
Timothee Cour 2021-02-12 14:50:41 -08:00 • committed by GitHub
commit 4326f743d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 19 deletions

View file

@ -18,10 +18,12 @@ const
template tpath(): untyped = getAppDir() / "tests"
import std/compilesettings
proc parseTest(filename: string; epcMode=false): Test =
const cursorMarker = "#[!]#"
let nimsug = curDir & addFileExt("nimsuggest", ExeExt)
let libpath = findExe("nim").splitFile().dir /../ "lib"
const libpath = querySetting(libPath)
result.filename = filename
result.dest = getTempDir() / extractFilename(filename)
result.cmd = nimsug & " --tester " & result.dest
@ -329,7 +331,7 @@ proc main() =
failures += runTest(xx)
failures += runEpcTest(xx)
else:
for x in walkFiles(getAppDir() / "tests/t*.nim"):
for x in walkFiles(tpath() / "t*.nim"):
echo "Test ", x
let xx = expandFilename x
when not defined(windows):