aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test/ct_groups_test_2_SUITE.erl
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2011-04-18 15:37:30 +0200
committerPeter Andersson <[email protected]>2011-04-28 22:43:53 +0200
commitb4c851d574b6e9ebd29ffd41b7ebd76b0912b7cf (patch)
treec2e17b1a38eac92a14c7c7e438c8ad72f565accc /lib/common_test/test/ct_groups_test_2_SUITE.erl
parent75084ccccb24b6a7d91120cd5ce3732fe17175f2 (diff)
downloadotp-b4c851d574b6e9ebd29ffd41b7ebd76b0912b7cf.tar.gz
otp-b4c851d574b6e9ebd29ffd41b7ebd76b0912b7cf.tar.bz2
otp-b4c851d574b6e9ebd29ffd41b7ebd76b0912b7cf.zip
Add test case for suite with empty group.
Diffstat (limited to 'lib/common_test/test/ct_groups_test_2_SUITE.erl')
-rw-r--r--lib/common_test/test/ct_groups_test_2_SUITE.erl34
1 files changed, 29 insertions, 5 deletions
diff --git a/lib/common_test/test/ct_groups_test_2_SUITE.erl b/lib/common_test/test/ct_groups_test_2_SUITE.erl
index 65c7e75080..43a2b86602 100644
--- a/lib/common_test/test/ct_groups_test_2_SUITE.erl
+++ b/lib/common_test/test/ct_groups_test_2_SUITE.erl
@@ -59,7 +59,7 @@ end_per_testcase(TestCase, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [missing_conf, repeat_1].
+ [missing_conf, repeat_1, empty_group].
groups() ->
[].
@@ -83,7 +83,7 @@ missing_conf(Config) when is_list(Config) ->
Suite = filename:join(DataDir, "groups_1/missing_conf_SUITE"),
- {Opts,ERPid} = setup({suite,Suite}, Config),
+ {Opts,ERPid} = setup([{suite,Suite}], Config),
ok = ct_test_support:run(Opts, Config),
Events = ct_test_support:get_events(ERPid, Config),
@@ -103,7 +103,7 @@ repeat_1(Config) when is_list(Config) ->
Suite = filename:join(DataDir, "groups_1/repeat_1_SUITE"),
- {Opts,ERPid} = setup({suite,Suite}, Config),
+ {Opts,ERPid} = setup([{suite,Suite}], Config),
ok = ct_test_support:run(Opts, Config),
Events = ct_test_support:get_events(ERPid, Config),
@@ -116,6 +116,27 @@ repeat_1(Config) when is_list(Config) ->
ok = ct_test_support:verify_events(TestEvents, Events, Config).
%%%-----------------------------------------------------------------
+%%%
+
+empty_group(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+
+ Suite = filename:join(DataDir, "groups_2/groups_22_SUITE"),
+
+ {Opts,ERPid} = setup([{suite,Suite},
+ {group,[test_group_8,test_group_9]}],
+ Config),
+ ok = ct_test_support:run(Opts, Config),
+ Events = ct_test_support:get_events(ERPid, Config),
+
+ ct_test_support:log_events(empty_group,
+ reformat(Events, ?eh),
+ ?config(priv_dir, Config)),
+
+ TestEvents = events_to_check(empty_group),
+ ok = ct_test_support:verify_events(TestEvents, Events, Config).
+
+%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
%%%-----------------------------------------------------------------
@@ -123,7 +144,7 @@ setup(Test, Config) ->
Opts0 = ct_test_support:get_opts(Config),
Level = ?config(trace_level, Config),
EvHArgs = [{cbm,ct_test_support},{trace_level,Level}],
- Opts = Opts0 ++ [Test,{event_handler,{?eh,EvHArgs}}],
+ Opts = Opts0 ++ [{event_handler,{?eh,EvHArgs}} | Test],
ERPid = ct_test_support:start_event_receiver(Config),
{Opts,ERPid}.
@@ -258,4 +279,7 @@ test_events(repeat_1) ->
{?eh,tc_done,{repeat_1_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
- ].
+ ];
+
+test_events(empty_group) ->
+ [].