Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions docs/process/bazel.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ things on Windows, at which point it breaks.

On Linux, Bazel tests will run under a sandbox for isolation.
You can turn off this sandbox by adding the [`local = True`](https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests) attribute to the rule.
You can also force local execution by passing `--test_output=streamed`.

Then you will find the intermediate test files in `bazel-out/k8-fastbuild/bin`, followed by the test target path.

Expand All @@ -58,6 +59,16 @@ causes jasmine to exit with a non-zero exit code.

While testing, you can remove the `shard_count` attribute to prevent sharding and the `flaky`
attribute to prevent repetition.
Setting `--test_output=streamed` will disable sharding and `--flaky_test_attempts=1` will disable
the reruns of tests that have been marked as `flaky`.

The `.bazelrc` includes a config for running tests with remote debugging enabled:

```sh
yarn bazel test --config=debug //packages/angular/cli:angular-cli_test
# Also disable reruns of failing tests that were marked as flaky:
yarn bazel test --config=debug --config=no-sharding //packages/angular/cli:angular-cli_test
```

NB: For a few tests, sandbox is required as otherwise the rules_nodejs linker symlinks will conflict
with the yarn workspace symlinks in node_modules.
Expand Down