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 <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
  • Loading branch information
panva authored May 5, 2023
1 parent d55b84b commit 3d00354
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 3d00354

Please sign in to comment.