forked from rabbitmq/rabbitmq-metronome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BUILD.bazel
84 lines (75 loc) · 2.21 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
load(
"@rabbitmq-server//:rabbitmq.bzl",
"RABBITMQ_ERLC_OPTS",
"RABBITMQ_TEST_ERLC_OPTS",
"rabbitmq_lib",
)
load("@rabbitmq-server//:rabbitmq_home.bzl", "rabbitmq_home")
load("@rabbitmq-server//:rabbitmq_run.bzl", "rabbitmq_run", "rabbitmq_run_command")
load("@rabbitmq-server//:rabbitmqctl.bzl", "rabbitmqctl")
load("@bazel-erlang//:ct.bzl", "ct_suite")
APP_ENV = """[
{exchange, <<"metronome">>}
]"""
DEPS = [
"@rabbitmq-server//deps/rabbit_common:bazel_erlang_lib",
"@rabbitmq-server//deps/amqp_client:bazel_erlang_lib",
]
RUNTIME_DEPS = [
"@rabbitmq-server//deps/rabbit:bazel_erlang_lib",
]
rabbitmq_lib(
app_description = "Embedded Rabbit Metronome",
app_env = APP_ENV,
app_module = "rabbit_metronome",
app_name = "rabbitmq_metronome",
runtime_deps = RUNTIME_DEPS,
deps = DEPS,
)
rabbitmq_home(
name = "broker-home",
plugins = [
"@rabbitmq-server//deps/rabbit:bazel_erlang_lib",
":bazel_erlang_lib",
],
)
rabbitmq_run(
name = "rabbitmq-run",
home = ":broker-home",
)
rabbitmq_run_command(
name = "broker",
rabbitmq_run = ":rabbitmq-run",
subcommand = "run-broker",
)
rabbitmqctl(
name = "rabbitmqctl",
home = ":broker-home",
)
ct_suite(
name = "metronome_SUITE",
data = [
"@rabbitmq_ct_helpers//tools/tls-certs:Makefile",
"@rabbitmq_ct_helpers//tools/tls-certs:openssl.cnf.in",
],
erlc_opts = RABBITMQ_TEST_ERLC_OPTS,
test_env = {
"RABBITMQ_CT_SKIP_AS_ERROR": "true",
"RABBITMQ_RUN": "$TEST_SRCDIR/$TEST_WORKSPACE/rabbitmq-run",
"RABBITMQCTL": "$TEST_SRCDIR/$TEST_WORKSPACE/broker-home/sbin/rabbitmqctl",
"RABBITMQ_PLUGINS": "$TEST_SRCDIR/$TEST_WORKSPACE/broker-home/sbin/rabbitmq-plugins",
},
tools = [
":rabbitmq-run",
],
runtime_deps = [
"@rabbitmq-server//deps/rabbitmq_cli:elixir_as_bazel_erlang_lib",
"@rabbitmq-server//deps/rabbitmq_cli:rabbitmqctl",
"@rabbitmq_ct_client_helpers//:bazel_erlang_lib",
"@rabbitmq_ct_helpers//:bazel_erlang_lib",
],
deps = [
"@rabbitmq-server//deps/amqp_client:bazel_erlang_lib",
"@rabbitmq-server//deps/rabbit_common:bazel_erlang_lib",
],
)