Skip to content

Commit 3d7afcd

Browse files
committed
Update the Bazel guide, BAZEL.md
1 parent 239e136 commit 3d7afcd

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

BAZEL.md

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,33 +25,17 @@ Otherwise:
2525

2626
https://docs.bazel.build/versions/master/install-bazelisk.html
2727

28-
### Create `.bazelrc`
28+
### Create `user.bazelrc`
2929

30-
Create a `.bazelrc` file with at least:
31-
32-
```
33-
build --@bazel-erlang//:erlang_home=/path/to/erlang/installation
34-
build --@bazel-erlang//:erlang_version=23.1
35-
build --@bazel-erlang//:elixir_home=/path/to/elixir/installation
36-
build --test_strategy=exclusive
37-
build --incompatible_strict_action_env
38-
```
39-
40-
Additionally, on **macOS**, you will likely need to add
41-
42-
```
43-
build --spawn_strategy=local
44-
```
45-
46-
for certain `rabbitmq_cli` tests to pass. This is because `rabbitmqctl wait` shells out to 'ps', which is broken in the bazel macOS (https://github.com/bazelbuild/bazel/issues/7448).
30+
Create a `user.bazelrc` by making a copy of `user-template.bazelrc` and updating the paths in the first few lines.
4731

4832
### Run the broker
4933

5034
`bazel run broker`
5135

5236
### Running tests
5337

54-
Many rabbit tests spawn single or clustered rabbit nodes, and therefore it's best to run test suites sequentially on a single machine. Hence the `--test_strategy=exclusive` flag used in `.bazelrc` above. Naturally that restriction does not hold if utilizing remote execution (as is the case for RabbitMQ's CI pipelines).
38+
Many rabbit tests spawn single or clustered rabbit nodes, and therefore it's best to run test suites sequentially on a single machine. Hence the `build --local_test_jobs=1` flag used in `.bazelrc`. Naturally that restriction does not hold if utilizing remote execution (as is the case for RabbitMQ's CI pipelines).
5539

5640
Erlang Common Test logs will not be placed in the logs directory when run with bazel. They can be found under `bazel-testlogs`. For instance, those of the rabbit application's backing_queue suite will be under `bazel-testlogs/deps/rabbit/backing_queue_SUITE/test.outputs/`.
5741

0 commit comments

Comments
 (0)