aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/common_test/test')
-rw-r--r--lib/common_test/test/ct_test_server_if_1_SUITE.erl196
-rw-r--r--lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_7_SUITE.erl16
2 files changed, 133 insertions, 79 deletions
diff --git a/lib/common_test/test/ct_test_server_if_1_SUITE.erl b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
index 64957a76c9..c4b3191801 100644
--- a/lib/common_test/test/ct_test_server_if_1_SUITE.erl
+++ b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
@@ -65,12 +65,12 @@ groups() ->
[].
init_per_group(_GroupName, Config) ->
- Config.
+ Config.
end_per_group(_GroupName, Config) ->
- Config.
+ Config.
+
-
%%--------------------------------------------------------------------
%% TEST CASES
@@ -104,7 +104,7 @@ ts_if_1(Config) when is_list(Config) ->
TestEvents = events_to_check(ts_if_1),
ok = ct_test_support:verify_events(TestEvents, Events, Config).
-
+
%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
@@ -112,17 +112,17 @@ ts_if_1(Config) when is_list(Config) ->
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}}],
+ % Level = ?config(trace_level, Config),
+ % EvHArgs = [{cbm,ct_test_support},{trace_level,Level}],
+ % Opts = Opts0 ++ [Test,{event_handler,{?eh,EvHArgs}}],
Opts = [Test | Opts0],
ERPid = ct_test_support:start_event_receiver(Config),
{Opts,ERPid}.
reformat(Events, EH) ->
ct_test_support:reformat(Events, EH).
-%reformat(Events, _EH) ->
-% Events.
+ %reformat(Events, _EH) ->
+ % Events.
%%%-----------------------------------------------------------------
%%% TEST EVENTS
@@ -140,14 +140,15 @@ test_events(ts_if_1) ->
[
{?eh,start_logging,{'DEF','RUNDIR'}},
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
- {?eh,start_info,{10,6,26}},
+ {?eh,start_info,{10,8,25}},
+
{?eh,tc_start,{ts_if_1_SUITE,init_per_suite}},
{?eh,tc_done,{ts_if_1_SUITE,init_per_suite,ok}},
{?eh,tc_start,{ts_if_1_SUITE,tc1}},
- {?eh,tc_done,{ts_if_1_SUITE,tc1,{auto_skipped,
- {failed,
- {ts_if_1_SUITE,init_per_testcase,
- {timetrap_timeout,2000}}}}}},
+ {?eh,tc_done,{ts_if_1_SUITE,tc1,
+ {auto_skipped,
+ {failed,
+ {ts_if_1_SUITE,init_per_testcase,{timetrap_timeout,2000}}}}}},
{?eh,test_stats,{0,0,{0,1}}},
{?eh,tc_start,{ts_if_1_SUITE,tc2}},
{?eh,tc_done,{ts_if_1_SUITE,tc2,
@@ -173,107 +174,148 @@ test_events(ts_if_1) ->
{?eh,tc_done,{ts_if_1_SUITE,{end_per_group,seq2,[sequence]},ok}}],
{?eh,tc_start,{ts_if_1_SUITE,tc6}},
- {?eh,tc_done,{ts_if_1_SUITE,tc6,{auto_skipped,
- {require_failed,{not_available,void}}}}},
+ {?eh,tc_done,{ts_if_1_SUITE,tc6,{auto_skipped,{require_failed,
+ {not_available,void}}}}},
{?eh,test_stats,{1,3,{0,4}}},
- {?eh,tc_start,{ts_if_1_SUITE,tc7}},
- {?eh,tc_done,{ts_if_1_SUITE,tc7,ok}},
- {?eh,test_stats,{2,3,{0,4}}},
+ {?eh,tc_done,{ts_if_1_SUITE,tc7,{auto_skipped,
+ {testcase0_failed,bad_return_value}}}},
+ {?eh,test_stats,{1,3,{0,5}}},
{?eh,tc_start,{ts_if_1_SUITE,tc8}},
{?eh,tc_done,{ts_if_1_SUITE,tc8,{skipped,"tc8 skipped"}}},
- {?eh,test_stats,{2,3,{1,4}}},
+ {?eh,test_stats,{1,3,{1,5}}},
{?eh,tc_start,{ts_if_1_SUITE,tc9}},
{?eh,tc_done,{ts_if_1_SUITE,tc9,{skipped,'tc9 skipped'}}},
- {?eh,test_stats,{2,3,{2,4}}},
+ {?eh,test_stats,{1,3,{2,5}}},
{?eh,tc_start,{ts_if_1_SUITE,tc10}},
- {?eh,tc_done,{ts_if_1_SUITE,tc10,{failed,{error,{function_clause,'_'}}}}},
- {?eh,test_stats,{2,4,{2,4}}},
+ {?eh,tc_done,{ts_if_1_SUITE,tc10,
+ {failed,{error,{function_clause,'_'}}}}},
+ {?eh,test_stats,{1,4,{2,5}}},
{?eh,tc_start,{ts_if_1_SUITE,tc11}},
{?eh,tc_done,{ts_if_1_SUITE,tc11,
- {auto_skipped,{failed,{ts_if_1_SUITE,init_per_testcase,bad_return}}}}},
- {?eh,test_stats,{2,4,{2,5}}},
+ {auto_skipped,
+ {failed,{ts_if_1_SUITE,init_per_testcase,bad_return}}}}},
+ {?eh,test_stats,{1,4,{2,6}}},
[{?eh,tc_start,{ts_if_1_SUITE,{init_per_group,g1,[]}}},
{?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g1,[]},
{skipped,g1_got_skipped}}},
{?eh,tc_user_skip,{ts_if_1_SUITE,gtc1,g1_got_skipped}},
- {?eh,test_stats,{2,4,{3,5}}},
+ {?eh,test_stats,{1,4,{3,6}}},
{?eh,tc_user_skip,{ts_if_1_SUITE,end_per_group,g1_got_skipped}}],
-
+
{parallel,
[{?eh,tc_start,{ts_if_1_SUITE,{init_per_group,g2,[parallel]}}},
{?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g2,[parallel]},ok}},
[{?eh,tc_start,{ts_if_1_SUITE,{init_per_group,g3,[]}}},
- {?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g3,[]},
- {skipped,g3_got_skipped}}},
- {?eh,tc_user_skip,{ts_if_1_SUITE,gtc2,g3_got_skipped}},
- {?eh,test_stats,{2,4,{4,5}}},
- {?eh,tc_user_skip,{ts_if_1_SUITE,end_per_group,g3_got_skipped}}],
+ {?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g3,[]},{skipped,g3_got_skipped}}},
+ {?eh,tc_user_skip,{ts_if_1_SUITE,gtc2,g3_got_skipped}},
+ {?eh,test_stats,{1,4,{4,6}}},
+ {?eh,tc_user_skip,{ts_if_1_SUITE,end_per_group,g3_got_skipped}}],
{?eh,tc_start,{ts_if_1_SUITE,{end_per_group,g2,[parallel]}}},
{?eh,tc_done,{ts_if_1_SUITE,{end_per_group,g2,[parallel]},ok}}]},
{?eh,tc_start,{ts_if_1_SUITE,tc12}},
{?eh,tc_done,{ts_if_1_SUITE,tc12,{failed,{testcase_aborted,'stopping tc12'}}}},
- {?eh,test_stats,{2,5,{4,5}}},
+ {?eh,test_stats,{1,5,{4,6}}},
{?eh,tc_start,{ts_if_1_SUITE,tc13}},
{?eh,tc_done,{ts_if_1_SUITE,tc13,ok}},
- {?eh,test_stats,{3,5,{4,5}}},
+ {?eh,test_stats,{2,5,{4,6}}},
{?eh,tc_start,{ts_if_1_SUITE,end_per_suite}},
{?eh,tc_done,{ts_if_1_SUITE,end_per_suite,ok}},
+
{?eh,tc_start,{ts_if_2_SUITE,init_per_suite}},
- {?eh,tc_done,{ts_if_2_SUITE,init_per_suite,
- {failed,{error,{suite0_failed,{exited,suite0_goes_boom}}}}}},
- {?eh,tc_auto_skip,{ts_if_2_SUITE,my_test_case,
- {failed,{error,{suite0_failed,{exited,suite0_goes_boom}}}}}},
- {?eh,test_stats,{3,5,{4,6}}},
- {?eh,tc_auto_skip,{ts_if_2_SUITE,end_per_suite,
- {failed,{error,{suite0_failed,{exited,suite0_goes_boom}}}}}},
+ {?eh,tc_done,
+ {ts_if_2_SUITE,init_per_suite,
+ {failed,{error,{suite0_failed,{exited,suite0_goes_boom}}}}}},
+ {?eh,tc_auto_skip,
+ {ts_if_2_SUITE,my_test_case,
+ {failed,{error,{suite0_failed,{exited,suite0_goes_boom}}}}}},
+ {?eh,test_stats,{2,5,{4,7}}},
+ {?eh,tc_auto_skip,
+ {ts_if_2_SUITE,end_per_suite,
+ {failed,{error,{suite0_failed,{exited,suite0_goes_boom}}}}}},
+
{?eh,tc_start,{ct_framework,error_in_suite}},
- {?eh,test_stats,{3,6,{4,6}}},
+ {?eh,test_stats,{2,6,{4,7}}},
+
{?eh,tc_start,{ct_framework,error_in_suite}},
- {?eh,test_stats,{3,7,{4,6}}},
+ {?eh,test_stats,{2,7,{4,7}}},
+
{?eh,tc_start,{ts_if_5_SUITE,init_per_suite}},
{?eh,tc_done,{ts_if_5_SUITE,init_per_suite,
- {auto_skipped,{require_failed_in_suite0,
- {not_available,undef_variable}}}}},
- {?eh,tc_auto_skip,{ts_if_5_SUITE,my_test_case,
- {require_failed_in_suite0,{not_available,undef_variable}}}},
- {?eh,test_stats,{3,7,{4,7}}},
- {?eh,tc_auto_skip,{ts_if_5_SUITE,end_per_suite,
- {require_failed_in_suite0,{not_available,undef_variable}}}},
+ {auto_skipped,
+ {require_failed_in_suite0,{not_available,undef_variable}}}}},
+ {?eh,tc_auto_skip,
+ {ts_if_5_SUITE,my_test_case,
+ {require_failed_in_suite0,{not_available,undef_variable}}}},
+ {?eh,test_stats,{2,7,{4,8}}},
+ {?eh,tc_auto_skip,
+ {ts_if_5_SUITE,end_per_suite,
+ {require_failed_in_suite0,{not_available,undef_variable}}}},
+
{?eh,tc_start,{ct_framework,init_per_suite}},
{?eh,tc_done,{ct_framework,init_per_suite,
{failed,{error,{suite0_failed,{exited,suite0_byebye}}}}}},
- {?eh,tc_auto_skip,{ts_if_6_SUITE,tc1,
- {failed,{error,{suite0_failed,{exited,suite0_byebye}}}}}},
- {?eh,test_stats,{3,7,{4,8}}},
- {?eh,tc_auto_skip,{ct_framework,end_per_suite,
- {failed,{error,{suite0_failed,{exited,suite0_byebye}}}}}},
-
- {?eh,tc_start,{ts_if_7_SUITE,tc1}},
- {?eh,tc_done,{ts_if_7_SUITE,tc1,ok}},
- {?eh,test_stats,{4,7,{4,8}}},
-
- {?eh,tc_start,{ts_if_8_SUITE,tc1}},
- {?eh,tc_done,{ts_if_8_SUITE,tc1,{failed,{error,failed_on_purpose}}}},
- {?eh,test_stats,{4,8,{4,8}}},
-
- {?eh,tc_user_skip,{skipped_by_spec_1_SUITE,all,"should be skipped"}},
- {?eh,test_stats,{4,8,{5,8}}},
-
- {?eh,tc_start,{skipped_by_spec_2_SUITE,init_per_suite}},
- {?eh,tc_done,{skipped_by_spec_2_SUITE,init_per_suite,ok}},
- {?eh,tc_user_skip,{skipped_by_spec_2_SUITE,tc1,"should be skipped"}},
- {?eh,test_stats,{4,8,{6,8}}},
- {?eh,tc_start,{skipped_by_spec_2_SUITE,end_per_suite}},
- {?eh,tc_done,{skipped_by_spec_2_SUITE,end_per_suite,ok}},
-
- {?eh,test_done,{'DEF','STOP_TIME'}},
- {?eh,stop_logging,[]}
- ].
+ {?eh,tc_auto_skip,
+ {ts_if_6_SUITE,tc1,
+ {failed,{error,{suite0_failed,{exited,suite0_byebye}}}}}},
+ {?eh,test_stats,{2,7,{4,9}}},
+ {?eh,tc_auto_skip,
+ {ct_framework,end_per_suite,
+ {failed,{error,{suite0_failed,{exited,suite0_byebye}}}}}},
+
+
+ {?eh,tc_start,{ct_framework,init_per_suite}},
+ {?eh,tc_done,{ct_framework,init_per_suite,ok}},
+ {?eh,tc_done,
+ {ts_if_7_SUITE,tc1,{auto_skipped,{testcase0_failed,bad_return_value}}}},
+ {?eh,test_stats,{2,7,{4,10}}},
+ {?eh,tc_done,{ts_if_7_SUITE,
+ {init_per_group,g1,[]},
+ {auto_skipped,{group0_failed,bad_return_value}}}},
+ {?eh,tc_auto_skip,
+ {ts_if_7_SUITE,tc2,{group0_failed,bad_return_value}}},
+ {?eh,test_stats,{2,7,{4,11}}},
+ {?eh,tc_auto_skip,
+ {ts_if_7_SUITE,end_per_group,{group0_failed,bad_return_value}}}],
+
+ [{?eh,tc_start,{ts_if_7_SUITE,{init_per_group,g2,[]}}},
+ {?eh,tc_done,{ts_if_7_SUITE,{init_per_group,g2,[]},ok}},
+ {?eh,tc_done,{ts_if_7_SUITE,tc2,
+ {auto_skipped,{testcase0_failed,bad_return_value}}}},
+ {?eh,test_stats,{2,7,{4,12}}},
+ {?eh,tc_start,{ts_if_7_SUITE,{end_per_group,g2,[]}}},
+ {?eh,tc_done,{ts_if_7_SUITE,{end_per_group,g2,[]},ok}}],
+
+ {?eh,tc_start,{ct_framework,end_per_suite}},
+ {?eh,tc_done,{ct_framework,end_per_suite,ok}},
+
+
+ {?eh,tc_start,{ct_framework,init_per_suite}},
+ {?eh,tc_done,{ct_framework,init_per_suite,ok}},
+ {?eh,tc_start,{ts_if_8_SUITE,tc1}},
+ {?eh,tc_done,{ts_if_8_SUITE,tc1,{failed,{error,failed_on_purpose}}}},
+ {?eh,test_stats,{2,8,{4,12}}},
+ {?eh,tc_start,{ct_framework,end_per_suite}},
+ {?eh,tc_done,{ct_framework,end_per_suite,ok}},
+
+
+ {?eh,tc_user_skip,{skipped_by_spec_1_SUITE,all,"should be skipped"}},
+ {?eh,test_stats,{2,8,{5,12}}},
+ {?eh,tc_start,{skipped_by_spec_2_SUITE,init_per_suite}},
+ {?eh,tc_done,{skipped_by_spec_2_SUITE,init_per_suite,ok}},
+ {?eh,tc_user_skip,{skipped_by_spec_2_SUITE,tc1,"should be skipped"}},
+ {?eh,test_stats,{2,8,{6,12}}},
+ {?eh,tc_start,{skipped_by_spec_2_SUITE,end_per_suite}},
+ {?eh,tc_done,{skipped_by_spec_2_SUITE,end_per_suite,ok}},
+
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}
+ ].
+
diff --git a/lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_7_SUITE.erl b/lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_7_SUITE.erl
index a2254848d0..20e04c464b 100644
--- a/lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_7_SUITE.erl
+++ b/lib/common_test/test/ct_test_server_if_1_SUITE_data/test_server_if/test/ts_if_7_SUITE.erl
@@ -73,7 +73,8 @@ end_per_testcase(_TestCase, _Config) ->
%% N = integer() | forever
%%--------------------------------------------------------------------
groups() ->
- [].
+ [{g1,[],[tc2]},
+ {g2,[],[tc2]}].
%%--------------------------------------------------------------------
%% Function: all() -> GroupsAndTestCases | {skip,Reason}
@@ -83,7 +84,12 @@ groups() ->
%% Reason = term()
%%--------------------------------------------------------------------
all() ->
- [tc1].
+ [tc1,{group,g1},{group,g2}].
+
+group(g1) ->
+ exit(g1_byebye);
+group(_) ->
+ [].
tc1() ->
exit(tc1_byebye).
@@ -91,3 +97,9 @@ tc1() ->
tc1(_) ->
done.
+tc2() ->
+ exit(tc2_byebye).
+
+tc2(_) ->
+ done.
+