diff options
author | Tino Breddin <tino.breddin@erlang-solutions.com> | 2011-04-05 15:56:28 +0200 |
---|---|---|
committer | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2011-08-04 18:38:49 +0200 |
commit | 578ba06ad99e5157c49d2c49ddef000574c95e4f (patch) | |
tree | cb2c50696a2e1c777f24fcacca72076964e39e96 | |
parent | 1ef230262ba223aff467edad1c3fceee69868d42 (diff) |
Add awareness of 'app' parameter to ct module
-rw-r--r-- | src/rebar_ct.erl | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/rebar_ct.erl b/src/rebar_ct.erl index 2b6c5e3..1b5ceff 100644 --- a/src/rebar_ct.erl +++ b/src/rebar_ct.erl @@ -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 |