Skip to content

Commit 078e289

Browse files
authored
Annotate "[buffered] " logs, and flush on finishTest, not just testFailed. (#3694)
1 parent 0f39bef commit 078e289

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sdk/tests/js/js-test-pre.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,14 @@ function notifyFinishedToHarness() {
129129
}
130130
}
131131

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

134136
function _bufferedLogToConsole(msg)
135137
{
136138
if (_bufferedConsoleLogs) {
137-
_bufferedConsoleLogs.push(msg);
139+
_bufferedConsoleLogs.push('[buffered] ' + msg);
138140
} else if (window.console) {
139141
window.console.log(msg);
140142
}
@@ -774,6 +776,7 @@ function webglHarnessCollectGarbage() {
774776
}
775777

776778
function finishTest() {
779+
_flushBufferedLogsToConsole();
777780
successfullyParsed = true;
778781
var epilogue = document.createElement("script");
779782
var basePath = "";

0 commit comments

Comments
 (0)