Okay fine let's do this the dumb way

This commit is contained in:
Ash Wilson
2017-08-03 14:30:40 -04:00
parent 263adde377
commit bb91bb58e5
2 changed files with 15 additions and 4 deletions

View File

@@ -69,7 +69,15 @@ function runCoreRenderProcessTests (callback) {
console.log('Executing core render process tests'.bold.green)
const cp = childProcess.spawn(executablePath, testArguments, {stdio: 'inherit', env: testEnv})
cp.on('error', error => { callback(error) })
cp.on('error', error => {
try {
const projectSpecLog = fs.readFileSync('project-spec.log', {encoding: 'utf8'})
console.log(`project-spec log:\n${projectSpecLog}\n`)
} catch (e) {
console.error(`Unable to open log file:\n${e.stack}`)
}
callback(error)
})
cp.on('close', exitCode => { callback(null, exitCode) })
}