From 940f9c232ba6c2896991d83ed8c5e296e470c5a0 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Thu, 31 Dec 2009 18:00:02 +0100 Subject: Enhanced option parsing with new getopt and made rebar more user friendly --- src/rebar_ct.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rebar_ct.erl') diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl index 41487ab..9cc05a1 100644 --- a/src/rebar_ct.erl +++ b/src/rebar_ct.erl @@ -71,8 +71,8 @@ run_test_if_present(TestDir, Config, File) -> run_test(TestDir, Config, _File) -> {Cmd, RawLog} = make_cmd(TestDir, Config), clear_log(RawLog), - case rebar_config:get_global(verbose, "0") of - "0" -> + case rebar_config:is_verbose() of + true -> Output = " >> " ++ RawLog ++ " 2>&1"; _ -> Output = " 2>&1 | tee -a " ++ RawLog @@ -123,8 +123,8 @@ check_log(RawLog) -> %% 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" -> + case rebar_config:is_verbose() of + true -> {ok, Contents} = file:read_file(RawLog), ?CONSOLE("~s", [Contents]); _ -> -- cgit v1.1 From 9a8015f2d78394e3652d2b7720442b77948412f6 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Thu, 31 Dec 2009 19:42:53 +0100 Subject: Added vi modeline/emacs local variables to file headers --- src/rebar_ct.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/rebar_ct.erl') diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl index 9cc05a1..7e6b745 100644 --- a/src/rebar_ct.erl +++ b/src/rebar_ct.erl @@ -1,3 +1,5 @@ +%% -*- tab-width: 4;erlang-indent-level: 4;indent-tabs-mode: nil -*- +%% ex: ts=4 sw=4 et %% ------------------------------------------------------------------- %% %% rebar: Erlang Build Tools -- cgit v1.1 From 0817dec7ca3a24955cc8f08fb359bf0f77ae1f4d Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Fri, 1 Jan 2010 00:08:00 +0100 Subject: Rolled back getopt to restore custom variables --- src/rebar_ct.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rebar_ct.erl') diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl index 7e6b745..2a03b11 100644 --- a/src/rebar_ct.erl +++ b/src/rebar_ct.erl @@ -73,8 +73,8 @@ run_test_if_present(TestDir, Config, File) -> run_test(TestDir, Config, _File) -> {Cmd, RawLog} = make_cmd(TestDir, Config), clear_log(RawLog), - case rebar_config:is_verbose() of - true -> + case rebar_config:get_global(verbose, "0") of + "0" -> Output = " >> " ++ RawLog ++ " 2>&1"; _ -> Output = " 2>&1 | tee -a " ++ RawLog @@ -125,8 +125,8 @@ check_log(RawLog) -> %% Show the log if it hasn't already been shown because verbose was on show_log(RawLog) -> ?CONSOLE("Showing log\n", []), - case rebar_config:is_verbose() of - true -> + case rebar_config:get_global(verbose, "0") of + "0" -> {ok, Contents} = file:read_file(RawLog), ?CONSOLE("~s", [Contents]); _ -> -- cgit v1.1