Skip to content

Commit 9e65978

Browse files
committed
fixup! test: report error wpt test results
1 parent 111c759 commit 9e65978

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

test/common/wpt.js

+12-10
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,13 @@ class WPTReport {
111111

112112
write() {
113113
this.time_end = Date.now();
114-
const results = Array.from(this.results.values()).filter((result) => {
115-
return result.status === 'SKIP' || result.subtests.length !== 0;
116-
}).map((result) => {
117-
const url = new URL(result.test, 'http://wpt');
118-
url.pathname = url.pathname.replace(/\.js$/, '.html');
119-
result.test = url.href.slice(url.origin.length);
120-
return result;
121-
});
114+
const results = Array.from(this.results.values())
115+
.map((result) => {
116+
const url = new URL(result.test, 'http://wpt');
117+
url.pathname = url.pathname.replace(/\.js$/, '.html');
118+
result.test = url.href.slice(url.origin.length);
119+
return result;
120+
});
122121

123122
/**
124123
* Return required and some optional properties
@@ -687,6 +686,7 @@ class WPTRunner {
687686
return;
688687
}
689688
// Generate a subtest failure for visibility.
689+
// No need to record this synthetic failure with wpt.fyi.
690690
this.fail(
691691
spec,
692692
{
@@ -696,7 +696,6 @@ class WPTRunner {
696696
stack: inspect(err),
697697
},
698698
kUncaught,
699-
reportResult,
700699
);
701700
// Mark the whole test as failed in wpt.fyi report.
702701
reportResult?.finish('ERROR');
@@ -709,6 +708,7 @@ class WPTRunner {
709708

710709
process.on('exit', () => {
711710
for (const spec of this.inProgress) {
711+
// No need to record this synthetic failure with wpt.fyi.
712712
this.fail(spec, { name: 'Incomplete' }, kIncomplete);
713713
// Mark the whole test as failed in wpt.fyi report.
714714
const reportResult = this.report?.getResult(spec);
@@ -834,7 +834,9 @@ class WPTRunner {
834834

835835
// Treat it like a test case failure
836836
if (status === kTimeout) {
837-
this.fail(spec, { name: 'WPT testharness timeout' }, kTimeout, reportResult);
837+
// No need to record this synthetic failure with wpt.fyi.
838+
this.fail(spec, { name: 'WPT testharness timeout' }, kTimeout);
839+
// Mark the whole test as TIMEOUT in wpt.fyi report.
838840
reportResult?.finish('TIMEOUT');
839841
} else {
840842
reportResult?.finish();

0 commit comments

Comments
 (0)