Skip to content

Commit

Permalink
fixup! test: run legacy-cli e2e tests via bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
jbedard committed Nov 7, 2022
1 parent d0aafda commit 37c127d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions .circleci/dynamic_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ executors:
type: string
default: *default_nodeversion
docker:
- image: cimg/node:<< parameters.nodeversion >>
- image: cimg/node:<< parameters.nodeversion >>-browsers
working_directory: ~/ng
resource_class: xlarge

Expand Down Expand Up @@ -300,7 +300,6 @@ jobs:
default: *default_nodeversion_major
steps:
- custom_attach_workspace
- browser-tools/install-chrome
- setup_bazel_rbe
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
- when:
Expand Down Expand Up @@ -340,13 +339,12 @@ jobs:
default: 'npm'
steps:
- custom_attach_workspace
- browser-tools/install-chrome
- initialize_env
- setup_bazel_rbe
- run: mkdir /mnt/ramdisk/e2e
- run:
name: Test << parameters.build_type >> << parameters.subset >>
command: yarn bazel test --define E2E_TEMP=/mnt/ramdisk/e2e --define E2E_SHARD_TOTAL=${CIRCLE_NODE_TOTAL} --define E2E_SHARD=${CIRCLE_NODE_INDEX} --config=<< parameters.build_type >> //tests/legacy-cli:e2e.<< parameters.subset >>
command: yarn bazel test --define=E2E_TEMP=/mnt/ramdisk/e2e --define=E2E_SHARD_TOTAL=${CIRCLE_NODE_TOTAL} --define=E2E_SHARD_INDEX=${CIRCLE_NODE_INDEX} --config=<< parameters.build_type >> //tests/legacy-cli:e2e.<< parameters.subset >>
no_output_timeout: 40m
- store_artifacts:
path: dist/testlogs/tests/legacy-cli/e2e.<< parameters.subset >>
Expand Down Expand Up @@ -483,7 +481,7 @@ jobs:
PWD: .
command: |
mkdir X:/ramdisk/e2e
bazel test --define=E2E_TEMP=X:/ramdisk/e2e --define=E2E_SHARD_TOTAL=$env:CIRCLE_NODE_TOTAL --define=E2E_SHARD=$env:CIRCLE_NODE_INDEX --config=e2e //tests/legacy-cli:e2e.npm
bazel test --define=E2E_TEMP=X:/ramdisk/e2e --define=E2E_SHARD_TOTAL=$env:CIRCLE_NODE_TOTAL --define=E2E_SHARD_INDEX=$env:CIRCLE_NODE_INDEX --config=e2e //tests/legacy-cli:e2e.npm
# This timeout provides time for the actual tests to timeout and report status
# instead of CircleCI stopping the job without test failure information.
no_output_timeout: 40m
Expand Down
2 changes: 1 addition & 1 deletion tests/legacy-cli/e2e_runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const argv = yargsParser(process.argv.slice(2), {
'shard':
process.env.E2E_SHARD_INDEX === undefined && process.env.TEST_SHARD_INDEX === undefined
? undefined
: Number(process.env.E2E_SHARD_INDEX ?? 0) * Number(process.env.E2E_SHARD_TOTAL ?? 1) +
: Number(process.env.E2E_SHARD_INDEX ?? 0) * Number(process.env.TEST_TOTAL_SHARDS ?? 1) +
Number(process.env.TEST_SHARD_INDEX ?? 0),
},
});
Expand Down

0 comments on commit 37c127d

Please sign in to comment.