Skip to content

Commit 6450e5c

Browse files
authored
Merge pull request #63 from atom-ide-community/renderer_test_collect_output
2 parents 6d50f3f + 3bdd637 commit 6450e5c

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

script/test

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,21 @@ for (let testFile of testFiles) {
110110
'--resource-path', resourcePath,
111111
'--test', testFile
112112
]
113-
const cp = childProcess.spawn(executablePath, testArguments, {stdio: 'inherit', env: testEnv})
114-
cp.on('error', error => { callback(error) })
115-
cp.on('close', exitCode => { callback(null, {exitCode, step: `core-render-process for ${testFile}.`, testCommand: `You can run the test again using: \n\t ${executablePath} ${testArguments.join(' ')}`}) })
113+
const cp = childProcess.spawn(executablePath, testArguments, { env: testEnv})
114+
let stderrOutput = ''
115+
cp.stderr.on('data', data => { stderrOutput += data })
116+
cp.stdout.on('data', data => { stderrOutput += data })
117+
cp.on('error', error => {
118+
console.log(error, "error")
119+
callback(error)
120+
})
121+
cp.on('close', exitCode => {
122+
if (exitCode !== 0) {
123+
console.log(`##[error] Renderer tests failed for ${testFile}:`.red)
124+
console.log(stderrOutput)
125+
}
126+
callback(null, {exitCode, step: `core-render-process for ${testFile}.`, testCommand: `You can run the test again using: \n\t ${executablePath} ${testArguments.join(' ')}`})
127+
})
116128
})
117129
}
118130

@@ -269,7 +281,7 @@ function requestedTestSuites (platform) {
269281
return suites
270282
}
271283

272-
async.parallel(testSuitesToRun, function (err, results) {
284+
async.series(testSuitesToRun, function (err, results) {
273285
if (err) {
274286
console.error(err)
275287
process.exit(1)

0 commit comments

Comments
 (0)