diff options
author | Fred Hebert <mononcqc@ferd.ca> | 2017-11-24 14:28:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-24 14:28:06 -0500 |
commit | efeaa91f0b9a53909b0258f078f22bac7c4f5507 (patch) | |
tree | 4ac4d9fdd8a0f657d2c81a961b4d099100c23969 /src/rebar_prv_common_test.erl | |
parent | 46a54ef5fd7f1df63b3823ec4b30ceec1277b313 (diff) | |
parent | 26136b6b54e95d3832c1ffe2f8bbab642c01ba1d (diff) |
Merge pull request #1671 from erlang/revert-1670-ct-retry
Revert "Add experimental support for ct --retry option"
Diffstat (limited to 'src/rebar_prv_common_test.erl')
-rw-r--r-- | src/rebar_prv_common_test.erl | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/rebar_prv_common_test.erl b/src/rebar_prv_common_test.erl index a88753c..2443710 100644 --- a/src/rebar_prv_common_test.erl +++ b/src/rebar_prv_common_test.erl @@ -213,10 +213,10 @@ add_hooks(Opts, State) -> {false, _} -> Opts; {true, false} -> - [{ct_hooks, [cth_readable_failonly, cth_readable_shell, cth_retry]} | Opts]; + [{ct_hooks, [cth_readable_failonly, cth_readable_shell]} | Opts]; {true, {ct_hooks, Hooks}} -> %% Make sure hooks are there once only. - ReadableHooks = [cth_readable_failonly, cth_readable_shell, cth_retry], + ReadableHooks = [cth_readable_failonly, cth_readable_shell], NewHooks = (Hooks -- ReadableHooks) ++ ReadableHooks, lists:keyreplace(ct_hooks, 1, Opts, {ct_hooks, NewHooks}) end. @@ -272,15 +272,6 @@ is_any_defined([Key|Keys],Opts) -> is_any_defined([],_Opts) -> false. -should_retry(State, Opts) -> - case proplists:get_value(retry, Opts, false) of - false -> - false; - true -> - Path = filename:join([rebar_dir:base_dir(State), "logs", "retry.spec"]), - filelib:is_file(Path) andalso {true, Path} - end. - sys_config_list(CmdOpts, CfgOpts) -> CmdSysConfigs = split_string(proplists:get_value(sys_config, CmdOpts, "")), case proplists:get_value(sys_config, CfgOpts, []) of @@ -294,15 +285,9 @@ sys_config_list(CmdOpts, CfgOpts) -> discover_tests(State, ProjectApps, Opts) -> case is_any_defined([spec,dir,suite],Opts) of - true -> {ok, Opts}; %% no tests defined, try using `$APP/test` and `$ROOT/test` as dirs - false -> - case should_retry(State, Opts) of - false -> - {ok, [default_tests(State, ProjectApps)|Opts]}; - {true, Path} -> - {ok, [{spec, Path} | Opts]} - end + false -> {ok, [default_tests(State, ProjectApps)|Opts]}; + true -> {ok, Opts} end. default_tests(State, ProjectApps) -> @@ -766,8 +751,7 @@ ct_opts(_State) -> {sname, undefined, "sname", atom, help(sname)}, {setcookie, undefined, "setcookie", atom, help(setcookie)}, {sys_config, undefined, "sys_config", string, help(sys_config)}, %% comma-separated list - {compile_only, undefined, "compile_only", boolean, help(compile_only)}, - {retry, undefined, "retry", boolean, help(retry)} + {compile_only, undefined, "compile_only", boolean, help(compile_only)} ]. help(compile_only) -> @@ -836,7 +820,5 @@ help(sname) -> "Gives a short name to the node"; help(setcookie) -> "Sets the cookie if the node is distributed"; -help(retry) -> - "Experimental feature. If any specification for previously failing test is found, runs them."; help(_) -> "". |