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.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl
index 316998f..d6d4675 100644
--- a/src/rebar_ct.erl
+++ b/src/rebar_ct.erl
@@ -71,7 +71,7 @@ run_test(TestDir, Config, _File) ->
Output = " 2>&1 | tee -a " ++ RawLog
end,
- rebar_utils:sh(Cmd ++ Output, [{"TESTDIR", TestDir}]),
+ rebar_utils:sh(Cmd ++ Output, [{env,[{"TESTDIR", TestDir}]}]),
check_log(RawLog).
@@ -89,7 +89,9 @@ clear_log(RawLog) ->
%% calling ct with erl does not return non-zero on failure - have to check
%% log results
check_log(RawLog) ->
- Msg = os:cmd("grep -e 'TEST COMPLETE' -e '{error,make_failed}' " ++ RawLog),
+ {ok, Msg} =
+ 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,
if