Fix code clarity and formatting

This commit is contained in:
Tuncer Ayaz 2011-03-22 11:12:57 +01:00
parent cd3653616b
commit 2ee4899d24

View file

@ -125,12 +125,12 @@ make_cmd(TestDir, Config) ->
LogDir = filename:join(Cwd, "logs"), LogDir = filename:join(Cwd, "logs"),
EbinDir = filename:absname(filename:join(Cwd, "ebin")), EbinDir = filename:absname(filename:join(Cwd, "ebin")),
IncludeDir = filename:join(Cwd, "include"), IncludeDir = filename:join(Cwd, "include"),
case filelib:is_dir(IncludeDir) of Include = case filelib:is_dir(IncludeDir) of
true -> true ->
Include = " -include \"" ++ IncludeDir ++ "\""; " -include \"" ++ IncludeDir ++ "\"";
false -> false ->
Include = "" ""
end, end,
%% Add the code path of the rebar process to the code path. This %% Add the code path of the rebar process to the code path. This
%% includes the dependencies in the code path. The directories %% includes the dependencies in the code path. The directories
@ -142,8 +142,8 @@ make_cmd(TestDir, Config) ->
Dir <- [EbinDir|NonLibCodeDirs]], Dir <- [EbinDir|NonLibCodeDirs]],
CodePathString = string:join(CodeDirs, " "), CodePathString = string:join(CodeDirs, " "),
Cmd = case get_ct_specs(Cwd) of Cmd = case get_ct_specs(Cwd) of
undefined -> undefined ->
?FMT("erl " % should we expand ERL_PATH? ?FMT("erl " % should we expand ERL_PATH?
" -noshell -pa ~s ~s" " -noshell -pa ~s ~s"
" -s ct_run script_start -s erlang halt" " -s ct_run script_start -s erlang halt"
" -name test@~s" " -name test@~s"
@ -154,13 +154,13 @@ make_cmd(TestDir, Config) ->
net_adm:localhost(), net_adm:localhost(),
LogDir, LogDir,
filename:join(Cwd, TestDir)]) ++ filename:join(Cwd, TestDir)]) ++
get_cover_config(Config, Cwd) ++ get_cover_config(Config, Cwd) ++
get_ct_config_file(TestDir) ++ get_ct_config_file(TestDir) ++
get_config_file(TestDir) ++ get_config_file(TestDir) ++
get_suite(TestDir) ++ get_suite(TestDir) ++
get_case(); get_case();
SpecFlags -> SpecFlags ->
?FMT("erl " % should we expand ERL_PATH? ?FMT("erl " % should we expand ERL_PATH?
" -noshell -pa ~s ~s" " -noshell -pa ~s ~s"
" -s ct_run script_start -s erlang halt" " -s ct_run script_start -s erlang halt"
" -name test@~s" " -name test@~s"
@ -171,8 +171,8 @@ make_cmd(TestDir, Config) ->
net_adm:localhost(), net_adm:localhost(),
LogDir, LogDir,
filename:join(Cwd, TestDir)]) ++ filename:join(Cwd, TestDir)]) ++
SpecFlags ++ get_cover_config(Config, Cwd) SpecFlags ++ get_cover_config(Config, Cwd)
end, end,
RawLog = filename:join(LogDir, "raw.log"), RawLog = filename:join(LogDir, "raw.log"),
{Cmd, RawLog}. {Cmd, RawLog}.