From f1a2f354c4aa79a50511e6adb8ffb67fe4ae8018 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Tue, 4 Oct 2022 12:42:40 +0200 Subject: [PATCH 1/2] test: ensure module loaded for ct-slave node before starting apps --- test/emqx_node_helpers.erl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/emqx_node_helpers.erl b/test/emqx_node_helpers.erl index ad530b3d7..af7093dd7 100644 --- a/test/emqx_node_helpers.erl +++ b/test/emqx_node_helpers.erl @@ -40,7 +40,9 @@ start_slave(Name, Opts) -> {ok, _} -> ok; {error, started_not_connected, _} -> - ok + ok; + Other -> + throw(Other) end, pong = net_adm:ping(Node), setup_node(Node, Opts), @@ -92,7 +94,11 @@ setup_node(Node, #{} = Opts) -> end, EnvHandler = maps:get(env_handler, Opts, DefaultEnvHandler), - [ok = rpc:call(Node, application, load, [App]) || App <- [gen_rpc, emqx]], + %% apps need to be loaded before starting for ekka to find and create mnesia tables + LoadApps = lists:usort([gen_rcp, emqx] ++ ?SLAVE_START_APPS), + lists:foreach(fun(App) -> + rpc:call(Node, application, load, [App]) + end, LoadApps), ok = rpc:call(Node, emqx_ct_helpers, start_apps, [StartApps, EnvHandler]), case maps:get(no_join, Opts, false) of From 206ab125a4b1157d7f1a17ebe6cb920980bc1f7b Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 6 Oct 2022 09:21:52 +0200 Subject: [PATCH 2/2] build: support additional checks before cutting a release tag --- scripts/rel/cut4x.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/rel/cut4x.sh b/scripts/rel/cut4x.sh index 58131c757..df142b936 100755 --- a/scripts/rel/cut4x.sh +++ b/scripts/rel/cut4x.sh @@ -230,6 +230,16 @@ if [ "$HAS_RELUP_DB" = 'yes' ]; then ./scripts/relup-base-vsns.escript check-vsn-db "$PKG_VSN" "$RELUP_PATHS" fi +## Run some additional checks (e.g. some for enterprise edition only) +CHECKS_DIR="./scripts/rel/checks" +if [ -d "${CHECKS_DIR}" ]; then + CHECKS="$(find "${CHECKS_DIR}" -name "*.sh" -print0 2>/dev/null | xargs -0)" + for c in $CHECKS; do + logmsg "Executing $c" + $c + done +fi + if [ "$DRYRUN" = 'yes' ]; then logmsg "Release tag is ready to be created with command: git tag $TAG" else