rabbitmq-server/bazel/BUILD.ct_helper

103 lines
1.7 KiB
Plaintext

load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
load("@rules_erlang//:erlang_app.bzl", "erlang_app")
erlc_opts(
name = "erlc_opts",
values = select({
"@rules_erlang//:debug_build": [
"+debug_info",
],
"//conditions:default": [
"+debug_info",
"+deterministic",
],
}),
visibility = [":__subpackages__"],
)
erlang_bytecode(
name = "other_beam",
testonly = True,
srcs = [
"src/ct_helper.erl",
"src/ct_helper_error_h.erl"
],
outs = [
"ebin/ct_helper.beam",
"ebin/ct_helper_error_h.beam"
],
app_name = "ct_helper",
erlc_opts = "//:erlc_opts",
)
filegroup(
name = "beam_files",
testonly = True,
srcs = [":other_beam"],
)
filegroup(
name = "srcs",
testonly = True,
srcs = [
"src/ct_helper.app.src",
"src/ct_helper.erl",
"src/ct_helper_error_h.erl"
],
)
filegroup(
name = "private_hdrs",
testonly = True,
)
filegroup(
name = "public_hdrs",
testonly = True,
)
filegroup(
name = "priv",
testonly = True,
)
filegroup(
name = "licenses",
testonly = True,
srcs = [
"LICENSE",
],
)
filegroup(
name = "public_and_private_hdrs",
testonly = True,
srcs = [
":private_hdrs",
":public_hdrs",
],
)
filegroup(
name = "all_srcs",
testonly = True,
srcs = [
":public_and_private_hdrs",
":srcs",
],
)
erlang_app(
name = "erlang_app",
testonly = True,
srcs = [":all_srcs"],
app_name = "ct_helper",
beam_files = [":beam_files"],
)
alias(
name = "ct_helper",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)