Skip to content

Commit

Permalink
Annotate "[buffered] " logs, and flush on finishTest, not just testFa…
Browse files Browse the repository at this point in the history
…iled. (#3694)
  • Loading branch information
kdashg authored Oct 3, 2024
1 parent 0f39bef commit 078e289
Showing 1 changed file with 4 additions and 1 deletion.
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

0 comments on commit 078e289

Please sign in to comment.