{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}.
"-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} ->