@@ -81,16 +81,15 @@ proc listTests*(
81
81
stdoutHandle = AsyncProcess .Pipe ,
82
82
)
83
83
try :
84
- let (error, res) = await readErrorOutputUntilExit (process, 15 .seconds)
84
+ let (rawOutput, error, res) = await readOutputUntilExit (process, 15 .seconds)
85
85
if res != 0 :
86
86
error " Failed to list tests" , nimPath = nimPath, entryPoint = entryPoint, res = res
87
87
error " An error occurred while listing tests"
88
88
for line in error.splitLines:
89
89
error " Error line: " , line = line
90
90
error " Command args: " , args = args
91
- result = TestProjectInfo (error: some error)
91
+ result = TestProjectInfo (error: some error)
92
92
else :
93
- let rawOutput = await readAllOutput (process.stdoutStream)
94
93
debug " list test raw output" , rawOutput = rawOutput
95
94
result = extractTestInfo (rawOutput)
96
95
finally :
@@ -126,7 +125,7 @@ proc runTests*(
126
125
ls.testRunProcess = some (process)
127
126
try :
128
127
removeFile (resultFile)
129
- let (error, res) = await readErrorOutputUntilExit (process, 15 .seconds)
128
+ let (output, error, res) = await readOutputUntilExit (process, 15 .seconds)
130
129
if res != 0 : # When a test fails, the process will exit with a non-zero code
131
130
if fileExists (resultFile):
132
131
result = parseTestResults (readFile (resultFile))
@@ -137,11 +136,12 @@ proc runTests*(
137
136
error " An error occurred while running tests"
138
137
error " Error from process" , error = error
139
138
result = RunTestProjectResult (fullOutput: error)
139
+ result .fullOutput = output
140
140
else :
141
141
let xmlContent = readFile (resultFile)
142
142
# echo "XML CONTENT: ", xmlContent
143
143
result = parseTestResults (xmlContent)
144
- result .fullOutput = error
144
+ result .fullOutput = output
145
145
removeFile (resultFile)
146
146
except Exception as e:
147
147
let processOutput = string .fromBytes (process.stdoutStream.read ().await)
0 commit comments