diff options
author | Paweł Chmielowski <pawel@process-one.net> | 2015-04-09 18:14:30 +0300 |
---|---|---|
committer | Paweł Chmielowski <pawel@process-one.net> | 2015-04-09 18:14:30 +0300 |
commit | b9fdcc3985278b3ea108786c04c532b38b754bf1 (patch) | |
tree | b181f975f088ae77d3a8e4528d094f6c13f3f92c /rebar.config.script | |
parent | e8701802ee28cd8c8dfd4c182b93b60aca3eb22e (diff) |
Add ability to configure parameters used by "make test" with test/config.ctc
Diffstat (limited to 'rebar.config.script')
-rw-r--r-- | rebar.config.script | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/rebar.config.script b/rebar.config.script index 37ee5acbb..2c42c961d 100644 --- a/rebar.config.script +++ b/rebar.config.script @@ -164,12 +164,21 @@ ElixirConfig = case lists:keysearch(elixir, 1, Cfg) of {ok, Cwd} = file:get_cwd(), +TestConfigFile = filename:join([Cwd, "test", "config.ctc"]), +TestConfig = case file:read_file_info(TestConfigFile) of + {ok, _} -> + "-userconfig ct_config_plain " ++ TestConfigFile ++ " "; + _ -> + "" + end, + Config = [{erl_opts, Macros ++ HiPE ++ DebugInfo ++ [{src_dirs, [asn1, src | SrcDirs]}]}, {sub_dirs, ["rel"]}, {keep_build_info, true}, - {ct_extra_params, "-include " - ++ filename:join([Cwd, "tools"])}, + {ct_extra_params, "-ct_hooks cth_surefire " + ++ TestConfig + ++ "-include " ++ filename:join([Cwd, "tools"])}, {xref_warnings, false}, {xref_checks, []}, {xref_queries, |