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: README.md
+31-31Lines changed: 31 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,33 +2,6 @@
2
2
3
3
Bazel rules for Erlang sources
4
4
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
-
32
5
## Minimal Example
33
6
34
7
### `WORKSPACE` file
@@ -78,23 +51,23 @@ assert_suites([
78
51
])
79
52
```
80
53
81
-
## Compile and run all tests
54
+
###Compile and run all tests
82
55
83
56
```shell
84
57
bazel test //... \
85
58
--@rules_erlang//:erlang_home=/path/to/erlang \
86
59
--@rules_erlang//:erlang_version=23.2
87
60
```
88
61
89
-
## Run the unit suite only
62
+
###Run the unit suite only
90
63
91
64
```shell
92
65
bazel test //:unit_SUITE \
93
66
--@rules_erlang//:erlang_home=/path/to/erlang \
94
67
--@rules_erlang//:erlang_version=23.2
95
68
```
96
69
97
-
## Run a single test case
70
+
###Run a single test case
98
71
99
72
```shell
100
73
bazel test //:unit_SUITE \
@@ -103,9 +76,36 @@ bazel test //:unit_SUITE \
103
76
--test_env FOCUS="-group my_group -case my_case"
104
77
```
105
78
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
+
106
106
## Copyright and License
107
107
108
-
(c) 2020-2021, VMware Inc or its affiliates.
108
+
(c) 2020-2022, VMware Inc or its affiliates.
109
109
110
110
Dual licensed under the Apache License Version 2.0 and
0 commit comments