File tree Expand file tree Collapse file tree 4 files changed +8
-13
lines changed
shared-actions/windows-bazel-test Expand file tree Collapse file tree 4 files changed +8
-13
lines changed Original file line number Diff line number Diff line change 66 test_target_name:
77 description: E2E test target name.
88 required: true
9- test_args:
10- description: |
11- Text representing the command line arguments that
12- should be passed to the e2e test runner.
13- required: false
14- default: ''
159 e2e_temp_dir:
1610 description: 'The temporary directory path for E2E tests.'
1711 required: false
4539 run: |
4640 node ./scripts/windows-testing/parallel-executor.mjs \
4741 "./dist/bin/tests/legacy-cli/${{ inputs.test_target_name }}_/${{ inputs.test_target_name }}.bat.runfiles" \
48- ${{ inputs.test_target_name }} \
49- "${{ inputs.test_args }}"
42+ ${{ inputs.test_target_name }}
Original file line number Diff line number Diff line change @@ -171,9 +171,9 @@ jobs:
171171 uses: ./.github/shared-actions/windows-bazel-test
172172 with:
173173 test_target_name: e2e.esbuild_node22
174- test_args: --glob "tests/basic/{build,rebuild}.ts"
175174 env:
176175 E2E_SHARD_TOTAL: 1
176+ TESTBRIDGE_TEST_ONLY: tests/basic/{build,rebuild}.ts
177177
178178 e2e-package-managers:
179179 needs: build
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import { stripVTControlCharacters } from 'node:util';
1313const initialStatusRegex = /Running (\d+) tests/;
1414
1515async function main() {
16- const [runfilesDir, targetName, testArgs] = process.argv.slice(2);
16+ const [runfilesDir, targetName, ... testArgs] = process.argv.slice(2);
1717 const testEntrypoint = path.resolve(runfilesDir, '../', targetName);
1818 const testWorkingDir = path.resolve(runfilesDir, '_main');
1919 const tasks = [];
@@ -22,7 +22,7 @@ async function main() {
2222 tasks.push(
2323 spawnTest(
2424 'bash',
25- [testEntrypoint, ...testArgs.split(' ').filter((arg) => arg !== '') ],
25+ [testEntrypoint, ...testArgs],
2626 {
2727 cwd: testWorkingDir,
2828 env: {
@@ -35,6 +35,8 @@ async function main() {
3535 BAZEL_BINDIR: '.',
3636 // Needed to run the E2E in a different temp path.
3737 E2E_TEMP: process.env.E2E_TEMP,
38+ // Using the `--glob` causes a bunch of issues due to path expansion in nested bash scripts.
39+ TESTBRIDGE_TEST_ONLY: process.env.TESTBRIDGE_TEST_ONLY,
3840 },
3941 },
4042 (s) => (progress[0] = s),
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ const parsed = parseArgs({
4747 options: {
4848 'debug': { type: 'boolean', default: !!process.env.BUILD_WORKSPACE_DIRECTORY },
4949 'esbuild': { type: 'boolean' },
50- 'glob': { type: 'string', default: process.env.TESTBRIDGE_TEST_ONLY },
50+ 'glob': { type: 'string', default: 'tests/**/*.js' },
5151 'ignore': { type: 'string', multiple: true },
5252 'ng-snapshots': { type: 'boolean' },
5353 'ng-tag': { type: 'string' },
@@ -130,7 +130,7 @@ function lastLogger() {
130130
131131// Under bazel the compiled file (.js) and types (.d.ts) are available.
132132const SRC_FILE_EXT_RE = /\.js$/;
133- const testGlob = argv.glob? .replace(/\.ts$/, '.js') || `tests/**/*.js` ;
133+ const testGlob = (process.env.TESTBRIDGE_TEST_ONLY ?? argv.glob) .replace(/\.ts$/, '.js');
134134
135135const e2eRoot = path.join(__dirname, 'e2e');
136136const allSetups = glob.sync(`setup/**/*.js`, { cwd: e2eRoot }).sort();
You can’t perform that action at this time.
0 commit comments