Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2016-11-18 16:02:47 +0300
committerPaweł Chmielowski <pchmielowski@process-one.net>2016-11-18 16:02:47 +0300
commitd00a6340253ccc551eca091b362473cdb3859966 (patch)
treeff9fd9e1ce68bd0a688e0dbdcae43fd5843566cb /rebar.config.script
parentdaab95e3b5d47327f07ec7efd1189e71a41e6439 (diff)
Fix includes in eunit compilation flags
Diffstat (limited to 'rebar.config.script')
-rw-r--r--rebar.config.script18
1 files changed, 12 insertions, 6 deletions
diff --git a/rebar.config.script b/rebar.config.script
index ccafba7ec..2a924d26c 100644
--- a/rebar.config.script
+++ b/rebar.config.script
@@ -119,12 +119,18 @@ TestConfig = case file:read_file_info(TestConfigFile) of
"-userconfig ct_config_plain " ++ TestConfigFile ++ " ";
_ ->
""
- end,
-
-Conf2 = [{ct_extra_params, "-ct_hooks cth_surefire "
- ++ TestConfig
- ++ "-include "
- ++ filename:join([Cwd, "tools"])} | Conf1],
+ end,
+
+CtIncludes = case lists:keyfind(eunit_compile_opts, 1, Conf1) of
+ false ->
+ [];
+ {_, EunitCompOpts} ->
+ [[" -include ", filename:join([Cwd, IncPath])]
+ || {i, IncPath} <- EunitCompOpts]
+ end,
+
+Conf2 = [{ct_extra_params, lists:flatten(["-ct_hooks cth_surefire ", TestConfig,
+ CtIncludes])} | Conf1],
Conf3 = case lists:keytake(xref_exclusions, 1, Conf2) of
{value, {_, Items2}, Rest2} ->