Skip to content

Commit

Permalink
test: reduce WPT concurrency
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
panva authored and targos committed May 12, 2023
1 parent 739113f commit 54607bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test/common/wpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,9 +468,10 @@ const limit = (concurrency) => {
};

class WPTRunner {
constructor(path) {
constructor(path, { concurrency = os.availableParallelism() - 1 || 1 } = {}) {
this.path = path;
this.resource = new ResourceLoader(path);
this.concurrency = concurrency;

this.flags = [];
this.globalThisInitScripts = [];
Expand Down Expand Up @@ -595,7 +596,7 @@ class WPTRunner {
async runJsTests() {
const queue = this.buildQueue();

const run = limit(os.availableParallelism());
const run = limit(this.concurrency);

for (const spec of queue) {
const content = spec.getContent();
Expand Down
2 changes: 1 addition & 1 deletion test/wpt/test-timers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

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

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

runner.runJsTests();
2 changes: 1 addition & 1 deletion test/wpt/testcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
import testpy

def GetConfiguration(context, root):
return testpy.ParallelTestConfiguration(context, root, 'wpt')
return testpy.SimpleTestConfiguration(context, root, 'wpt')

0 comments on commit 54607bf

Please sign in to comment.