File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,26 @@ The example below follows this convention.
3131
3232## Minimal Example
3333
34+ ### ` WORKSPACE ` file
35+
36+ ``` starlark
37+ http_archive(
38+ name = " bazel-erlang" ,
39+ strip_prefix = " bazel-erlang-master" ,
40+ urls = [" https://github.com/rabbitmq/bazel-erlang/archive/master.zip" ],
41+ )
42+
43+ load(" @bazel-erlang//:bazel_erlang.bzl" , " bazel_erlang_deps" )
44+
45+ bazel_erlang_deps()
46+ ```
47+
48+ ### ` BUILD ` file
49+
3450``` starlark
3551load(" @bazel-erlang//:bazel_erlang_lib.bzl" , " erlang_lib" , " test_erlang_lib" )
52+ load(" @bazel-erlang//:xref.bzl" , " xref" )
53+ load(" @bazel-erlang//:dialyze.bzl" , " dialyze" , " plt" )
3654load(" @bazel-erlang//:ct.bzl" , " ct_suite" )
3755
3856APP_NAME = " my_cool_app"
@@ -48,17 +66,31 @@ test_erlang_lib(
4866 app_version = APP_VERSION ,
4967)
5068
69+ xref()
70+
71+ dialyze()
72+
5173ct_suite(
5274 name = " unit_SUITE" ,
5375)
5476```
5577
78+ ## Compile and run all tests
79+
5680``` shell
5781bazel test //... \
5882 --@bazel-erlang//:erlang_home=/path/to/erlang \
5983 --@bazel-erlang//:erlang_version=23.2
6084```
6185
86+ ## Run the unit suite only
87+
88+ ``` shell
89+ bazel test //:unit_SUITE \
90+ --@bazel-erlang//:erlang_home=/path/to/erlang \
91+ --@bazel-erlang//:erlang_version=23.2
92+ ```
93+
6294## Run a single test case
6395
6496``` shell
You can’t perform that action at this time.
0 commit comments