mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Only skip eunit on apps IIF the app= parameter is specified
--HG-- extra : rebase_source : 2f2b819e209a912424c328dd57ec5e00268d40bc
This commit is contained in:
parent
0df95cc7f2
commit
f75bcdc7d5
1 changed files with 14 additions and 7 deletions
|
@ -57,7 +57,13 @@
|
||||||
eunit(Config, AppFile) ->
|
eunit(Config, AppFile) ->
|
||||||
%% Check for app global parameter; this is a comma-delimited list
|
%% Check for app global parameter; this is a comma-delimited list
|
||||||
%% of apps on which we want to run eunit
|
%% of apps on which we want to run eunit
|
||||||
TargetApps = [list_to_atom(A) || A <- string:tokens(rebar_config:get_global(app, []), ",")],
|
case rebar_config:get_global(app, undefined) of
|
||||||
|
undefined ->
|
||||||
|
%% No app parameter specified, run everything..
|
||||||
|
ok;
|
||||||
|
|
||||||
|
Apps ->
|
||||||
|
TargetApps = [list_to_atom(A) || A <- string:tokens(Apps, ",")],
|
||||||
ThisApp = rebar_app_utils:app_name(AppFile),
|
ThisApp = rebar_app_utils:app_name(AppFile),
|
||||||
case lists:member(ThisApp, TargetApps) of
|
case lists:member(ThisApp, TargetApps) of
|
||||||
true ->
|
true ->
|
||||||
|
@ -65,6 +71,7 @@ eunit(Config, AppFile) ->
|
||||||
false ->
|
false ->
|
||||||
?DEBUG("Skipping eunit on app: ~p\n", [ThisApp]),
|
?DEBUG("Skipping eunit on app: ~p\n", [ThisApp]),
|
||||||
throw(ok)
|
throw(ok)
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
%% Make sure ?EUNIT_DIR/ directory exists (tack on dummy module)
|
%% Make sure ?EUNIT_DIR/ directory exists (tack on dummy module)
|
||||||
|
|
Loading…
Reference in a new issue