diff options
author | Peter Andersson <[email protected]> | 2012-03-26 17:35:35 +0200 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2012-03-26 17:35:35 +0200 |
commit | c0d0515e45f94da60b9be463f1c7e957c14492f1 (patch) | |
tree | 1523c548284aaa0d03159344fd4cf9aa22b674ea /lib/common_test/test/ct_hooks_SUITE.erl | |
parent | 67ccf96bb7b430e691509a45299eeee1ca5f27c5 (diff) | |
download | otp-c0d0515e45f94da60b9be463f1c7e957c14492f1.tar.gz otp-c0d0515e45f94da60b9be463f1c7e957c14492f1.tar.bz2 otp-c0d0515e45f94da60b9be463f1c7e957c14492f1.zip |
Fix problem with wrong data_dir sent to hooks if init_per_* is missing
Diffstat (limited to 'lib/common_test/test/ct_hooks_SUITE.erl')
-rw-r--r-- | lib/common_test/test/ct_hooks_SUITE.erl | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/lib/common_test/test/ct_hooks_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE.erl index efe57a7d0b..27fb7a4ef3 100644 --- a/lib/common_test/test/ct_hooks_SUITE.erl +++ b/lib/common_test/test/ct_hooks_SUITE.erl @@ -83,7 +83,8 @@ all(suite) -> fail_post_suite_cth, skip_pre_suite_cth, skip_post_suite_cth, recover_post_suite_cth, update_config_cth, state_update_cth, options_cth, same_id_cth, - fail_n_skip_with_minimal_cth, prio_cth, no_config + fail_n_skip_with_minimal_cth, prio_cth, no_config, + data_dir ] ). @@ -217,6 +218,12 @@ no_config(Config) when is_list(Config) -> do_test(no_config, "ct_no_config_SUITE.erl", [verify_config_cth],Config). +data_dir(Config) when is_list(Config) -> + do_test(data_dir, "ct_data_dir_SUITE.erl", + [verify_data_dir_cth],Config). + + + %%%----------------------------------------------------------------- %%% HELP FUNCTIONS %%%----------------------------------------------------------------- @@ -1131,6 +1138,55 @@ test_events(no_config) -> {?eh,stop_logging,[]} ]; +test_events(data_dir) -> + [ + {?eh,start_logging,{'DEF','RUNDIR'}}, + {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, + {?eh,cth,{empty_cth,init,[verify_data_dir_cth,[]]}}, + {?eh,start_info,{1,1,2}}, + {?eh,tc_start,{ct_framework,init_per_suite}}, + {?eh,cth,{empty_cth,pre_init_per_suite, + [ct_data_dir_SUITE,'$proplist',[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,cth,{empty_cth,post_init_per_suite, + [ct_data_dir_SUITE,'$proplist','$proplist',[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,tc_done,{ct_framework,init_per_suite,ok}}, + {?eh,tc_start,{ct_data_dir_SUITE,test_case_1}}, + {?eh,cth,{empty_cth,pre_init_per_testcase, + [test_case_1,'$proplist',[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,cth,{empty_cth,post_end_per_testcase, + [test_case_1,'$proplist',ok,[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,tc_done,{ct_data_dir_SUITE,test_case_1,ok}}, + {?eh,test_stats,{1,0,{0,0}}}, + [{?eh,tc_start,{ct_framework,{init_per_group,test_group,'$proplist'}}}, + {?eh,cth,{empty_cth,pre_init_per_group, + [test_group,'$proplist',[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,cth,{empty_cth,post_init_per_group, + [test_group,'$proplist','$proplist',[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,tc_done,{ct_framework, + {init_per_group,test_group,'$proplist'},ok}}, + {?eh,tc_start,{ct_data_dir_SUITE,test_case_2}}, + {?eh,cth,{empty_cth,pre_init_per_testcase, + [test_case_2,'$proplist',[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,cth,{empty_cth,post_end_per_testcase, + [test_case_2,'$proplist',ok,[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,tc_done,{ct_data_dir_SUITE,test_case_2,ok}}, + {?eh,test_stats,{2,0,{0,0}}}, + {?eh,tc_start,{ct_framework,{end_per_group,test_group,'$proplist'}}}, + {?eh,cth,{empty_cth,pre_end_per_group, + [test_group,'$proplist',[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,cth,{empty_cth,post_end_per_group, + [test_group,'$proplist',ok,[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,tc_done,{ct_framework,{end_per_group,test_group,'$proplist'},ok}}], + {?eh,tc_start,{ct_framework,end_per_suite}}, + {?eh,cth,{empty_cth,pre_end_per_suite, + [ct_data_dir_SUITE,'$proplist',[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,cth,{empty_cth,post_end_per_suite, + [ct_data_dir_SUITE,'$proplist',ok,[{data_dir_name,"ct_data_dir_SUITE_data"}]]}}, + {?eh,tc_done,{ct_framework,end_per_suite,ok}}, + {?eh,test_done,{'DEF','STOP_TIME'}}, + {?eh,stop_logging,[]} + ]; + test_events(ok) -> ok. |