From dd1a44e059a5de918de7067d49df6eb00ca563b2 Mon Sep 17 00:00:00 2001 From: Peter Andersson Date: Sun, 27 Jan 2013 15:03:23 +0100 Subject: Fix problem with tests running in wrong order OTP-9881 --- lib/common_test/test/ct_testspec_3_SUITE.erl | 104 +++++++++++++-------------- 1 file changed, 50 insertions(+), 54 deletions(-) (limited to 'lib/common_test/test') diff --git a/lib/common_test/test/ct_testspec_3_SUITE.erl b/lib/common_test/test/ct_testspec_3_SUITE.erl index 8b84b563ab..e2f57c2c64 100644 --- a/lib/common_test/test/ct_testspec_3_SUITE.erl +++ b/lib/common_test/test/ct_testspec_3_SUITE.erl @@ -331,16 +331,16 @@ test_events(start_join) -> {?eh,test_stats,{1,2,{1,1}}}, {?eh,tc_start,{t11_SUITE,end_per_suite}}, {?eh,tc_done,{t11_SUITE,end_per_suite,ok}}, - {?eh,tc_start,{t21_SUITE,init_per_suite}}, - {?eh,tc_done,{t21_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{2,4,{2,2}}}, - {?eh,tc_start,{t21_SUITE,end_per_suite}}, - {?eh,tc_done,{t21_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t12_SUITE,init_per_suite}}, {?eh,tc_done,{t12_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{3,6,{3,3}}}, + {?eh,test_stats,{2,4,{2,2}}}, {?eh,tc_start,{t12_SUITE,end_per_suite}}, {?eh,tc_done,{t12_SUITE,end_per_suite,ok}}, + {?eh,tc_start,{t21_SUITE,init_per_suite}}, + {?eh,tc_done,{t21_SUITE,init_per_suite,ok}}, + {?eh,test_stats,{3,6,{3,3}}}, + {?eh,tc_start,{t21_SUITE,end_per_suite}}, + {?eh,tc_done,{t21_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t22_SUITE,init_per_suite}}, {?eh,tc_done,{t22_SUITE,init_per_suite,ok}}, {?eh,test_stats,{4,8,{4,4}}}, @@ -520,8 +520,7 @@ test_events(incl_separate2) -> {?eh,stop_logging,[]}]; test_events(incl_join1) -> - [ - {?eh,start_logging,{'DEF','RUNDIR'}}, + [{?eh,start_logging,{'DEF','RUNDIR'}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,start_info,{4,4,20}}, {?eh,tc_start,{t12_SUITE,init_per_suite}}, @@ -549,61 +548,58 @@ test_events(incl_join1) -> {?eh,start_logging,{'DEF','RUNDIR'}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,start_info,{4,4,20}}, + {?eh,tc_start,{t22_SUITE,init_per_suite}}, + {?eh,tc_done,{t22_SUITE,init_per_suite,ok}}, + {?eh,test_stats,{1,2,{1,1}}}, + {?eh,tc_start,{t22_SUITE,end_per_suite}}, + {?eh,tc_done,{t22_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t21_SUITE,init_per_suite}}, {?eh,tc_done,{t21_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{1,2,{1,1}}}, + {?eh,test_stats,{2,4,{2,2}}}, {?eh,tc_start,{t21_SUITE,end_per_suite}}, {?eh,tc_done,{t21_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t11_SUITE,init_per_suite}}, {?eh,tc_done,{t11_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{2,4,{2,2}}}, + {?eh,test_stats,{3,6,{3,3}}}, {?eh,tc_start,{t11_SUITE,end_per_suite}}, {?eh,tc_done,{t11_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t12_SUITE,init_per_suite}}, {?eh,tc_done,{t12_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{3,6,{3,3}}}, + {?eh,test_stats,{4,8,{4,4}}}, {?eh,tc_start,{t12_SUITE,end_per_suite}}, {?eh,tc_done,{t12_SUITE,end_per_suite,ok}}, - {?eh,tc_start,{t22_SUITE,init_per_suite}}, - {?eh,tc_done,{t22_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{4,8,{4,4}}}, - {?eh,tc_start,{t22_SUITE,end_per_suite}}, - {?eh,tc_done,{t22_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, {?eh,stop_logging,[]}]; test_events(incl_join2) -> - [ - {?eh,start_logging,{'DEF','RUNDIR'}}, + [{?eh,start_logging,{'DEF','RUNDIR'}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,start_info,{4,4,20}}, - {?eh,tc_start,{t11_SUITE,init_per_suite}}, - {?eh,tc_done,{t11_SUITE,init_per_suite,ok}}, - {?eh,tc_start,{t11_SUITE,ok_tc}}, - {?eh,test_stats,{1,2,{1,1}}}, - {?eh,tc_start,{t11_SUITE,end_per_suite}}, - {?eh,tc_done,{t11_SUITE,end_per_suite,ok}}, - {?eh,tc_start,{t21_SUITE,init_per_suite}}, - {?eh,tc_done,{t21_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{2,4,{2,2}}}, - {?eh,tc_start,{t21_SUITE,end_per_suite}}, - {?eh,tc_done,{t21_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t12_SUITE,init_per_suite}}, {?eh,tc_done,{t12_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{3,6,{3,3}}}, + {?eh,test_stats,{1,2,{1,1}}}, {?eh,tc_start,{t12_SUITE,end_per_suite}}, {?eh,tc_done,{t12_SUITE,end_per_suite,ok}}, + {?eh,tc_start,{t11_SUITE,init_per_suite}}, + {?eh,tc_done,{t11_SUITE,init_per_suite,ok}}, + {?eh,test_stats,{2,4,{2,2}}}, + {?eh,tc_start,{t11_SUITE,end_per_suite}}, + {?eh,tc_done,{t11_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t22_SUITE,init_per_suite}}, {?eh,tc_done,{t22_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{4,8,{4,4}}}, + {?eh,test_stats,{3,6,{3,3}}}, {?eh,tc_start,{t22_SUITE,end_per_suite}}, {?eh,tc_done,{t22_SUITE,end_per_suite,ok}}, + {?eh,tc_start,{t21_SUITE,init_per_suite}}, + {?eh,tc_done,{t21_SUITE,init_per_suite,ok}}, + {?eh,test_stats,{4,8,{4,4}}}, + {?eh,tc_start,{t21_SUITE,end_per_suite}}, + {?eh,tc_done,{t21_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, {?eh,stop_logging,[]}]; test_events(incl_both1) -> - [ - {?eh,start_logging,{'DEF','RUNDIR'}}, + [{?eh,start_logging,{'DEF','RUNDIR'}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,start_info,{2,2,10}}, {?eh,tc_start,{t11_SUITE,init_per_suite}}, @@ -641,21 +637,6 @@ test_events(incl_both1) -> {?eh,start_logging,{'DEF','RUNDIR'}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, {?eh,start_info,{2,2,10}}, - {?eh,tc_start,{t11_SUITE,init_per_suite}}, - {?eh,tc_done,{t11_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{1,2,{1,1}}}, - {?eh,tc_start,{t11_SUITE,end_per_suite}}, - {?eh,tc_done,{t11_SUITE,end_per_suite,ok}}, - {?eh,tc_start,{t21_SUITE,init_per_suite}}, - {?eh,tc_done,{t21_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{2,4,{2,2}}}, - {?eh,tc_start,{t21_SUITE,end_per_suite}}, - {?eh,tc_done,{t21_SUITE,end_per_suite,ok}}, - {?eh,test_done,{'DEF','STOP_TIME'}}, - {?eh,stop_logging,[]}, - {?eh,start_logging,{'DEF','RUNDIR'}}, - {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, - {?eh,start_info,{2,2,10}}, {?eh,tc_start,{t12_SUITE,init_per_suite}}, {?eh,tc_done,{t12_SUITE,init_per_suite,ok}}, {?eh,test_stats,{1,2,{1,1}}}, @@ -667,13 +648,10 @@ test_events(incl_both1) -> {?eh,tc_start,{t22_SUITE,end_per_suite}}, {?eh,tc_done,{t22_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, - {?eh,stop_logging,[]}]; - -test_events(incl_both2) -> - [ + {?eh,stop_logging,[]}, {?eh,start_logging,{'DEF','RUNDIR'}}, {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, - {?eh,start_info,{4,4,20}}, + {?eh,start_info,{2,2,10}}, {?eh,tc_start,{t11_SUITE,init_per_suite}}, {?eh,tc_done,{t11_SUITE,init_per_suite,ok}}, {?eh,test_stats,{1,2,{1,1}}}, @@ -684,11 +662,29 @@ test_events(incl_both2) -> {?eh,test_stats,{2,4,{2,2}}}, {?eh,tc_start,{t21_SUITE,end_per_suite}}, {?eh,tc_done,{t21_SUITE,end_per_suite,ok}}, + {?eh,test_done,{'DEF','STOP_TIME'}}, + {?eh,stop_logging,[]}]; + +test_events(incl_both2) -> + [{?eh,start_logging,{'DEF','RUNDIR'}}, + {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, + {?eh,start_info,{4,4,20}}, + {?eh,tc_start,{t11_SUITE,init_per_suite}}, + {?eh,tc_done,{t11_SUITE,init_per_suite,ok}}, + {?eh,test_stats,{1,2,{1,1}}}, + {?eh,tc_start,{t11_SUITE,end_per_suite}}, + {?eh,tc_done,{t11_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t12_SUITE,init_per_suite}}, {?eh,tc_done,{t12_SUITE,init_per_suite,ok}}, - {?eh,test_stats,{3,6,{3,3}}}, + {?eh,test_stats,{2,4,{2,2}}}, {?eh,tc_start,{t12_SUITE,end_per_suite}}, {?eh,tc_done,{t12_SUITE,end_per_suite,ok}}, + {?eh,tc_start,{t21_SUITE,init_per_suite}}, + {?eh,tc_done,{t21_SUITE,init_per_suite,ok}}, + {?eh,tc_start,{t21_SUITE,ok_tc}}, + {?eh,test_stats,{3,6,{3,3}}}, + {?eh,tc_start,{t21_SUITE,end_per_suite}}, + {?eh,tc_done,{t21_SUITE,end_per_suite,ok}}, {?eh,tc_start,{t22_SUITE,init_per_suite}}, {?eh,tc_done,{t22_SUITE,init_per_suite,ok}}, {?eh,test_stats,{4,8,{4,4}}}, -- cgit v1.2.3