diff options
author | Peter Andersson <[email protected]> | 2010-06-04 01:06:03 +0200 |
---|---|---|
committer | Raimo Niskanen <[email protected]> | 2010-06-09 16:19:22 +0200 |
commit | a3af252253c1fbc642cf6229ff1e23f095b75b59 (patch) | |
tree | 348bcbc556c0972becb2fa39400fd0fb93ba8177 /lib/common_test/test | |
parent | 470063d25f6128ef83cba6864533fc05e45cca74 (diff) | |
download | otp-a3af252253c1fbc642cf6229ff1e23f095b75b59.tar.gz otp-a3af252253c1fbc642cf6229ff1e23f095b75b59.tar.bz2 otp-a3af252253c1fbc642cf6229ff1e23f095b75b59.zip |
Have end_per_testcase run even after timetrap_timeout and abort_testcase
Diffstat (limited to 'lib/common_test/test')
-rw-r--r-- | lib/common_test/test/ct_error_SUITE.erl | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/lib/common_test/test/ct_error_SUITE.erl b/lib/common_test/test/ct_error_SUITE.erl index d5d91706d9..edf28e0bca 100644 --- a/lib/common_test/test/ct_error_SUITE.erl +++ b/lib/common_test/test/ct_error_SUITE.erl @@ -63,7 +63,8 @@ all(suite) -> [ cfg_error, lib_error, - no_compile + no_compile, + timetrap ]. @@ -133,6 +134,23 @@ no_compile(Config) when is_list(Config) -> TestEvents = events_to_check(no_compile), ok = ct_test_support:verify_events(TestEvents, Events, Config). +%%%----------------------------------------------------------------- +%%% +timetrap(Config) when is_list(Config) -> + DataDir = ?config(data_dir, Config), + Join = fun(D, S) -> filename:join(D, "error/test/"++S) end, + Suites = [Join(DataDir, "timetrap_1_SUITE")], + {Opts,ERPid} = setup({suite,Suites}, Config), + ok = ct_test_support:run(Opts, Config), + Events = ct_test_support:get_events(ERPid, Config), + + ct_test_support:log_events(timetrap, + reformat(Events, ?eh), + ?config(priv_dir, Config)), + + TestEvents = events_to_check(timetrap), + ok = ct_test_support:verify_events(TestEvents, Events, Config). + %%%----------------------------------------------------------------- %%% HELP FUNCTIONS @@ -564,4 +582,20 @@ test_events(lib_error) -> ]; test_events(no_compile) -> - []. + []; + +test_events(timetrap) -> + [ + {?eh,start_logging,{'DEF','RUNDIR'}}, + {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, + {?eh,start_info,{1,1,1}}, + {?eh,tc_start,{timetrap_1_SUITE,init_per_suite}}, + {?eh,tc_done,{timetrap_1_SUITE,init_per_suite,ok}}, + {?eh,tc_start,{timetrap_1_SUITE,tc1}}, + {?eh,tc_done,{timetrap_1_SUITE,tc1,{failed,{timetrap_timeout,1000}}}}, + {?eh,test_stats,{0,1,{0,0}}}, + {?eh,tc_start,{timetrap_1_SUITE,end_per_suite}}, + {?eh,tc_done,{timetrap_1_SUITE,end_per_suite,ok}}, + {?eh,test_done,{'DEF','STOP_TIME'}}, + {?eh,stop_logging,[]} + ]. |