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
Copy file name to clipboardExpand all lines: docs/process/bazel.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,27 @@ Since the requirement is quite lax on Linux but quite strict on windows, what en
42
42
happening is that lack of `require.resolve` calls go unnoticed until someone tries to run
43
43
things on Windows, at which point it breaks.
44
44
45
+
## Debugging jasmine_node_test
46
+
47
+
On Linux, Bazel tests will run under a sandbox for isolation.
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
+
50
+
Then you will find the intermediate test files in `bazel-out/k8-fastbuild/bin`, followed by the test target path.
51
+
52
+
Tests that are sharded, via the `shard_count` attribute, can fail if you reduce the number of tests or focus only a few.
53
+
This will cause some shards to execute 0 tests, which makes the exit with an error code.
54
+
55
+
56
+
Tests that are marked as flaky, via the `flaky` attribute, will repeat when they fail.
57
+
This will cause any focused test to be repeated multiple time, since the presence of focused tests
58
+
causes jasmine to exit with a non-zero exit code.
59
+
60
+
While testing, you can remove the `shard_count` attribute to prevent sharding and the `flaky`
61
+
attribute to prevent repetition.
62
+
63
+
NB: For a few tests, sandbox is required as otherwise the rules_nodejs linker symlinks will conflict
64
+
with the yarn workspace symlinks in node_modules.
65
+
45
66
## Issues
46
67
47
68
1. Yarn workspaces is not compatible with Bazel-managed deps
0 commit comments