From a00f0b1f0a53d47ae334b67e4566f27be02d7d8a Mon Sep 17 00:00:00 2001 From: legendecas Date: Sat, 28 Oct 2023 21:49:39 +0800 Subject: [PATCH] test: recognize wpt completion error PR-URL: https://github.com/nodejs/node/pull/50429 Reviewed-By: Filip Skokan --- test/common/wpt.js | 10 ++++++++++ test/wpt/status/console.json | 3 +++ test/wpt/status/encoding.json | 3 +++ test/wpt/status/hr-time.json | 3 +++ test/wpt/status/streams.json | 3 +++ test/wpt/status/url.json | 3 +++ test/wpt/status/user-timing.json | 3 +++ 7 files changed, 28 insertions(+) diff --git a/test/common/wpt.js b/test/common/wpt.js index f90351ae2c5740..34436639dc3185 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -838,6 +838,16 @@ class WPTRunner { this.fail(spec, { name: 'WPT testharness timeout' }, kTimeout); // Mark the whole test as TIMEOUT in wpt.fyi report. reportResult?.finish('TIMEOUT'); + } else if (status !== kPass) { + // No need to record this synthetic failure with wpt.fyi. + this.fail(spec, { + status: status, + name: 'WPT test harness error', + message: harnessStatus.message, + stack: harnessStatus.stack, + }, status); + // Mark the whole test as ERROR in wpt.fyi report. + reportResult?.finish('ERROR'); } else { reportResult?.finish(); } diff --git a/test/wpt/status/console.json b/test/wpt/status/console.json index 7f8af86a083fde..afbef314ac0569 100644 --- a/test/wpt/status/console.json +++ b/test/wpt/status/console.json @@ -7,5 +7,8 @@ "console namespace: operation dir(optional any, optional object?)" ] } + }, + "idlharness-shadowrealm.window.js": { + "skip": "ShadowRealm support is not enabled" } } diff --git a/test/wpt/status/encoding.json b/test/wpt/status/encoding.json index 0cc551e24a25d9..09f8c2b545b247 100644 --- a/test/wpt/status/encoding.json +++ b/test/wpt/status/encoding.json @@ -39,6 +39,9 @@ "idlharness.any.js": { "skip": "No implementation of TextDecoderStream and TextEncoderStream" }, + "idlharness-shadowrealm.window.js": { + "skip": "ShadowRealm support is not enabled" + }, "replacement-encodings.any.js": { "skip": "decoding-helpers.js needs XMLHttpRequest" }, diff --git a/test/wpt/status/hr-time.json b/test/wpt/status/hr-time.json index a2940656dbe80e..b787bcb7862cb6 100644 --- a/test/wpt/status/hr-time.json +++ b/test/wpt/status/hr-time.json @@ -6,6 +6,9 @@ ] } }, + "idlharness-shadowrealm.window.js": { + "skip": "ShadowRealm support is not enabled" + }, "window-worker-timeOrigin.window.js": { "skip": "depends on URL.createObjectURL(blob)" } diff --git a/test/wpt/status/streams.json b/test/wpt/status/streams.json index 11e225e5f3213e..6454918110dfbd 100644 --- a/test/wpt/status/streams.json +++ b/test/wpt/status/streams.json @@ -6,6 +6,9 @@ ] } }, + "idlharness-shadowrealm.window.js": { + "skip": "ShadowRealm support is not enabled" + }, "piping/general-addition.any.js": { "fail": { "expected": [ diff --git a/test/wpt/status/url.json b/test/wpt/status/url.json index 43f22c5afe5de3..96dafd91b707d5 100644 --- a/test/wpt/status/url.json +++ b/test/wpt/status/url.json @@ -1,4 +1,7 @@ { + "idlharness-shadowrealm.window.js": { + "skip": "ShadowRealm support is not enabled" + }, "percent-encoding.window.js": { "skip": "TODO: port from .window.js" }, diff --git a/test/wpt/status/user-timing.json b/test/wpt/status/user-timing.json index 6e2b6e276ccda0..7e0e70dcf20f20 100644 --- a/test/wpt/status/user-timing.json +++ b/test/wpt/status/user-timing.json @@ -1,4 +1,7 @@ { + "idlharness-shadowrealm.window.js": { + "skip": "ShadowRealm support is not enabled" + }, "invoke_with_timing_attributes.worker.js": { "skip": "importScripts not supported" },