aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test
diff options
context:
space:
mode:
authorPeter Andersson <[email protected]>2013-11-07 22:13:54 +0100
committerPeter Andersson <[email protected]>2013-11-18 18:07:10 +0100
commit16f45bc71e6a9cec351ca562a7a1e77569d4cdcf (patch)
tree756c2ac7c39627f87dcb64426e2631429198e96a /lib/common_test
parentcf6f587e997e240452099d0644ac89e58765bc10 (diff)
downloadotp-16f45bc71e6a9cec351ca562a7a1e77569d4cdcf.tar.gz
otp-16f45bc71e6a9cec351ca562a7a1e77569d4cdcf.tar.bz2
otp-16f45bc71e6a9cec351ca562a7a1e77569d4cdcf.zip
Change report tag for failed init_per_testcase from skipped to auto_skipped
Diffstat (limited to 'lib/common_test')
-rw-r--r--lib/common_test/src/cth_surefire.erl2
-rw-r--r--lib/common_test/test/ct_config_info_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_error_SUITE.erl14
-rw-r--r--lib/common_test/test/ct_skip_SUITE.erl55
-rw-r--r--lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_3_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_skip_SUITE_data/skip/test/user_skip_6_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_surefire_SUITE.erl1
-rw-r--r--lib/common_test/test/ct_testspec_3_SUITE.erl10
8 files changed, 63 insertions, 27 deletions
diff --git a/lib/common_test/src/cth_surefire.erl b/lib/common_test/src/cth_surefire.erl
index 1a38b6584b..bbbca3828e 100644
--- a/lib/common_test/src/cth_surefire.erl
+++ b/lib/common_test/src/cth_surefire.erl
@@ -330,5 +330,7 @@ count_tcs([#testcase{result={fail,_}}|TCs],Ok,F,S) ->
count_tcs(TCs,Ok,F+1,S);
count_tcs([#testcase{result={skipped,_}}|TCs],Ok,F,S) ->
count_tcs(TCs,Ok,F,S+1);
+count_tcs([#testcase{result={auto_skipped,_}}|TCs],Ok,F,S) ->
+ count_tcs(TCs,Ok,F,S+1);
count_tcs([],Ok,F,S) ->
{Ok+F+S,F,S}.
diff --git a/lib/common_test/test/ct_config_info_SUITE.erl b/lib/common_test/test/ct_config_info_SUITE.erl
index 10fe8286dd..d6a49cb3bc 100644
--- a/lib/common_test/test/ct_config_info_SUITE.erl
+++ b/lib/common_test/test/ct_config_info_SUITE.erl
@@ -150,7 +150,7 @@ test_events(config_info) ->
{timetrap_timeout,400}}}}}],
{?eh,tc_start,{config_info_1_SUITE,t31}},
{?eh,tc_done,{config_info_1_SUITE,t31,
- {skipped,{failed,{config_info_1_SUITE,init_per_testcase,
+ {auto_skipped,{failed,{config_info_1_SUITE,init_per_testcase,
{timetrap_timeout,250}}}}}},
{?eh,tc_start,{config_info_1_SUITE,t32}},
{?eh,tc_done,{config_info_1_SUITE,t32,
diff --git a/lib/common_test/test/ct_error_SUITE.erl b/lib/common_test/test/ct_error_SUITE.erl
index a59385c53b..775a8ffdf7 100644
--- a/lib/common_test/test/ct_error_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE.erl
@@ -550,23 +550,23 @@ test_events(cfg_error) ->
{?eh,tc_done,{cfg_error_9_SUITE,init_per_suite,ok}},
{?eh,tc_start,{cfg_error_9_SUITE,tc1}},
{?eh,tc_done,{cfg_error_9_SUITE,tc1,
- {skipped,{failed,{cfg_error_9_SUITE,init_per_testcase,
- {tc1_should_be_skipped,'_'}}}}}},
+ {auto_skipped,{failed,{cfg_error_9_SUITE,init_per_testcase,
+ {tc1_should_be_skipped,'_'}}}}}},
{?eh,test_stats,{9,0,{0,15}}},
{?eh,tc_start,{cfg_error_9_SUITE,tc2}},
{?eh,tc_done,{cfg_error_9_SUITE,tc2,
- {skipped,{failed,{cfg_error_9_SUITE,init_per_testcase,
- {timetrap_timeout,2000}}}}}},
+ {auto_skipped,{failed,{cfg_error_9_SUITE,init_per_testcase,
+ {timetrap_timeout,2000}}}}}},
{?eh,test_stats,{9,0,{0,16}}},
{?eh,tc_start,{cfg_error_9_SUITE,tc3}},
{?eh,tc_done,{cfg_error_9_SUITE,tc3,
- {skipped,{failed,{cfg_error_9_SUITE,init_per_testcase,
- {{badmatch,undefined},'_'}}}}}},
+ {auto_skipped,{failed,{cfg_error_9_SUITE,init_per_testcase,
+ {{badmatch,undefined},'_'}}}}}},
{?eh,test_stats,{9,0,{0,17}}},
{?eh,tc_start,{cfg_error_9_SUITE,tc4}},
{?eh,tc_done,
{cfg_error_9_SUITE,tc4,
- {skipped,{failed,{cfg_error_9_SUITE,init_per_testcase,bad_return}}}}},
+ {auto_skipped,{failed,{cfg_error_9_SUITE,init_per_testcase,bad_return}}}}},
{?eh,test_stats,{9,0,{0,18}}},
{?eh,tc_start,{cfg_error_9_SUITE,tc5}},
{?eh,tc_done,
diff --git a/lib/common_test/test/ct_skip_SUITE.erl b/lib/common_test/test/ct_skip_SUITE.erl
index f7cdc90a4d..a67ad3f374 100644
--- a/lib/common_test/test/ct_skip_SUITE.erl
+++ b/lib/common_test/test/ct_skip_SUITE.erl
@@ -117,7 +117,8 @@ user_skip(Config) when is_list(Config) ->
Join(DataDir, "user_skip_2_SUITE"),
Join(DataDir, "user_skip_3_SUITE"),
Join(DataDir, "user_skip_4_SUITE"),
- Join(DataDir, "user_skip_5_SUITE")],
+ Join(DataDir, "user_skip_5_SUITE"),
+ Join(DataDir, "user_skip_6_SUITE")],
{Opts,ERPid} = setup({suite,Suites}, Config),
ok = ct_test_support:run(Opts, Config),
@@ -197,8 +198,8 @@ test_events(auto_skip) ->
{?eh,tc_start,{auto_skip_3_SUITE,tc1}},
{?eh,tc_done,
{auto_skip_3_SUITE,tc1,
- {skipped,{failed,{auto_skip_3_SUITE,init_per_testcase,
- {{init_per_testcase,tc1,failed},'_'}}}}}},
+ {auto_skipped,{failed,{auto_skip_3_SUITE,init_per_testcase,
+ {'init_per_testcase for tc1 failed','_'}}}}}},
{?eh,test_stats,{0,0,{0,4}}},
{?eh,tc_start,{auto_skip_3_SUITE,tc2}},
{?eh,tc_done,{auto_skip_3_SUITE,tc2,ok}},
@@ -210,7 +211,7 @@ test_events(auto_skip) ->
{?eh,tc_done,{auto_skip_4_SUITE,init_per_suite,ok}},
{?eh,tc_start,{auto_skip_4_SUITE,tc1}},
{?eh,tc_done,{auto_skip_4_SUITE,tc1,
- {skipped,{failed,{auto_skip_4_SUITE,init_per_testcase,
+ {auto_skipped,{failed,{auto_skip_4_SUITE,init_per_testcase,
{timetrap_timeout,1000}}}}}},
{?eh,test_stats,{1,0,{0,5}}},
{?eh,tc_start,{auto_skip_4_SUITE,tc2}},
@@ -321,7 +322,7 @@ test_events(auto_skip) ->
{?eh,test_stats,{5,0,{0,17}}},
{?eh,tc_start,{auto_skip_9_SUITE,tc2}},
{?eh,tc_done,{auto_skip_9_SUITE,tc2,
- {skipped,{failed,{auto_skip_9_SUITE,init_per_testcase,bad_return}}}}},
+ {auto_skipped,{failed,{auto_skip_9_SUITE,init_per_testcase,bad_return}}}}},
{?eh,test_stats,{5,0,{0,18}}},
[{?eh,tc_start,{auto_skip_9_SUITE,{init_per_group,g1,[]}}},
@@ -344,7 +345,7 @@ test_events(auto_skip) ->
{?eh,tc_done,{auto_skip_9_SUITE,{init_per_group,g3,[]},ok}},
{?eh,tc_start,{auto_skip_9_SUITE,tc5}},
{?eh,tc_done,{auto_skip_9_SUITE,tc5,
- {skipped,{failed,{auto_skip_9_SUITE,init_per_testcase,bad_return}}}}},
+ {auto_skipped,{failed,{auto_skip_9_SUITE,init_per_testcase,bad_return}}}}},
{?eh,test_stats,{7,0,{0,19}}},
{?eh,tc_start,{auto_skip_9_SUITE,{end_per_group,g3,[]}}},
{?eh,tc_done,{auto_skip_9_SUITE,{end_per_group,g3,[]},ok}}],
@@ -364,7 +365,7 @@ test_events(auto_skip) ->
{?eh,tc_start,{auto_skip_9_SUITE,tc8}},
{?eh,tc_done,
{auto_skip_9_SUITE,tc8,
- {skipped,{failed,{auto_skip_9_SUITE,init_per_testcase,
+ {auto_skipped,{failed,{auto_skip_9_SUITE,init_per_testcase,
{{badmatch,undefined},'_'}}}}}},
{?eh,tc_start,
{auto_skip_9_SUITE,{end_per_group,g5,[parallel]}}},
@@ -513,7 +514,7 @@ test_events(auto_skip) ->
test_events(user_skip) ->
[{?eh,start_logging,{'DEF','RUNDIR'}},
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
- {?eh,start_info,{5,5,27}},
+ {?eh,start_info,{6,6,35}},
{?eh,tc_start,{user_skip_1_SUITE,init_per_suite}},
{?eh,tc_done,
@@ -643,6 +644,38 @@ test_events(user_skip) ->
{?eh,test_stats,{6,0,{21,0}}},
{?eh,tc_user_skip,{user_skip_5_SUITE,end_per_suite,{bad,'Whole suite skipped'}}},
- {?eh,test_done,{'DEF','STOP_TIME'}},
- {?eh,stop_logging,[]}
- ].
+ {parallel,
+ [{?eh,tc_start,{user_skip_6_SUITE,{init_per_group,ptop1,[parallel]}}},
+ {?eh,tc_done,{user_skip_6_SUITE,
+ {init_per_group,ptop1,[parallel]},
+ {skipped,"Top group skipped"}}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,tc1,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,tc3,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,tc4,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,tc2,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,end_per_group,"Top group skipped"}}]},
+
+ {parallel,
+ [{?eh,tc_start,{user_skip_6_SUITE,{init_per_group,ptop2,[parallel]}}},
+ {?eh,tc_done,{user_skip_6_SUITE,{init_per_group,ptop2,[parallel]},ok}},
+ {?eh,tc_start,{user_skip_6_SUITE,tc1}},
+ {?eh,tc_done,{user_skip_6_SUITE,tc1,ok}},
+
+ {parallel,
+ [{?eh,tc_start,{user_skip_6_SUITE,{init_per_group,psub2,[parallel]}}},
+ {?eh,tc_done,{user_skip_6_SUITE,
+ {init_per_group,psub2,[parallel]},
+ {skipped,"Sub group skipped"}}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,tc3,"Sub group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,tc4,"Sub group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,end_per_group,"Sub group skipped"}}]},
+
+ {?eh,tc_start,{user_skip_6_SUITE,tc2}},
+ {?eh,tc_done,{user_skip_6_SUITE,tc2,ok}},
+ {?eh,test_stats,{8,0,{27,0}}},
+ {?eh,tc_start,{user_skip_6_SUITE,{end_per_group,ptop2,[parallel]}}},
+ {?eh,tc_done,{user_skip_6_SUITE,{end_per_group,ptop2,[parallel]},ok}}]},
+
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}
+ ].
diff --git a/lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_3_SUITE.erl b/lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_3_SUITE.erl
index cb64cb76c5..4ef9f50514 100644
--- a/lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_3_SUITE.erl
+++ b/lib/common_test/test/ct_skip_SUITE_data/skip/test/auto_skip_3_SUITE.erl
@@ -72,7 +72,7 @@ end_per_group(_GroupName, _Config) ->
%% Reason = term()
%%--------------------------------------------------------------------
init_per_testcase(tc1, _Config) ->
- exit({init_per_testcase,tc1,failed});
+ exit('init_per_testcase for tc1 failed');
init_per_testcase(_TestCase, Config) ->
Config.
diff --git a/lib/common_test/test/ct_skip_SUITE_data/skip/test/user_skip_6_SUITE.erl b/lib/common_test/test/ct_skip_SUITE_data/skip/test/user_skip_6_SUITE.erl
index 7d6a431d2e..5f0e5db6f2 100644
--- a/lib/common_test/test/ct_skip_SUITE_data/skip/test/user_skip_6_SUITE.erl
+++ b/lib/common_test/test/ct_skip_SUITE_data/skip/test/user_skip_6_SUITE.erl
@@ -84,8 +84,8 @@ end_per_testcase(_TestCase, _Config) ->
%% N = integer() | forever
%%--------------------------------------------------------------------
groups() ->
- [{ptop1,[parallel],[{psub1,[parallel],[tc1,tc2]}]},
- {ptop2,[parallel],[{psub2,[parallel],[tc3,tc4]}]}].
+ [{ptop1,[parallel],[tc1,{psub1,[parallel],[tc3,tc4]},tc2]},
+ {ptop2,[parallel],[tc1,{psub2,[parallel],[tc3,tc4]},tc2]}].
%%--------------------------------------------------------------------
%% Function: all() -> GroupsAndTestCases | {skip,Reason}
diff --git a/lib/common_test/test/ct_surefire_SUITE.erl b/lib/common_test/test/ct_surefire_SUITE.erl
index 1a370de44a..d9f46af3ae 100644
--- a/lib/common_test/test/ct_surefire_SUITE.erl
+++ b/lib/common_test/test/ct_surefire_SUITE.erl
@@ -328,6 +328,7 @@ events_to_result([]) ->
result(ok) ->[];
result({skipped,_}) -> [s];
+result({auto_skipped,_}) -> [s];
result({failed,_}) -> [f].
%% Using the expected events' last test_stats element to produce the
diff --git a/lib/common_test/test/ct_testspec_3_SUITE.erl b/lib/common_test/test/ct_testspec_3_SUITE.erl
index 5fa187e5b4..9f8ca84e45 100644
--- a/lib/common_test/test/ct_testspec_3_SUITE.erl
+++ b/lib/common_test/test/ct_testspec_3_SUITE.erl
@@ -1539,7 +1539,7 @@ flat_spec1_events() ->
{?eh,test_stats,{1,2,{0,0}}},
{?eh,tc_start,{t11_SUITE,autoskip_tc}},
{?eh,tc_done,
- {t11_SUITE,autoskip_tc,{skipped,
+ {t11_SUITE,autoskip_tc,{auto_skipped,
{failed,
{t11_SUITE,init_per_testcase,
{kaboom,'_'}}}}}},
@@ -1562,7 +1562,7 @@ flat_spec1_events() ->
{?eh,test_stats,{2,4,{1,1}}},
{?eh,tc_start,{t21_SUITE,autoskip_tc}},
{?eh,tc_done,
- {t21_SUITE,autoskip_tc,{skipped,
+ {t21_SUITE,autoskip_tc,{auto_skipped,
{failed,
{t21_SUITE,init_per_testcase,
{kaboom,'_'}}}}}},
@@ -1589,7 +1589,7 @@ flat_spec2_events() ->
{?eh,test_stats,{1,2,{0,0}}},
{?eh,tc_start,{t12_SUITE,autoskip_tc}},
{?eh,tc_done,
- {t12_SUITE,autoskip_tc,{skipped,
+ {t12_SUITE,autoskip_tc,{auto_skipped,
{failed,
{t12_SUITE,init_per_testcase,
{kaboom,'_'}}}}}},
@@ -1612,7 +1612,7 @@ flat_spec2_events() ->
{?eh,test_stats,{2,4,{1,1}}},
{?eh,tc_start,{t12_SUITE,autoskip_tc}},
{?eh,tc_done,
- {t12_SUITE,autoskip_tc,{skipped,
+ {t12_SUITE,autoskip_tc,{auto_skipped,
{failed,
{t12_SUITE,init_per_testcase,
{kaboom,'_'}}}}}},
@@ -1635,7 +1635,7 @@ flat_spec2_events() ->
{?eh,test_stats,{3,6,{2,2}}},
{?eh,tc_start,{t22_SUITE,autoskip_tc}},
{?eh,tc_done,
- {t22_SUITE,autoskip_tc,{skipped,
+ {t22_SUITE,autoskip_tc,{auto_skipped,
{failed,
{t22_SUITE,init_per_testcase,
{kaboom,'_'}}}}}},