-
Notifications
You must be signed in to change notification settings - Fork 96
/
BUILD.bazel
95 lines (81 loc) · 1.62 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
load("@rules_erlang//:erlang_app.bzl", "erlang_app", "test_erlang_app")
load("@rules_erlang//:xref.bzl", "xref")
load("@rules_erlang//:dialyze.bzl", "DEFAULT_PLT_APPS", "dialyze", "plt")
load("@rules_erlang//:eunit2.bzl", "eunit")
load(":ra.bzl", "ra_suites")
NAME = "ra"
EXTRA_APPS = [
"sasl",
"crypto",
]
DEPS = [
"@gen_batch_server//:erlang_app",
]
RUNTIME_DEPS = [
"@aten//:erlang_app",
"@seshat//:erlang_app",
]
erlang_app(
app_name = NAME,
extra_apps = EXTRA_APPS,
runtime_deps = RUNTIME_DEPS,
deps = DEPS,
)
test_erlang_app(
app_name = NAME,
extra_apps = EXTRA_APPS,
runtime_deps = RUNTIME_DEPS,
deps = DEPS,
)
xref()
PLT_APPS = DEFAULT_PLT_APPS + [
"compiler",
"tools",
"runtime_tools",
"mnesia",
"eunit",
]
plt(
name = "deps_plt",
apps = PLT_APPS,
for_target = ":erlang_app",
)
dialyze(
size = "small",
plt = ":deps_plt",
)
plt(
name = "test_deps_plt",
apps = PLT_APPS + [
"common_test",
],
for_target = ":test_erlang_app",
deps = [
"@meck//:erlang_app",
"@proper//:erlang_app",
],
)
dialyze(
name = "dialyze_tests",
size = "small",
beam = [
f.replace("test/", "").replace(".erl", "_beam_files")
for f in glob(["test/*_SUITE.erl"])
] + [
":test_helpers",
],
plt = ":test_deps_plt",
tags = ["manual"],
)
eunit(
name = "eunit",
eunit_opts = [
"no_tty",
"{report, {eunit_progress, [colored, profile]}}",
],
target = ":test_erlang_app",
deps = [
"@eunit_formatters//:erlang_app",
],
)
ra_suites()