Skip to content

Commit bde4351

Browse files
authored
Generated files are moved out from the project (#340)
1 parent b0e97ed commit bde4351

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

testrunner.nim

+4-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ proc listTests*(
7171
workspaceRoot: string
7272
): Future[TestProjectInfo] {.async.} =
7373
var entryPoint = getFullPath(entryPoint, workspaceRoot)
74+
let executableDir = (getTempDir() / entryPoint.splitFile.name).absolutePath
7475
debug "Listing tests", entryPoint = entryPoint, exists = fileExists(entryPoint)
75-
let args = @["c", "-d:unittest2ListTests", "-r", entryPoint]
76+
let args = @["c", "--outdir:" & executableDir, "-d:unittest2ListTests", "-r", entryPoint]
7677
let process = await startProcess(
7778
nimPath,
7879
arguments = args,
@@ -112,7 +113,8 @@ proc runTests*(
112113
return RunTestProjectResult()
113114
let resultFile = (getTempDir() / "result.xml").absolutePath
114115
removeFile(resultFile)
115-
var args = @["c", "-r", entryPoint , fmt"--xml:{resultFile}"]
116+
let executableDir = (getTempDir() / entryPoint.splitFile.name).absolutePath
117+
var args = @["c", "--outdir:" & executableDir, "-r", entryPoint , fmt"--xml:{resultFile}"]
116118
if suiteName.isSome:
117119
args.add(fmt"{suiteName.get()}::")
118120
else:

0 commit comments

Comments
 (0)