Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🏗 Separate error logs from different test runs on Travis #14621

Merged
merged 1 commit into from
Apr 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions build-system/tasks/runtime-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const green = colors.green;
const yellow = colors.yellow;
const cyan = colors.cyan;
const red = colors.red;
const bold = colors.bold;

const preTestTasks =
argv.nobuild ? [] : ((argv.unit || argv.a4a) ? ['css'] : ['build']);
Expand Down Expand Up @@ -361,12 +362,14 @@ function runTests() {
// reporter, since it likely contains copious amounts of logs.
const shouldCollapseSummary =
process.env.TRAVIS && c.reporters.includes('karmaSimpleReporter');
const sectionMarker =
(argv.saucelabs || argv.saucelabs_lite) ? 'saucelabs' : 'local';

let resolver;
const deferred = new Promise(resolverIn => {resolver = resolverIn;});
new Karma(c, function(exitCode) {
if (shouldCollapseSummary) {
console./* OK*/log('travis_fold:end:run_summary');
console./* OK*/log('travis_fold:end:console_errors_' + sectionMarker);
}
server.emit('kill');
if (exitCode) {
Expand All @@ -387,10 +390,9 @@ function runTests() {
}
}).on('run_complete', function() {
if (shouldCollapseSummary) {
console./* OK*/log(yellow(
'Console logs (expand this section and fix all errors ' +
'printed by your tests)'));
console./* OK*/log('travis_fold:start:run_summary');
console./* OK*/log(bold(red('Console errors:')),
'Expand this section and fix all errors printed by your tests.');
console./* OK*/log('travis_fold:start:console_errors_' + sectionMarker);
}
}).on('browser_complete', function(browser) {
if (shouldCollapseSummary) {
Expand Down