GeezerVison is showing github.com — test: reduce WPT concurrency · nodejs/node@54607bf
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: test/common/wpt.js +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -468,9 +468,10 @@ const limit = (concurrency) => { |
468 | 468 | }; |
469 | 469 |
|
470 | 470 | class WPTRunner { |
471 | | - constructor(path) { |
| 471 | + constructor(path, { concurrency = os.availableParallelism() - 1 || 1 } = {}) { |
472 | 472 | this.path = path; |
473 | 473 | this.resource = new ResourceLoader(path); |
| 474 | + this.concurrency = concurrency; |
474 | 475 |
|
475 | 476 | this.flags = []; |
476 | 477 | this.globalThisInitScripts = []; |
@@ -595,7 +596,7 @@ class WPTRunner { |
595 | 596 | async runJsTests() { |
596 | 597 | const queue = this.buildQueue(); |
597 | 598 |
|
598 | | - const run = limit(os.availableParallelism()); |
| 599 | + const run = limit(this.concurrency); |
599 | 600 |
|
600 | 601 | for (const spec of queue) { |
601 | 602 | const content = spec.getContent(); |
|
Collapse file
Copy file name to clipboardExpand all lines: test/wpt/test-timers.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
2 | 2 |
|
3 | 3 | const { WPTRunner } = require('../common/wpt'); |
4 | 4 |
|
5 | | -const runner = new WPTRunner('html/webappapis/timers'); |
| 5 | +const runner = new WPTRunner('html/webappapis/timers', { concurrency: 1 }); |
6 | 6 |
|
7 | 7 | runner.runJsTests(); |
Collapse file
Copy file name to clipboardExpand all lines: test/wpt/testcfg.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
3 | 3 | import testpy |
4 | 4 |
|
5 | 5 | def GetConfiguration(context, root): |
6 | | - return testpy.ParallelTestConfiguration(context, root, 'wpt') |
| 6 | + return testpy.SimpleTestConfiguration(context, root, 'wpt') |