@@ -81,16 +81,15 @@ proc listTests*(
8181 stdoutHandle = AsyncProcess .Pipe ,
8282 )
8383 try :
84- let (error, res) = await readErrorOutputUntilExit (process, 15 .seconds)
84+ let (rawOutput, error, res) = await readOutputUntilExit (process, 15 .seconds)
8585 if res != 0 :
8686 error " Failed to list tests" , nimPath = nimPath, entryPoint = entryPoint, res = res
8787 error " An error occurred while listing tests"
8888 for line in error.splitLines:
8989 error " Error line: " , line = line
9090 error " Command args: " , args = args
91- result = TestProjectInfo (error: some error)
91+ result = TestProjectInfo (error: some error)
9292 else :
93- let rawOutput = await readAllOutput (process.stdoutStream)
9493 debug " list test raw output" , rawOutput = rawOutput
9594 result = extractTestInfo (rawOutput)
9695 finally :
@@ -126,7 +125,7 @@ proc runTests*(
126125 ls.testRunProcess = some (process)
127126 try :
128127 removeFile (resultFile)
129- let (error, res) = await readErrorOutputUntilExit (process, 15 .seconds)
128+ let (output, error, res) = await readOutputUntilExit (process, 15 .seconds)
130129 if res != 0 : # When a test fails, the process will exit with a non-zero code
131130 if fileExists (resultFile):
132131 result = parseTestResults (readFile (resultFile))
@@ -137,11 +136,12 @@ proc runTests*(
137136 error " An error occurred while running tests"
138137 error " Error from process" , error = error
139138 result = RunTestProjectResult (fullOutput: error)
139+ result .fullOutput = output
140140 else :
141141 let xmlContent = readFile (resultFile)
142142 # echo "XML CONTENT: ", xmlContent
143143 result = parseTestResults (xmlContent)
144- result .fullOutput = error
144+ result .fullOutput = output
145145 removeFile (resultFile)
146146 except Exception as e:
147147 let processOutput = string .fromBytes (process.stdoutStream.read ().await)
0 commit comments