Skip to content

Commit

Permalink
ci: ensure saucelabs test output is human readable (angular#34277)
Browse files Browse the repository at this point in the history
Currently the Saucelabs test output (also an issue in the POC bazel
saucelabs master-only cronjob), is very verbose because two Karma
reporters conflict. Basically resulting in the progress messages
being printed in new lines (while they usually are just updated
using a tty cursor reset).

PR Close angular#34277
  • Loading branch information
devversion authored and kara committed Dec 16, 2019
1 parent 6d3a25d commit 04ab036
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions karma-js.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ module.exports = function(config) {
'/base/npm/': '/base/',
},

reporters: ['dots'],

sauceLabs: {
testName: 'Angular2',
retryLimit: 3,
Expand Down Expand Up @@ -145,11 +143,19 @@ module.exports = function(config) {
browserDisconnectTimeout: 180000,
browserDisconnectTolerance: 3,
browserNoActivityTimeout: 300000,
}
};

// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1431. The idea is
// that we do no not allow `@bazel/karma` to add the `progress` reporter.
Object.defineProperty(conf, 'reporters', {
enumerable: true,
get: () => ['dots'],
set: () => {},
});

// When running under Bazel with karma_web_test, SAUCE_TUNNEL_IDENTIFIER and KARMA_WEB_TEST_MODE
// will only be available when `--config=saucelabs` is set. See //:test_web_all target
// and /.bazelrc.
// will only be available if they are part of the Bazel action environment. More details in the
// "scripts/saucelabs/run-bazel-via-tunnel.sh" script.
if (process.env['SAUCE_TUNNEL_IDENTIFIER']) {
console.log(`SAUCE_TUNNEL_IDENTIFIER: ${process.env.SAUCE_TUNNEL_IDENTIFIER}`);

Expand Down

0 comments on commit 04ab036

Please sign in to comment.