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

@ -119,12 +119,18 @@ TestConfig = case file:read_file_info(TestConfigFile) of
"-userconfig ct_config_plain " ++ TestConfigFile ++ " ";
_ ->
""
end,
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} ->