Skip to content

Commit 606e414

Browse files
committed
ddd
1 parent 3423f01 commit 606e414

File tree

3 files changed

+25
-34
lines changed

3 files changed

+25
-34
lines changed

.github/shared-actions/windows-bazel-test/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
steps:
1919
- name: Initialize WSL
2020
id: init_wsl
21-
uses: alan-agius4/dev-infra/github-actions/setup-wsl@58b931c5d78feb41e0987ada9287f919c8bb30fc
21+
uses: alan-agius4/dev-infra/github-actions/setup-wsl@d404af1d5f346423421224953563d1e98e2b9fd3
2222
with:
2323
wsl_firewall_interface: 'vEthernet (WSL (Hyper-V firewall))'
2424

@@ -32,7 +32,7 @@ runs:
3232
shell: wsl-bash {0}
3333

3434
- name: Setup Bazel (inside WSL)
35-
uses: alan-agius4/dev-infra/github-actions/bazel/setup@58b931c5d78feb41e0987ada9287f919c8bb30fc
35+
uses: alan-agius4/dev-infra/github-actions/bazel/setup@d404af1d5f346423421224953563d1e98e2b9fd3
3636

3737
- name: Setup Bazel RBE (inside WSL)
3838
uses: alan-agius4/dev-infra/github-actions/bazel/configure-remote@8d3488198613c56f4760efdf8e53d4700afd4af8

scripts/windows-testing/parallel-executor.mjs

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,32 @@ const initialStatusRegex = /Running (\d+) tests/;
1414

1515
async function main() {
1616
const [runfilesDir, targetName, testArgs] = process.argv.slice(2);
17-
const maxShards = 1;
18-
1917
const testEntrypoint = path.resolve(runfilesDir, '../', targetName);
2018
const testWorkingDir = path.resolve(runfilesDir, '_main');
2119
const tasks = [];
2220
const progress = {};
2321

24-
for (let i = 0; i < maxShards; i++) {
25-
tasks.push(
26-
spawnTest(
27-
'bash',
28-
[testEntrypoint, ...testArgs.split(' ').filter((arg) => arg !== '')],
29-
{
30-
cwd: testWorkingDir,
31-
env: {
32-
// Try to construct a pretty hermetic environment, as within Bazel.
33-
PATH: process.env.PATH,
34-
TEST_TOTAL_SHARDS: maxShards,
35-
TEST_SHARD_INDEX: i,
36-
E2E_SHARD_TOTAL: process.env.E2E_SHARD_TOTAL,
37-
E2E_SHARD_INDEX: process.env.E2E_SHARD_INDEX,
38-
FORCE_COLOR: '3',
39-
// Needed by `rules_js`
40-
BAZEL_BINDIR: '.',
41-
// Needed to run the E2E in a different temp path.
42-
E2E_TEMP: process.env.E2E_TEMP,
43-
},
22+
tasks.push(
23+
spawnTest(
24+
'bash',
25+
[testEntrypoint, ...testArgs.split(' ').filter((arg) => arg !== '')],
26+
{
27+
cwd: testWorkingDir,
28+
env: {
29+
// Try to construct a pretty hermetic environment, as within Bazel.
30+
PATH: process.env.PATH,
31+
E2E_SHARD_TOTAL: process.env.E2E_SHARD_TOTAL,
32+
E2E_SHARD_INDEX: process.env.E2E_SHARD_INDEX,
33+
FORCE_COLOR: '3',
34+
// Needed by `rules_js`
35+
BAZEL_BINDIR: '.',
36+
// Needed to run the E2E in a different temp path.
37+
E2E_TEMP: process.env.E2E_TEMP,
4438
},
45-
(s) => (progress[i] = s),
46-
),
47-
);
48-
}
39+
},
40+
(s) => (progress[0] = s),
41+
),
42+
);
4943

5044
const printUpdate = () => {
5145
console.error(`----`);

tests/legacy-cli/e2e_runner.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,12 @@ const parsed = parseArgs({
6969
const argv = {
7070
...parsed.values,
7171
_: parsed.positionals,
72-
'nb-shards':
73-
parsed.values['nb-shards'] ??
74-
(Number(process.env.E2E_SHARD_TOTAL ?? 1) * Number(process.env.TEST_TOTAL_SHARDS ?? 1) || 1),
72+
'nb-shards': parsed.values['nb-shards'] ?? (Number(process.env.E2E_SHARD_TOTAL ?? 1) || 1),
7573
shard:
7674
parsed.values.shard ??
77-
(process.env.E2E_SHARD_INDEX === undefined && process.env.TEST_SHARD_INDEX === undefined
75+
(process.env.E2E_SHARD_INDEX === undefined
7876
? undefined
79-
: Number(process.env.E2E_SHARD_INDEX ?? 0) * Number(process.env.TEST_TOTAL_SHARDS ?? 1) +
80-
Number(process.env.TEST_SHARD_INDEX ?? 0)),
77+
: Number(process.env.E2E_SHARD_INDEX ?? 0)),
8178
};
8279

8380
// Indicate sharding support for Bazel.

0 commit comments

Comments
 (0)