diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-01-09 12:34:19 +0100 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-01-13 17:39:14 +0100 |
commit | bb6731208e1dce5255e820d5c5fe2763aa491991 (patch) | |
tree | da27c36c3f353b5d3eea4dea9e42f31eca50cc1c | |
parent | 3b0568ebb7a43b2e3d30aab97265e60bc618f1a9 (diff) |
Fix indentation in rebar_ct
-rw-r--r-- | src/rebar_ct.erl | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl index 0c8e2ef..74399ee 100644 --- a/src/rebar_ct.erl +++ b/src/rebar_ct.erl @@ -77,13 +77,13 @@ run_test(TestDir, Config, _File) -> clear_log(RawLog) -> case filelib:ensure_dir("logs/index.html") of - ok -> - NowStr = rebar_utils:now_str(), - LogHeader = "--- Test run on " ++ NowStr ++ " ---\n", - ok = file:write_file(RawLog, LogHeader); - {error, Reason} -> - ?ERROR("Could not create log dir - ~p\n", [Reason]), - ?FAIL + ok -> + NowStr = rebar_utils:now_str(), + LogHeader = "--- Test run on " ++ NowStr ++ " ---\n", + ok = file:write_file(RawLog, LogHeader); + {error, Reason} -> + ?ERROR("Could not create log dir - ~p\n", [Reason]), + ?FAIL end. %% calling ct with erl does not return non-zero on failure - have to check @@ -96,28 +96,28 @@ check_log(RawLog) -> RunFailed = string:str(Msg, ", 0 failed") =:= 0, if MakeFailed -> - show_log(RawLog), - ?ERROR("Building tests failed\n",[]), - ?FAIL; + show_log(RawLog), + ?ERROR("Building tests failed\n",[]), + ?FAIL; RunFailed -> - show_log(RawLog), - ?ERROR("One or more tests failed\n",[]), - ?FAIL; + show_log(RawLog), + ?ERROR("One or more tests failed\n",[]), + ?FAIL; - true -> - ?CONSOLE("DONE. ~s\n", [Msg]) + true -> + ?CONSOLE("DONE. ~s\n", [Msg]) end. %% Show the log if it hasn't already been shown because verbose was on show_log(RawLog) -> ?CONSOLE("Showing log\n", []), case rebar_config:get_global(verbose, "0") of - "0" -> - {ok, Contents} = file:read_file(RawLog), - ?CONSOLE("~s", [Contents]); - _ -> - ok + "0" -> + {ok, Contents} = file:read_file(RawLog), + ?CONSOLE("~s", [Contents]); + _ -> + ok end. make_cmd(TestDir, Config) -> |