Skip to content

Commit 54607bf

Browse files
panvatargos
authored andcommitted
test: reduce WPT concurrency
PR-URL: #47834 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
1 parent 739113f commit 54607bf

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

test/common/wpt.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,10 @@ const limit = (concurrency) => {
468468
};
469469

470470
class WPTRunner {
471-
constructor(path) {
471+
constructor(path, { concurrency = os.availableParallelism() - 1 || 1 } = {}) {
472472
this.path = path;
473473
this.resource = new ResourceLoader(path);
474+
this.concurrency = concurrency;
474475

475476
this.flags = [];
476477
this.globalThisInitScripts = [];
@@ -595,7 +596,7 @@ class WPTRunner {
595596
async runJsTests() {
596597
const queue = this.buildQueue();
597598

598-
const run = limit(os.availableParallelism());
599+
const run = limit(this.concurrency);
599600

600601
for (const spec of queue) {
601602
const content = spec.getContent();

test/wpt/test-timers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
const { WPTRunner } = require('../common/wpt');
44

5-
const runner = new WPTRunner('html/webappapis/timers');
5+
const runner = new WPTRunner('html/webappapis/timers', { concurrency: 1 });
66

77
runner.runJsTests();

test/wpt/testcfg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
import testpy
44

55
def GetConfiguration(context, root):
6-
return testpy.ParallelTestConfiguration(context, root, 'wpt')
6+
return testpy.SimpleTestConfiguration(context, root, 'wpt')

0 commit comments

Comments
 (0)