mirror of https://github.com/snachodog/mybuddy.git
Bubble up exit code when tests fail
This commit is contained in:
parent
f5c1248fbd
commit
c0d20e3a94
15
gulpfile.js
15
gulpfile.js
|
@ -197,15 +197,20 @@ function test(cb) {
|
|||
'isolate'
|
||||
];
|
||||
command = command.concat(process.argv.splice(3));
|
||||
spawn('pipenv', command, { stdio: 'inherit' }).on('exit', function() {
|
||||
spawn('pipenv', command, { stdio: 'inherit' }).on('exit', function(code) {
|
||||
if (code === 0) {
|
||||
// Run isolated tests.
|
||||
config.testsConfig.isolated.forEach(function(test_name) {
|
||||
es(
|
||||
'pipenv run python manage.py test ' + test_name,
|
||||
{stdio: 'inherit'}
|
||||
);
|
||||
try {
|
||||
es('pipenv run python manage.py test ' + test_name, {stdio: 'inherit'});
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
}
|
||||
})
|
||||
}
|
||||
cb();
|
||||
process.exit(code);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue