You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The existing instructions don't quite cover a full debugging setup
and miss some flags that allow debugging without modification of
BUILD files.
(cherry picked from commit f8b2203)
Copy file name to clipboardExpand all lines: docs/process/bazel.md
+11
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ things on Windows, at which point it breaks.
46
46
47
47
On Linux, Bazel tests will run under a sandbox for isolation.
48
48
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.
49
+
You can also force local execution by passing `--test_output=streamed`.
49
50
50
51
Then you will find the intermediate test files in `bazel-out/k8-fastbuild/bin`, followed by the test target path.
51
52
@@ -58,6 +59,16 @@ causes jasmine to exit with a non-zero exit code.
58
59
59
60
While testing, you can remove the `shard_count` attribute to prevent sharding and the `flaky`
60
61
attribute to prevent repetition.
62
+
Setting `--test_output=streamed` will disable sharding and `--flaky_test_attempts=1` will disable
63
+
the reruns of tests that have been marked as `flaky`.
64
+
65
+
The `.bazelrc` includes a config for running tests with remote debugging enabled:
66
+
67
+
```sh
68
+
yarn bazel test --config=debug //packages/angular/cli:angular-cli_test
69
+
# Also disable reruns of failing tests that were marked as flaky:
70
+
yarn bazel test --config=debug --config=no-sharding //packages/angular/cli:angular-cli_test
71
+
```
61
72
62
73
NB: For a few tests, sandbox is required as otherwise the rules_nodejs linker symlinks will conflict
0 commit comments