build(gulp): exec karma run in a new process to avoid duplicate output
This is not an ideal solution, but I couldn't find another way to supress the output from the runner. Closes #1813
This commit is contained in:
parent
f9f917bfa4
commit
d18463dcdc
30
gulpfile.js
30
gulpfile.js
|
@ -386,14 +386,13 @@ gulp.task('test.unit.js', ['build.js.dev'], function (neverDone) {
|
||||||
|
|
||||||
runSequence(
|
runSequence(
|
||||||
'!test.unit.js/karma-server',
|
'!test.unit.js/karma-server',
|
||||||
'!test.unit.js/karma-run',
|
function() {
|
||||||
'check-format'
|
|
||||||
);
|
|
||||||
|
|
||||||
watch('modules/**', [
|
watch('modules/**', [
|
||||||
'!broccoli.js.dev',
|
'!broccoli.js.dev',
|
||||||
'!test.unit.js/karma-run'
|
'!test.unit.js/karma-run'
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('watch.js.dev', ['build.js.dev'], function (neverDone) {
|
gulp.task('watch.js.dev', ['build.js.dev'], function (neverDone) {
|
||||||
|
@ -410,9 +409,11 @@ gulp.task('!test.unit.js/karma-server', function() {
|
||||||
|
|
||||||
|
|
||||||
gulp.task('!test.unit.js/karma-run', function(done) {
|
gulp.task('!test.unit.js/karma-run', function(done) {
|
||||||
karma.runner.run({configFile: __dirname + '/karma-js.conf.js'}, function(exitCode) {
|
// run the run command in a new process to avoid duplicate logging by both server and runner from
|
||||||
// ignore exitCode, we don't want to fail the build in the interactive (non-ci) mode
|
// a single process
|
||||||
// karma will print all test failures
|
exec('node node_modules/.bin/karma run karma-js.conf.js', function(e, stdout) {
|
||||||
|
// ignore errors, we don't want to fail the build in the interactive (non-ci) mode
|
||||||
|
// karma server will print all test failures
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -421,20 +422,23 @@ gulp.task('!test.unit.js/karma-run', function(done) {
|
||||||
gulp.task('test.unit.dart', ['build/tree.dart'], function (done) {
|
gulp.task('test.unit.dart', ['build/tree.dart'], function (done) {
|
||||||
runSequence(
|
runSequence(
|
||||||
'!test.unit.dart/karma-server',
|
'!test.unit.dart/karma-server',
|
||||||
'!test.unit.dart/karma-run'
|
'!test.unit.dart/karma-run',
|
||||||
);
|
function() {
|
||||||
|
|
||||||
watch('modules/angular2/**', [
|
watch('modules/angular2/**', [
|
||||||
'!build/tree.dart',
|
'!build/tree.dart',
|
||||||
'build/format.dart',
|
'build/format.dart',
|
||||||
'!test.unit.dart/karma-run'
|
'!test.unit.dart/karma-run'
|
||||||
]);
|
]);
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('!test.unit.dart/karma-run', function (done) {
|
gulp.task('!test.unit.dart/karma-run', function (done) {
|
||||||
karma.runner.run({configFile: __dirname + '/karma-dart.conf.js'}, function(exitCode) {
|
// run the run command in a new process to avoid duplicate logging by both server and runner from
|
||||||
// ignore exitCode, we don't want to fail the build in the interactive (non-ci) mode
|
// a single process
|
||||||
// karma will print all test failures
|
exec('node node_modules/.bin/karma run karma-dart.conf.js', function(e, stdout) {
|
||||||
|
// ignore errors, we don't want to fail the build in the interactive (non-ci) mode
|
||||||
|
// karma server will print all test failures
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue