Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix indentation in rebar_ct

  • Loading branch information...
commit bb6731208e1dce5255e820d5c5fe2763aa491991 1 parent 3b0568e
Tuncer Ayaz tuncer authored

Showing 1 changed file with 20 additions and 20 deletions. Show diff stats Hide diff stats

  1. +20 20 src/rebar_ct.erl
40 src/rebar_ct.erl
@@ -77,13 +77,13 @@ run_test(TestDir, Config, _File) ->
77 77
78 78 clear_log(RawLog) ->
79 79 case filelib:ensure_dir("logs/index.html") of
80   - ok ->
81   - NowStr = rebar_utils:now_str(),
82   - LogHeader = "--- Test run on " ++ NowStr ++ " ---\n",
83   - ok = file:write_file(RawLog, LogHeader);
84   - {error, Reason} ->
85   - ?ERROR("Could not create log dir - ~p\n", [Reason]),
86   - ?FAIL
  80 + ok ->
  81 + NowStr = rebar_utils:now_str(),
  82 + LogHeader = "--- Test run on " ++ NowStr ++ " ---\n",
  83 + ok = file:write_file(RawLog, LogHeader);
  84 + {error, Reason} ->
  85 + ?ERROR("Could not create log dir - ~p\n", [Reason]),
  86 + ?FAIL
87 87 end.
88 88
89 89 %% calling ct with erl does not return non-zero on failure - have to check
@@ -96,28 +96,28 @@ check_log(RawLog) ->
96 96 RunFailed = string:str(Msg, ", 0 failed") =:= 0,
97 97 if
98 98 MakeFailed ->
99   - show_log(RawLog),
100   - ?ERROR("Building tests failed\n",[]),
101   - ?FAIL;
  99 + show_log(RawLog),
  100 + ?ERROR("Building tests failed\n",[]),
  101 + ?FAIL;
102 102
103 103 RunFailed ->
104   - show_log(RawLog),
105   - ?ERROR("One or more tests failed\n",[]),
106   - ?FAIL;
  104 + show_log(RawLog),
  105 + ?ERROR("One or more tests failed\n",[]),
  106 + ?FAIL;
107 107
108   - true ->
109   - ?CONSOLE("DONE. ~s\n", [Msg])
  108 + true ->
  109 + ?CONSOLE("DONE. ~s\n", [Msg])
110 110 end.
111 111
112 112 %% Show the log if it hasn't already been shown because verbose was on
113 113 show_log(RawLog) ->
114 114 ?CONSOLE("Showing log\n", []),
115 115 case rebar_config:get_global(verbose, "0") of
116   - "0" ->
117   - {ok, Contents} = file:read_file(RawLog),
118   - ?CONSOLE("~s", [Contents]);
119   - _ ->
120   - ok
  116 + "0" ->
  117 + {ok, Contents} = file:read_file(RawLog),
  118 + ?CONSOLE("~s", [Contents]);
  119 + _ ->
  120 + ok
121 121 end.
122 122
123 123 make_cmd(TestDir, Config) ->

0 comments on commit bb67312

Please sign in to comment.
Something went wrong with that request. Please try again.