2022-06-03 18:46:45 +08:00
|
|
|
load("@rules_erlang//:xref2.bzl", "xref")
|
2022-01-06 03:57:48 +08:00
|
|
|
load("@rules_erlang//:dialyze.bzl", "dialyze", "plt")
|
2021-05-07 21:47:04 +08:00
|
|
|
load("//:rabbitmq_home.bzl", "rabbitmq_home")
|
|
|
|
|
load("//:rabbitmq_run.bzl", "rabbitmq_run")
|
|
|
|
|
load(
|
|
|
|
|
"//:rabbitmq.bzl",
|
|
|
|
|
"APP_VERSION",
|
2022-04-07 23:19:35 +08:00
|
|
|
"BROKER_VERSION_REQUIREMENTS_ANY",
|
2021-06-01 16:19:10 +08:00
|
|
|
"RABBITMQ_DIALYZER_OPTS",
|
2021-07-12 23:54:55 +08:00
|
|
|
"assert_suites",
|
2022-01-06 03:57:48 +08:00
|
|
|
"rabbitmq_app",
|
2021-05-11 22:15:16 +08:00
|
|
|
"rabbitmq_integration_suite",
|
|
|
|
|
"rabbitmq_suite",
|
2021-05-07 21:47:04 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
APP_NAME = "rabbitmq_web_dispatch"
|
|
|
|
|
|
|
|
|
|
APP_DESCRIPTION = "RabbitMQ Web Dispatcher"
|
|
|
|
|
|
|
|
|
|
APP_MODULE = "rabbit_web_dispatch_app"
|
|
|
|
|
|
|
|
|
|
EXTRA_APPS = [
|
|
|
|
|
"inets",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
DEPS = [
|
2022-01-06 03:57:48 +08:00
|
|
|
"//deps/rabbit:erlang_app",
|
|
|
|
|
"//deps/rabbit_common:erlang_app",
|
|
|
|
|
"@cowboy//:erlang_app",
|
2021-05-07 21:47:04 +08:00
|
|
|
]
|
|
|
|
|
|
2022-01-06 03:57:48 +08:00
|
|
|
rabbitmq_app(
|
2021-05-07 21:47:04 +08:00
|
|
|
app_description = APP_DESCRIPTION,
|
2022-04-07 23:19:35 +08:00
|
|
|
app_extra_keys = BROKER_VERSION_REQUIREMENTS_ANY,
|
2021-05-07 21:47:04 +08:00
|
|
|
app_module = APP_MODULE,
|
|
|
|
|
app_name = APP_NAME,
|
|
|
|
|
app_version = APP_VERSION,
|
|
|
|
|
extra_apps = EXTRA_APPS,
|
|
|
|
|
deps = DEPS,
|
|
|
|
|
)
|
|
|
|
|
|
2022-05-17 20:07:16 +08:00
|
|
|
xref()
|
2021-05-25 17:39:03 +08:00
|
|
|
|
2021-06-01 16:19:10 +08:00
|
|
|
plt(
|
|
|
|
|
name = "base_plt",
|
|
|
|
|
apps = EXTRA_APPS,
|
|
|
|
|
plt = "//:base_plt",
|
2022-02-24 18:18:41 +08:00
|
|
|
deps = DEPS,
|
2023-04-15 00:22:02 +08:00
|
|
|
ignore_warnings = True,
|
2021-06-01 16:19:10 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
dialyze(
|
|
|
|
|
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
|
|
|
|
|
plt = ":base_plt",
|
|
|
|
|
)
|
|
|
|
|
|
2021-05-07 21:47:04 +08:00
|
|
|
rabbitmq_home(
|
|
|
|
|
name = "broker-for-tests-home",
|
|
|
|
|
testonly = True,
|
|
|
|
|
plugins = [
|
2022-01-06 03:57:48 +08:00
|
|
|
"//deps/rabbit:erlang_app",
|
|
|
|
|
":test_erlang_app",
|
2021-05-07 21:47:04 +08:00
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
rabbitmq_run(
|
|
|
|
|
name = "rabbitmq-for-tests-run",
|
|
|
|
|
testonly = True,
|
|
|
|
|
home = ":broker-for-tests-home",
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-24 22:46:08 +08:00
|
|
|
rabbitmq_integration_suite(
|
|
|
|
|
name = "rabbit_web_dispatch_SUITE",
|
|
|
|
|
data = [
|
|
|
|
|
"test/priv/www/index.html",
|
|
|
|
|
],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
rabbitmq_suite(
|
|
|
|
|
name = "rabbit_web_dispatch_unit_SUITE",
|
|
|
|
|
size = "medium",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
assert_suites()
|
2021-05-07 21:47:04 +08:00
|
|
|
|
2022-11-24 22:46:08 +08:00
|
|
|
alias(
|
|
|
|
|
name = "rabbitmq_web_dispatch",
|
|
|
|
|
actual = ":erlang_app",
|
|
|
|
|
visibility = ["//visibility:public"],
|
2021-05-07 21:47:04 +08:00
|
|
|
)
|