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