summaryrefslogtreecommitdiff
path: root/test/common/wpt.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/common/wpt.js')
-rw-r--r--test/common/wpt.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/common/wpt.js b/test/common/wpt.js
index 9b359877b2..cc7c5320fa 100644
--- a/test/common/wpt.js
+++ b/test/common/wpt.js
@@ -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 = [];
@@ -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();