From 1b51729df1a5c9678beb73318b8cf2a12b0e145d Mon Sep 17 00:00:00 2001
From: Peter Andersson <peppe@erlang.org>
Date: Wed, 6 Apr 2011 16:51:04 +0200
Subject: Do minor updates of the ts test framework.

---
 lib/common_test/test/ct_hooks_SUITE.erl | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'lib/common_test/test/ct_hooks_SUITE.erl')

diff --git a/lib/common_test/test/ct_hooks_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE.erl
index 64f4e277ff..32b8d9249f 100644
--- a/lib/common_test/test/ct_hooks_SUITE.erl
+++ b/lib/common_test/test/ct_hooks_SUITE.erl
@@ -225,8 +225,9 @@ do_test(Tag, SuiteWildCard, CTHs, Config, Res, EC) ->
     Events = ct_test_support:get_events(ERPid, Config),
 
     ct_test_support:log_events(Tag, 
-			       reformat(Events, ?eh), 
-			       ?config(priv_dir, Config)),
+			       reformat(Events, ?eh),
+			       ?config(priv_dir, Config),
+			       Opts),
 
     TestEvents = events_to_check(Tag, EC),
     ok = ct_test_support:verify_events(TestEvents, Events, Config).
-- 
cgit v1.2.3


From 4e1b099698aac698f89ca172b62ba2330c85ad90 Mon Sep 17 00:00:00 2001
From: Peter Andersson <peppe@erlang.org>
Date: Mon, 11 Apr 2011 22:52:48 +0200
Subject: Make it possible to refresh the top level index page at the start of
 a test run.

---
 lib/common_test/test/ct_hooks_SUITE.erl | 37 ++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 19 deletions(-)

(limited to 'lib/common_test/test/ct_hooks_SUITE.erl')

diff --git a/lib/common_test/test/ct_hooks_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE.erl
index 32b8d9249f..be1c02f163 100644
--- a/lib/common_test/test/ct_hooks_SUITE.erl
+++ b/lib/common_test/test/ct_hooks_SUITE.erl
@@ -260,9 +260,9 @@ events_to_check(Test, N) ->
 test_events(one_empty_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
+     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,cth,{empty_cth,id,[[]]}},
      {?eh,cth,{empty_cth,init,[{'_','_','_'},[]]}},
-     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{empty_cth,pre_init_per_suite,
 	       [ct_cth_empty_SUITE,'$proplist',[]]}},
@@ -288,11 +288,11 @@ test_events(one_empty_cth) ->
 test_events(two_empty_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
+     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,cth,{'_',id,[[]]}},
      {?eh,cth,{'_',init,['_',[]]}},
      {?eh,cth,{'_',id,[[]]}},
      {?eh,cth,{'_',init,['_',[]]}},
-     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
      {?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
@@ -330,8 +330,8 @@ test_events(faulty_cth_no_init) ->
 test_events(faulty_cth_id_no_init) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{'_',id,[[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{'_',id,[[]]}},
      {negative,{?eh,tc_start,'_'},
       {?eh,test_done,{'DEF','STOP_TIME'}}},
      {?eh,stop_logging,[]}
@@ -340,9 +340,9 @@ test_events(faulty_cth_id_no_init) ->
 test_events(minimal_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
+     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {negative,{?eh,cth,{'_',id,['_',[]]}},
       {?eh,cth,{'_',init,['_',[]]}}},
-     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,ok}},
 
@@ -358,11 +358,11 @@ test_events(minimal_cth) ->
 test_events(minimal_and_maximal_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
+     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {negative,{?eh,cth,{'_',id,['_',[]]}},
       {?eh,cth,{'_',init,['_',[]]}}},
      {?eh,cth,{'_',id,[[]]}},
      {?eh,cth,{'_',init,['_',[]]}},
-     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
      {?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
@@ -388,8 +388,8 @@ test_events(faulty_cth_undef) ->
 		  {failed,FailReasonStr}},
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,
 		  {failed, {error,FailReasonStr}}}},
@@ -434,15 +434,15 @@ test_events(faulty_cth_exit_in_init_scope_suite) ->
 
 test_events(faulty_cth_exit_in_init) ->
     [{?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{empty_cth,init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{empty_cth,init,['_',[]]}},
      {?eh,test_done,{'DEF','STOP_TIME'}},
      {?eh,stop_logging,[]}];
 
 test_events(faulty_cth_exit_in_id) ->
     [{?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{empty_cth,id,[[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{empty_cth,id,[[]]}},
      {negative, {?eh,tc_start,'_'},
       {?eh,test_done,{'DEF','STOP_TIME'}}},
      {?eh,stop_logging,[]}];
@@ -610,9 +610,8 @@ test_events(scope_per_group_state_cth) ->
 test_events(fail_pre_suite_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
-
+     {?eh,cth,{'_',init,['_',[]]}},
      
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
@@ -650,8 +649,8 @@ test_events(fail_pre_suite_cth) ->
 test_events(fail_post_suite_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
      {?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
@@ -677,8 +676,8 @@ test_events(fail_post_suite_cth) ->
 test_events(skip_pre_suite_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
      {?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist',{skip,"Test skip"},[]]}},
@@ -700,8 +699,8 @@ test_events(skip_pre_suite_cth) ->
 test_events(skip_post_suite_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{'_',init,['_',[]]}},
      
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
@@ -725,8 +724,8 @@ test_events(recover_post_suite_cth) ->
     Suite = ct_cth_fail_per_suite_SUITE,
     [
      {?eh,start_logging,'_'},
-     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,tc_start,{Suite,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,[Suite,'$proplist','$proplist']}},
      {?eh,cth,{'_',post_init_per_suite,[Suite,contains([tc_status]),
@@ -754,8 +753,8 @@ test_events(recover_post_suite_cth) ->
 test_events(update_config_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{'_',init,['_',[]]}},
      
      {?eh,tc_start,{ct_update_config_SUITE,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,
@@ -865,9 +864,9 @@ test_events(update_config_cth) ->
 test_events(state_update_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
+     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,cth,{'_',init,['_',[]]}},
      {?eh,cth,{'_',init,['_',[]]}},
-     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,tc_start,{'_',init_per_suite}},
      
      {?eh,tc_done,{'_',end_per_suite,ok}},
@@ -903,8 +902,8 @@ test_events(state_update_cth) ->
 test_events(options_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{empty_cth,init,['_',[test]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{empty_cth,init,['_',[test]]}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{empty_cth,pre_init_per_suite,
 	       [ct_cth_empty_SUITE,'$proplist',[test]]}},
@@ -930,10 +929,10 @@ test_events(options_cth) ->
 test_events(same_id_cth) ->
     [
      {?eh,start_logging,{'DEF','RUNDIR'}},
+     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,cth,{'_',id,[[]]}},
      {?eh,cth,{'_',init,[same_id_cth,[]]}},
      {?eh,cth,{'_',id,[[]]}},
-     {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
      {?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
      {?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
      {negative,
@@ -970,8 +969,8 @@ test_events(same_id_cth) ->
 
 test_events(fail_n_skip_with_minimal_cth) ->
     [{?eh,start_logging,{'DEF','RUNDIR'}},
-     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+     {?eh,cth,{'_',init,['_',[]]}},
      {?eh,tc_start,{'_',init_per_suite}},
      
      {?eh,tc_done,{'_',end_per_suite,ok}},
-- 
cgit v1.2.3