Skip to content

Commit a284327

Browse files
committed
feature_flags_SUITE: Make sure rabbit is not recompiled
... while building `my_plugin`. We clear ALL_DEPS_DIRS to make sure they are not recompiled when the plugin is built. `rabbit` was previously compiled with -DTEST and if it is recompiled because of this plugin, it will be recompiled without -DTEST: the testsuite depends on test code so we can't allow that. Note that we do not clear the DEPS variable: we need it to be correct because it is used to generate `my_plugin.app` (and a RabbitMQ plugin must depend on `rabbit`). (cherry picked from commit 75f8cb8)
1 parent fde30a0 commit a284327

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/feature_flags_SUITE.erl

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,7 +901,19 @@ build_my_plugin(Config) ->
901901
[] ->
902902
DepsDir = ?config(erlang_mk_depsdir, Config),
903903
Args = ["test-dist",
904-
{"DEPS_DIR=~s", [DepsDir]}],
904+
{"DEPS_DIR=~s", [DepsDir]},
905+
%% We clear ALL_DEPS_DIRS to make sure they are
906+
%% not recompiled when the plugin is built. `rabbit`
907+
%% was previously compiled with -DTEST and if it is
908+
%% recompiled because of this plugin, it will be
909+
%% recompiled without -DTEST: the testsuite depends
910+
%% on test code so we can't allow that.
911+
%%
912+
%% Note that we do not clear the DEPS variable:
913+
%% we need it to be correct because it is used to
914+
%% generate `my_plugin.app` (and a RabbitMQ plugin
915+
%% must depend on `rabbit`).
916+
"ALL_DEPS_DIRS="],
905917
case rabbit_ct_helpers:make(Config1, PluginSrcDir, Args) of
906918
{ok, _} ->
907919
{_, OtherPlugins1} = list_my_plugin_plugins(PluginSrcDir),

0 commit comments

Comments
 (0)