Skip to content

Commit

Permalink
Simplify BUILD files by using new macros from rules_erlang 3.9.0 (bac…
Browse files Browse the repository at this point in the history
…kport #6928) (backport #6934) (backport #6936) (#6949)

* Simplify BUILD files by using new macros from rules_erlang 3.9.0 (backport #6928) (backport #6934) (#6936)

* Simplify BUILD files by using new macros from rules_erlang 3.9.0 (backport #6928) (#6934)

* Use improved assert_suites2 macro from rules_erlang 3.9.0

(cherry picked from commit a317b30)

# Conflicts:
#	deps/rabbit/BUILD.bazel

* Invoke assert_suites macro in all deps/*

including those that don't currently have tests, in case tests are
added

(cherry picked from commit 5bb6090)

* Avoid the need to pass package name to rabbitmq_integration_suite

(cherry picked from commit 5ef8923)

# Conflicts:
#	deps/rabbit/BUILD.bazel

* Fixup backport

Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
(cherry picked from commit 7671052)

# Conflicts:
#	deps/rabbit/BUILD.bazel
#	deps/rabbitmq_amqp1_0/BUILD.bazel
#	deps/rabbitmq_federation/BUILD.bazel
#	deps/rabbitmq_management/BUILD.bazel
#	deps/rabbitmq_shovel_management/BUILD.bazel

* Fixup backport

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
(cherry picked from commit 9e3f7d5)

# Conflicts:
#	deps/rabbit/BUILD.bazel
#	deps/rabbitmq_amqp1_0/BUILD.bazel
#	deps/rabbitmq_auth_backend_oauth2/BUILD.bazel
#	deps/rabbitmq_federation/BUILD.bazel
#	deps/rabbitmq_management_agent/BUILD.bazel
#	deps/rabbitmq_peer_discovery_consul/BUILD.bazel
#	deps/rabbitmq_shovel/BUILD.bazel
#	deps/rabbitmq_shovel_management/BUILD.bazel
#	deps/rabbitmq_stomp/BUILD.bazel
#	deps/rabbitmq_stream/BUILD.bazel
#	deps/rabbitmq_web_dispatch/BUILD.bazel

* Fixup backport

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Rin Kuryloski <kuryloskip@vmware.com>
  • Loading branch information
mergify[bot] and pjk25 committed Jan 19, 2023
1 parent 1700c31 commit 35ab7a4
Show file tree
Hide file tree
Showing 43 changed files with 1,855 additions and 1,806 deletions.
67 changes: 33 additions & 34 deletions deps/amqp10_client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -76,39 +76,38 @@ broker_for_integration_suites(
extra_plugins = ["//deps/rabbitmq_amqp1_0:erlang_app"],
)

PACKAGE = "deps/amqp10_client"

suites = [
rabbitmq_suite(
name = "msg_SUITE",
deps = DEPS,
),
rabbitmq_integration_suite(
PACKAGE,
name = "system_SUITE",
size = "medium",
additional_hdrs = [
"src/amqp10_client.hrl",
],
additional_srcs = [
"test/activemq_ct_helpers.erl",
"test/mock_server.erl",
],
data = [
"@activemq//:exec_dir",
],
erlc_opts = [
"-I",
"deps/amqp10_client",
],
test_env = {
"ACTIVEMQ": "$TEST_SRCDIR/$TEST_WORKSPACE/external/activemq/bin/activemq",
},
deps = DEPS,
),
]
rabbitmq_suite(
name = "msg_SUITE",
deps = DEPS,
)

rabbitmq_integration_suite(
name = "system_SUITE",
size = "medium",
additional_hdrs = [
"src/amqp10_client.hrl",
],
additional_srcs = [
"test/activemq_ct_helpers.erl",
"test/mock_server.erl",
],
data = [
"@activemq//:exec_dir",
],
erlc_opts = [
"-I",
"deps/amqp10_client",
],
test_env = {
"ACTIVEMQ": "$TEST_SRCDIR/$TEST_WORKSPACE/external/activemq/bin/activemq",
},
deps = DEPS,
)

assert_suites()

assert_suites(
suites,
glob(["test/**/*_SUITE.erl"]),
alias(
name = "amqp10_client",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
24 changes: 13 additions & 11 deletions deps/amqp10_common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,18 @@ dialyze(
plt = "//:base_plt",
)

suites = [
rabbitmq_suite(
name = "binary_generator_SUITE",
),
rabbitmq_suite(
name = "binary_parser_SUITE",
),
]
rabbitmq_suite(
name = "binary_generator_SUITE",
)

rabbitmq_suite(
name = "binary_parser_SUITE",
)

assert_suites()

assert_suites(
suites,
glob(["test/**/*_SUITE.erl"]),
alias(
name = "amqp10_common",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)
51 changes: 26 additions & 25 deletions deps/amqp_client/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ load("//:rabbitmq_home.bzl", "rabbitmq_home")
load("//:rabbitmq_run.bzl", "rabbitmq_run")
load(
"//:rabbitmq.bzl",
"RABBITMQ_DIALYZER_OPTS",
"assert_suites",
"rabbitmq_app",
"rabbitmq_integration_suite",
"rabbitmq_suite",
"RABBITMQ_DIALYZER_OPTS",
)

APP_ENV = """[
Expand Down Expand Up @@ -70,8 +70,8 @@ plt(
)

dialyze(
plt = ":base_plt",
dialyzer_opts = RABBITMQ_DIALYZER_OPTS,
plt = ":base_plt",
)

rabbitmq_home(
Expand All @@ -86,28 +86,29 @@ rabbitmq_run(
home = ":broker-for-tests-home",
)

suites = [
rabbitmq_integration_suite(
"deps/amqp_client",
name = "system_SUITE",
size = "large",
runtime_deps = [
"@meck//:erlang_app",
],
),
rabbitmq_suite(
name = "unit_SUITE",
size = "small",
runtime_deps = [
"//deps/rabbit:erlang_app",
],
deps = [
"//deps/rabbit_common:erlang_app",
],
),
]
rabbitmq_integration_suite(
name = "system_SUITE",
size = "large",
runtime_deps = [
"@meck//:erlang_app",
],
)

rabbitmq_suite(
name = "unit_SUITE",
size = "small",
runtime_deps = [
"//deps/rabbit:erlang_app",
],
deps = [
"//deps/rabbit_common:erlang_app",
],
)

assert_suites()

assert_suites(
suites,
glob(["test/**/*_SUITE.erl"]),
alias(
name = "amqp_client",
actual = ":erlang_app",
visibility = ["//visibility:public"],
)

0 comments on commit 35ab7a4

Please sign in to comment.