summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2021-07-07 20:19:47 +0200
committerGitHub <noreply@github.com>2021-07-07 20:19:47 +0200
commit48e7c871d9798161e99a30ff738ca94b92aed7a3 (patch)
tree0edf9cd8b364de3ff090dbcff63632e3204b8e75
parentc972fe6cec8f643fbafd0fe33b461798faedaf80 (diff)
Revert "tests: parallelize test runs in wpt" (#11321)
This reverts commit 7edb1d713c036583e2ba3caf0df042835781a49c.
-rwxr-xr-xtools/wpt.ts21
1 files changed, 4 insertions, 17 deletions
diff --git a/tools/wpt.ts b/tools/wpt.ts
index 9d1e689ac..799e6b0c7 100755
--- a/tools/wpt.ts
+++ b/tools/wpt.ts
@@ -32,7 +32,6 @@ import {
} from "./wpt/utils.ts";
import { blue, bold, green, red, yellow } from "../test_util/std/fmt/colors.ts";
import { writeAll, writeAllSync } from "../test_util/std/io/util.ts";
-import { pooledMap } from "../test_util/std/async/pool.ts";
import { saveExpectation } from "./wpt/utils.ts";
const command = Deno.args[0];
@@ -154,29 +153,17 @@ async function run() {
console.log(`Going to run ${tests.length} test files.`);
const results = await runWithTestUtil(false, async () => {
- const results: { test: TestToRun; result: TestResult }[] = [];
-
- const cores = Deno.systemCpuInfo().cores ?? 4;
- const inParallel = !(cores === 1 || tests.length === 1);
+ const results = [];
- const iter = pooledMap(cores, tests, async (test) => {
- if (!inParallel) {
- console.log(`${blue("-".repeat(40))}\n${bold(test.path)}\n`);
- }
+ for (const test of tests) {
+ console.log(`${blue("-".repeat(40))}\n${bold(test.path)}\n`);
const result = await runSingleTest(
test.url,
test.options,
- inParallel ? () => {} : createReportTestCase(test.expectation),
+ createReportTestCase(test.expectation),
);
results.push({ test, result });
- if (inParallel) {
- console.log(`${blue("-".repeat(40))}\n${bold(test.path)}\n`);
- }
reportVariation(result, test.expectation);
- });
-
- for await (const _ of iter) {
- // do nothing
}
return results;