mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Get core specs ready to run in parallel w/ package specs
This commit is contained in:
parent
c47c380ff8
commit
3d71112d75
@ -2,6 +2,7 @@
|
||||
"name": "atom-build-scripts",
|
||||
"description": "Atom build scripts",
|
||||
"dependencies": {
|
||||
"async": "^2.0.1",
|
||||
"babel-core": "5.8.38",
|
||||
"coffee-script": "1.8.0",
|
||||
"colors": "1.1.2",
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
'use strict'
|
||||
|
||||
const async = require('async')
|
||||
require('colors')
|
||||
|
||||
const path = require('path')
|
||||
@ -18,6 +19,19 @@ const testArguments = [
|
||||
'--test', testPath
|
||||
]
|
||||
|
||||
console.log('Executing core specs...'.bold.green)
|
||||
const exitStatus = childProcess.spawnSync(executablePath, testArguments, {stdio: 'inherit'}).status
|
||||
process.exit(exitStatus)
|
||||
function runCoreSpecs (callback) {
|
||||
console.log('Executing core specs...'.bold.green)
|
||||
const cp = childProcess.spawn(executablePath, testArguments, {stdio: 'inherit'})
|
||||
cp.on('error', error => { callback(error) })
|
||||
cp.on('close', exitCode => { callback(null, exitCode) })
|
||||
}
|
||||
|
||||
async.parallelLimit([runCoreSpecs], 2, function (err, exitCodes) {
|
||||
if (err) {
|
||||
console.error(err)
|
||||
process.exit(1)
|
||||
} else {
|
||||
const testsPassed = exitCodes.every(exitCode => exitCode === 0)
|
||||
process.exit(testsPassed ? 0 : 1)
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user