diff options
author | Luca Casonato <lucacasonato@yahoo.com> | 2021-06-06 18:08:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-06 18:08:50 +0200 |
commit | f1deed41e7cc04440a5fb8cdae486ae00513a361 (patch) | |
tree | e8f6e0aa24e490bee09194f31e2dac8c22867612 /tools/wpt/testharnessreport.js | |
parent | 5bd77f29e5d07af10fe9a24062c3b5b4bb79f4bf (diff) |
tests: generate and upload wptreport.json (#10869)
These reports can be consumed by tools like `wptreport` or
https://wpt.fyi. The old style report could be removed in a future PR
when wpt.deno.land is updated.
Diffstat (limited to 'tools/wpt/testharnessreport.js')
-rw-r--r-- | tools/wpt/testharnessreport.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/wpt/testharnessreport.js b/tools/wpt/testharnessreport.js index d3e783376..04251c852 100644 --- a/tools/wpt/testharnessreport.js +++ b/tools/wpt/testharnessreport.js @@ -10,6 +10,13 @@ window.add_result_callback(({ message, name, stack, status }) => { } }); -window.add_completion_callback((_tests, _harnessStatus) => { +window.add_completion_callback((_tests, harnessStatus) => { + const data = new TextEncoder().encode( + `#$#$#${JSON.stringify(harnessStatus)}\n`, + ); + let bytesWritten = 0; + while (bytesWritten < data.byteLength) { + bytesWritten += Deno.stderr.writeSync(data.subarray(bytesWritten)); + } Deno.exit(0); }); |