mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Adding support for restricting eunit to a specific application
This commit is contained in:
parent
1f3c49cae7
commit
9d09ccc99a
1 changed files with 13 additions and 1 deletions
|
@ -54,7 +54,19 @@
|
|||
%% Public API
|
||||
%% ===================================================================
|
||||
|
||||
eunit(Config, _File) ->
|
||||
eunit(Config, AppFile) ->
|
||||
%% Check for app global parameter; this ia comma-delimited list of apps
|
||||
%% on which we want to run eunit
|
||||
TargetApps = [list_to_atom(A) || A <- string:tokens(rebar_config:get_global(app, []), ",")],
|
||||
ThisApp = rebar_app_utils:app_name(AppFile),
|
||||
case lists:member(ThisApp, TargetApps) of
|
||||
true ->
|
||||
ok;
|
||||
false ->
|
||||
?CONSOLE("Skipping eunit on app ~p\n", [ThisApp]),
|
||||
throw(ok)
|
||||
end,
|
||||
|
||||
%% Make sure ?EUNIT_DIR/ directory exists (tack on dummy module)
|
||||
ok = filelib:ensure_dir(?EUNIT_DIR ++ "/foo"),
|
||||
|
||||
|
|
Loading…
Reference in a new issue