Skip to content

Commit fab6d7c

Browse files
committed
Exit correctly when tests are failing in test sequence
Prevent build servers from running until hitting build timelimit
1 parent c32c1e7 commit fab6d7c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

gulpfile.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,14 @@ gulp.task('all', function(cb){
131131
});
132132

133133
gulp.task('test', function(cb){
134-
runSequence('test-nodejs', 'test-browser', 'run-tck', cb);
134+
runSequence('test-nodejs', 'test-browser', 'run-tck', function (err) {
135+
if (err) {
136+
var exitCode = 2;
137+
console.log('[FAIL] test task failed - exiting with code ' + exitCode);
138+
return process.exit(exitCode);
139+
}
140+
return cb();
141+
});
135142
});
136143

137144
gulp.task('test-nodejs', ['nodejs'], function () {

0 commit comments

Comments
 (0)