summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2010-06-25 15:12:02 -0600
committerDave Smith <dizzyd@dizzyd.com>2010-06-25 15:12:02 -0600
commitf75bcdc7d59373d8a8bb85177f2008677cee7e62 (patch)
treeef802ff6803484341be132d49b4c7d64efa37599 /src
parent0df95cc7f29889cfd0dca20c2ec83f2fef71b9b3 (diff)
Only skip eunit on apps IIF the app= parameter is specified
--HG-- extra : rebase_source : 2f2b819e209a912424c328dd57ec5e00268d40bc
Diffstat (limited to 'src')
-rw-r--r--src/rebar_eunit.erl21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/rebar_eunit.erl b/src/rebar_eunit.erl
index a985f86..2bbcd54 100644
--- a/src/rebar_eunit.erl
+++ b/src/rebar_eunit.erl
@@ -57,14 +57,21 @@
eunit(Config, AppFile) ->
%% Check for app global parameter; this is a 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 ->
+ case rebar_config:get_global(app, undefined) of
+ undefined ->
+ %% No app parameter specified, run everything..
ok;
- false ->
- ?DEBUG("Skipping eunit on app: ~p\n", [ThisApp]),
- throw(ok)
+
+ Apps ->
+ TargetApps = [list_to_atom(A) || A <- string:tokens(Apps, ",")],
+ ThisApp = rebar_app_utils:app_name(AppFile),
+ case lists:member(ThisApp, TargetApps) of
+ true ->
+ ok;
+ false ->
+ ?DEBUG("Skipping eunit on app: ~p\n", [ThisApp]),
+ throw(ok)
+ end
end,
%% Make sure ?EUNIT_DIR/ directory exists (tack on dummy module)