Skip to content

Commit 0c6db1c

Browse files
committed
Freshen the README
1 parent 2369dc2 commit 0c6db1c

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,6 @@
22

33
Bazel rules for Erlang sources
44

5-
## Assumptions
6-
7-
`erlang_app` and `ct_suite` macros require the standard otp layout, relative to the bazel package (to some degree abitrary layout can be handled with with the `erlc`, `app_file`, `erlang_app_info` & `ct_test` rules which those macros utilize). For an erlang application named `my_erlang_app` this means:
8-
9-
```
10-
my_erlang_app
11-
├── BUILD.bazel
12-
├── include
13-
│ ├── ...
14-
│ └── my_header.hrl
15-
├── priv
16-
│ └── schema
17-
├── src
18-
│ ├── ...
19-
│ └── my_erlang_app.erl
20-
└── test
21-
├── ...
22-
└── unit_SUITE.erl
23-
```
24-
25-
And that the convention is followed where, using the `dest` attribute of the `erlc` rule:
26-
1. Compiled production bytecode is placed in `ebin`
27-
2. Compiled test bytecode is placed in `src`
28-
3. Compiled test suite and test helper bytecode is placed in `test`
29-
30-
The example below follows this convention.
31-
325
## Minimal Example
336

347
### `WORKSPACE` file
@@ -78,23 +51,23 @@ assert_suites([
7851
])
7952
```
8053

81-
## Compile and run all tests
54+
### Compile and run all tests
8255

8356
```shell
8457
bazel test //... \
8558
--@rules_erlang//:erlang_home=/path/to/erlang \
8659
--@rules_erlang//:erlang_version=23.2
8760
```
8861

89-
## Run the unit suite only
62+
### Run the unit suite only
9063

9164
```shell
9265
bazel test //:unit_SUITE \
9366
--@rules_erlang//:erlang_home=/path/to/erlang \
9467
--@rules_erlang//:erlang_version=23.2
9568
```
9669

97-
## Run a single test case
70+
### Run a single test case
9871

9972
```shell
10073
bazel test //:unit_SUITE \
@@ -103,9 +76,36 @@ bazel test //:unit_SUITE \
10376
--test_env FOCUS="-group my_group -case my_case"
10477
```
10578

79+
## Assumptions
80+
81+
`erlang_app` and `ct_suite` macros require the standard otp layout, relative to the bazel package (to some degree abitrary layout can be handled with with the `erlc`, `app_file`, `erlang_app_info` & `ct_test` rules which those macros utilize). For an erlang application named `my_erlang_app` this means:
82+
83+
```
84+
my_erlang_app
85+
├── BUILD.bazel
86+
├── include
87+
│ ├── ...
88+
│ └── my_header.hrl
89+
├── priv
90+
│ └── schema
91+
├── src
92+
│ ├── ...
93+
│ └── my_erlang_app.erl
94+
└── test
95+
├── ...
96+
└── unit_SUITE.erl
97+
```
98+
99+
And that the convention is followed where, using the `dest` attribute of the `erlc` rule:
100+
1. Compiled production bytecode is placed in `ebin`
101+
2. Compiled test bytecode is placed in `src`
102+
3. Compiled test suite and test helper bytecode is placed in `test`
103+
104+
The example above follows these conventions.
105+
106106
## Copyright and License
107107

108-
(c) 2020-2021, VMware Inc or its affiliates.
108+
(c) 2020-2022, VMware Inc or its affiliates.
109109

110110
Dual licensed under the Apache License Version 2.0 and
111111
Mozilla Public License Version 2.0.

0 commit comments

Comments
 (0)