|
25 | 25 | "dialyze", |
26 | 26 | "plt", |
27 | 27 | ) |
| 28 | +load( |
| 29 | + "@rules_erlang//:eunit2.bzl", |
| 30 | + "eunit", |
| 31 | +) |
28 | 32 | load( |
29 | 33 | "@rules_erlang//:ct.bzl", |
30 | 34 | "ct_suite", |
@@ -96,12 +100,57 @@ dialyze( |
96 | 100 | plt = ":base_plt", |
97 | 101 | ) |
98 | 102 |
|
| 103 | +erlang_bytecode( |
| 104 | + name = "test_example_suite_beam", |
| 105 | + testonly = True, |
| 106 | + srcs = [ |
| 107 | + "test/example_suite.erl", |
| 108 | + ], |
| 109 | + dest = "test", |
| 110 | + erlc_opts = DEFAULT_TEST_ERLC_OPTS + [ |
| 111 | + "+nowarn_export_all", |
| 112 | + ], |
| 113 | +) |
| 114 | + |
| 115 | +erlang_bytecode( |
| 116 | + name = "test_example_suite_missing_group_beam", |
| 117 | + testonly = True, |
| 118 | + srcs = [ |
| 119 | + "test/example_suite_missing_group.erl", |
| 120 | + ], |
| 121 | + dest = "test", |
| 122 | + erlc_opts = DEFAULT_TEST_ERLC_OPTS + [ |
| 123 | + "+nowarn_export_all", |
| 124 | + ], |
| 125 | +) |
| 126 | + |
| 127 | +erlang_bytecode( |
| 128 | + name = "test_shard_suite_test_beam", |
| 129 | + testonly = True, |
| 130 | + srcs = [ |
| 131 | + "test/shard_suite_test.erl", |
| 132 | + ], |
| 133 | + dest = "test", |
| 134 | + erlc_opts = DEFAULT_TEST_ERLC_OPTS + [ |
| 135 | + "+nowarn_export_all", |
| 136 | + ], |
| 137 | +) |
| 138 | + |
| 139 | +eunit( |
| 140 | + name = "eunit", |
| 141 | + compiled_suites = [ |
| 142 | + ":test_example_suite_beam", |
| 143 | + ":test_shard_suite_test_beam", |
| 144 | + ], |
| 145 | + target = ":test_erlang_app", |
| 146 | +) |
| 147 | + |
99 | 148 | ct_suite( |
100 | 149 | name = "shard_suite_SUITE", |
101 | 150 | size = "small", |
102 | | - additional_srcs = [ |
103 | | - "test/example_suite.erl", |
104 | | - "test/example_suite_missing_group.erl", |
| 151 | + additional_beam = [ |
| 152 | + ":test_example_suite_beam", |
| 153 | + ":test_example_suite_missing_group_beam", |
105 | 154 | ], |
106 | 155 | ) |
107 | 156 |
|
|
0 commit comments