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

Annotate "[buffered] " logs, and flush on finishTest, not just testFailed. #3694

Merged
merged 1 commit into from
Oct 3, 2024
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
5 changes: 4 additions & 1 deletion sdk/tests/js/js-test-pre.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,14 @@ function notifyFinishedToHarness() {
}
}

// Start buffered, so that our thousands of passing subtests can be buffered.
// We flush the buffered logs on testFailed and/or finishTest.
var _bufferedConsoleLogs = [];

function _bufferedLogToConsole(msg)
{
if (_bufferedConsoleLogs) {
_bufferedConsoleLogs.push(msg);
_bufferedConsoleLogs.push('[buffered] ' + msg);
} else if (window.console) {
window.console.log(msg);
}
Expand Down Expand Up @@ -774,6 +776,7 @@ function webglHarnessCollectGarbage() {
}

function finishTest() {
_flushBufferedLogsToConsole();
successfullyParsed = true;
var epilogue = document.createElement("script");
var basePath = "";
Expand Down
Loading