25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Fix includes in eunit compilation flags

This commit is contained in:
Paweł Chmielowski 2016-11-18 14:02:47 +01:00
parent daab95e3b5
commit d00a634025
2 changed files with 13 additions and 6 deletions

View File

@ -113,7 +113,8 @@
{if_var_false, elixir, "(\"Elixir.*\":_/_)"},
{if_var_false, redis, "(\"eredis\":_/_)"}]}.
{eunit_compile_opts, [{i, "tools"}]}.
{eunit_compile_opts, [{i, "tools"}, {i, "include"},
{i, "deps/fast_xml/include"}]}.
{if_version_above, "17", {cover_enabled, true}}.
{cover_export_enabled, true}.

View File

@ -121,10 +121,16 @@ TestConfig = case file:read_file_info(TestConfigFile) of
""
end,
Conf2 = [{ct_extra_params, "-ct_hooks cth_surefire "
++ TestConfig
++ "-include "
++ filename:join([Cwd, "tools"])} | Conf1],
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} ->