summaryrefslogtreecommitdiff
path: root/src/rebar_ct.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/rebar_ct.erl')
-rw-r--r--src/rebar_ct.erl16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl
index 04b2a51..f3ed29f 100644
--- a/src/rebar_ct.erl
+++ b/src/rebar_ct.erl
@@ -101,7 +101,7 @@ run_test(TestDir, LogDir, Config, _File) ->
{Cmd, RawLog} = make_cmd(TestDir, LogDir, Config),
?DEBUG("ct_run cmd:~n~p~n", [Cmd]),
clear_log(LogDir, RawLog),
- Output = case rebar_config:is_verbose(Config) of
+ Output = case rebar_log:is_verbose(Config) of
false ->
" >> " ++ RawLog ++ " 2>&1";
true ->
@@ -149,7 +149,7 @@ check_fail_log(Config, RawLog, Command, Result) ->
check_log(Config,RawLog,Fun) ->
{ok, Msg} =
- rebar_utils:sh("grep -e 'TEST COMPLETE' -e '{error,make_failed}' "
+ rebar_utils:sh("grep -e \"TEST COMPLETE\" -e \"{error,make_failed}\" "
++ RawLog, [{use_stdout, false}]),
MakeFailed = string:str(Msg, "{error,make_failed}") =/= 0,
RunFailed = string:str(Msg, ", 0 failed") =:= 0,
@@ -172,7 +172,7 @@ check_log(Config,RawLog,Fun) ->
%% Show the log if it hasn't already been shown because verbose was on
show_log(Config, RawLog) ->
?CONSOLE("Showing log\n", []),
- case rebar_config:is_verbose(Config) of
+ case rebar_log:is_verbose(Config) of
false ->
{ok, Contents} = file:read_file(RawLog),
?CONSOLE("~s", [Contents]);
@@ -320,7 +320,7 @@ get_config_file(TestDir) ->
end.
get_suites(Config, TestDir) ->
- case rebar_config:get_global(Config, suites, undefined) of
+ case get_suites(Config) of
undefined ->
" -dir " ++ TestDir;
Suites ->
@@ -329,6 +329,14 @@ get_suites(Config, TestDir) ->
string:join([" -suite"] ++ Suites2, " ")
end.
+get_suites(Config) ->
+ case rebar_config:get_global(Config, suites, undefined) of
+ undefined ->
+ rebar_config:get_global(Config, suite, undefined);
+ Suites ->
+ Suites
+ end.
+
find_suite_path(Suite, TestDir) ->
Path = filename:join(TestDir, Suite ++ "_SUITE.erl"),
case filelib:is_regular(Path) of