Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: reduce WPT concurrency #47834

Merged
merged 1 commit into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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')