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_suite_callback_SUITE.erl30
-rw-r--r--lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scb_fail_one_skip_one_SUITE.erl2
2 files changed, 23 insertions, 9 deletions
diff --git a/lib/common_test/test/ct_suite_callback_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE.erl
index d60d24e237..e6e4d5706b 100644
--- a/lib/common_test/test/ct_suite_callback_SUITE.erl
+++ b/lib/common_test/test/ct_suite_callback_SUITE.erl
@@ -682,20 +682,24 @@ test_events(state_update_scb) ->
{?eh,scb,{'_',terminate,[contains(
[post_end_per_suite,pre_end_per_suite,
post_end_per_group,pre_end_per_group,
- post_end_per_testcase,pre_init_per_testcase,
- on_tc_skip,post_end_per_testcase,
- pre_init_per_testcase,on_tc_fail,
- post_end_per_testcase,pre_init_per_testcase,
+ {not_in_order,
+ [post_end_per_testcase,pre_init_per_testcase,
+ on_tc_skip,post_end_per_testcase,
+ pre_init_per_testcase,on_tc_fail,
+ post_end_per_testcase,pre_init_per_testcase]
+ },
post_init_per_group,pre_init_per_group,
post_init_per_suite,pre_init_per_suite,
init])]}},
{?eh,scb,{'_',terminate,[contains(
[post_end_per_suite,pre_end_per_suite,
post_end_per_group,pre_end_per_group,
- post_end_per_testcase,pre_init_per_testcase,
- on_tc_skip,post_end_per_testcase,
- pre_init_per_testcase,on_tc_fail,
- post_end_per_testcase,pre_init_per_testcase,
+ {not_in_order,
+ [post_end_per_testcase,pre_init_per_testcase,
+ on_tc_skip,post_end_per_testcase,
+ pre_init_per_testcase,on_tc_fail,
+ post_end_per_testcase,pre_init_per_testcase]
+ },
post_init_per_group,pre_init_per_group,
post_init_per_suite,pre_init_per_suite,
init]
@@ -712,6 +716,10 @@ contains(List) ->
fun(Proplist) when is_list(Proplist) ->
contains(List,Proplist)
end.
+
+contains([{not_in_order,List}|T],Rest) ->
+ contains_parallel(List,Rest),
+ contains(T,Rest);
contains([{Ele,Pos}|T] = L,[H|T2]) ->
case element(Pos,H) of
Ele ->
@@ -728,6 +736,12 @@ contains(List,[_|T]) ->
contains([],_) ->
match.
+contains_parallel([Key | T], Elems) ->
+ contains([Key],Elems),
+ contains_parallel(T,Elems);
+contains_parallel([],Elems) ->
+ match.
+
not_contains(List) ->
fun(Proplist) when is_list(Proplist) ->
[] = [Ele || {Ele,_} <- Proplist,
diff --git a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scb_fail_one_skip_one_SUITE.erl b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scb_fail_one_skip_one_SUITE.erl
index dfeacfe8b1..593bd4a534 100644
--- a/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scb_fail_one_skip_one_SUITE.erl
+++ b/lib/common_test/test/ct_suite_callback_SUITE_data/scb/tests/ct_scb_fail_one_skip_one_SUITE.erl
@@ -48,7 +48,7 @@ end_per_testcase(_TestCase, _Config) ->
ok.
groups() ->
- [{group1,[],[test_case1,test_case2,test_case3]}].
+ [{group1,[parallel],[{group2,[parallel],[test_case1,test_case2,test_case3]}]}].
all() ->
[{group,group1}].