mirror of
https://github.com/correl/rebar.git
synced 2024-11-15 11:09:33 +00:00
Add awareness of 'app' parameter to ct module
This commit is contained in:
parent
1ef230262b
commit
578ba06ad9
1 changed files with 14 additions and 2 deletions
|
@ -46,8 +46,20 @@
|
|||
%% ===================================================================
|
||||
|
||||
ct(Config, File) ->
|
||||
run_test_if_present("test", Config, File).
|
||||
|
||||
case rebar_config:get_global(app, undefined) of
|
||||
undefined ->
|
||||
%% No app parameter specified, run everything..
|
||||
run_test_if_present("test", Config, File);
|
||||
Apps ->
|
||||
TargetApps = [list_to_atom(A) || A <- string:tokens(Apps, ",")],
|
||||
ThisApp = rebar_app_utils:app_name(File),
|
||||
case lists:member(ThisApp, TargetApps) of
|
||||
true ->
|
||||
run_test_if_present("test", Config, File);
|
||||
false ->
|
||||
?DEBUG("Skipping common_test on app: ~p\n", [ThisApp])
|
||||
end
|
||||
end.
|
||||
|
||||
%% ===================================================================
|
||||
%% Internal functions
|
||||
|
|
Loading…
Reference in a new issue