diff options
author | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-03-23 17:24:38 +0100 |
---|---|---|
committer | Jean-Sébastien Pédron <jean-sebastien@rabbitmq.com> | 2020-03-23 17:24:38 +0100 |
commit | 75f8cb8c6f20ae59dd2417ebc136d269ff040884 (patch) | |
tree | bf4f5033c95301c0ce71017c174d3bab4261f45f | |
parent | 194bc4c8b665c47a152f6b186a0c3579717c5cdc (diff) | |
download | rabbitmq-server-git-75f8cb8c6f20ae59dd2417ebc136d269ff040884.tar.gz |
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`).
-rw-r--r-- | test/feature_flags_SUITE.erl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/feature_flags_SUITE.erl b/test/feature_flags_SUITE.erl index 76881b9679..e3dd3a64db 100644 --- a/test/feature_flags_SUITE.erl +++ b/test/feature_flags_SUITE.erl @@ -905,7 +905,19 @@ build_my_plugin(Config) -> [] -> DepsDir = ?config(erlang_mk_depsdir, Config), Args = ["test-dist", - {"DEPS_DIR=~s", [DepsDir]}], + {"DEPS_DIR=~s", [DepsDir]}, + %% 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`). + "ALL_DEPS_DIRS="], case rabbit_ct_helpers:make(Config1, PluginSrcDir, Args) of {ok, _} -> {_, OtherPlugins1} = list_my_plugin_plugins(PluginSrcDir), |