4
%% Copyright Ericsson AB 2009-2011. All Rights Reserved.
6
%% The contents of this file are subject to the Erlang Public License,
7
%% Version 1.1, (the "License"); you may not use this file except in
8
%% compliance with the License. You should have received a copy of the
9
%% Erlang Public License along with this software. If not, it can be
10
%% retrieved online at http://www.erlang.org/.
12
%% Software distributed under the License is distributed on an "AS IS"
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
%% the License for the specific language governing rights and limitations
20
%%%-------------------------------------------------------------------
21
%%% File: ct_error_SUITE
24
%%% Test various errors in Common Test suites.
26
%%% The suites used for the test are located in the data directory.
27
%%%-------------------------------------------------------------------
28
-module(ct_hooks_SUITE).
32
-include_lib("test_server/include/test_server.hrl").
33
-include_lib("common_test/include/ct_event.hrl").
35
-define(eh, ct_test_support_eh).
37
%%--------------------------------------------------------------------
38
%% TEST SERVER CALLBACK FUNCTIONS
39
%%--------------------------------------------------------------------
41
%%--------------------------------------------------------------------
42
%% Description: Since Common Test starts another Test Server
43
%% instance, the tests need to be performed on a separate node (or
44
%% there will be clashes with logging processes etc).
45
%%--------------------------------------------------------------------
46
init_per_suite(Config) ->
47
DataDir = ?config(data_dir, Config),
48
TestDir = filename:join(DataDir,"cth/tests/"),
49
CTHs = filelib:wildcard(filename:join(TestDir,"*_cth.erl")),
50
io:format("CTHs: ~p",[CTHs]),
51
[io:format("Compiling ~p: ~p",
52
[FileName,compile:file(FileName,[{outdir,TestDir},debug_info])]) ||
54
ct_test_support:init_per_suite([{path_dirs,[TestDir]} | Config]).
56
end_per_suite(Config) ->
57
ct_test_support:end_per_suite(Config).
59
init_per_testcase(TestCase, Config) ->
60
ct_test_support:init_per_testcase(TestCase, Config).
62
end_per_testcase(TestCase, Config) ->
63
ct_test_support:end_per_testcase(TestCase, Config).
67
[{timetrap,{seconds,20}}].
75
one_cth, two_cth, faulty_cth_no_init, faulty_cth_id_no_init,
76
faulty_cth_exit_in_init, faulty_cth_exit_in_id,
77
faulty_cth_exit_in_init_scope_suite, minimal_cth,
78
minimal_and_maximal_cth, faulty_cth_undef,
79
scope_per_suite_cth, scope_per_group_cth, scope_suite_cth,
80
scope_per_suite_state_cth, scope_per_group_state_cth,
81
scope_suite_state_cth,
82
fail_pre_suite_cth, fail_post_suite_cth, skip_pre_suite_cth,
83
skip_post_suite_cth, recover_post_suite_cth, update_config_cth,
84
state_update_cth, options_cth, same_id_cth,
85
fail_n_skip_with_minimal_cth
91
%%--------------------------------------------------------------------
93
%%--------------------------------------------------------------------
95
%%%-----------------------------------------------------------------
97
one_cth(Config) when is_list(Config) ->
98
do_test(one_empty_cth, "ct_cth_empty_SUITE.erl",[empty_cth], Config).
100
two_cth(Config) when is_list(Config) ->
101
do_test(two_empty_cth, "ct_cth_empty_SUITE.erl",[empty_cth,empty_cth],
104
faulty_cth_no_init(Config) when is_list(Config) ->
105
do_test(faulty_cth_no_init, "ct_cth_empty_SUITE.erl",[askjhdkljashdkaj],
106
Config,{error,"Failed to start CTH, see the "
107
"CT Log for details"}).
109
faulty_cth_id_no_init(Config) when is_list(Config) ->
110
do_test(faulty_cth_id_no_init, "ct_cth_empty_SUITE.erl",[id_no_init_cth],
111
Config,{error,"Failed to start CTH, see the "
112
"CT Log for details"}).
114
minimal_cth(Config) when is_list(Config) ->
115
do_test(minimal_cth, "ct_cth_empty_SUITE.erl",[minimal_cth],Config).
117
minimal_and_maximal_cth(Config) when is_list(Config) ->
118
do_test(minimal_and_maximal_cth, "ct_cth_empty_SUITE.erl",
119
[minimal_cth, empty_cth],Config).
121
faulty_cth_undef(Config) when is_list(Config) ->
122
do_test(faulty_cth_undef, "ct_cth_empty_SUITE.erl",
125
faulty_cth_exit_in_init_scope_suite(Config) when is_list(Config) ->
126
do_test(faulty_cth_exit_in_init_scope_suite,
127
"ct_exit_in_init_scope_suite_cth_SUITE.erl",
130
faulty_cth_exit_in_init(Config) when is_list(Config) ->
131
do_test(faulty_cth_exit_in_init, "ct_cth_empty_SUITE.erl",
132
[crash_init_cth], Config,
133
{error,"Failed to start CTH, see the "
134
"CT Log for details"}).
136
faulty_cth_exit_in_id(Config) when is_list(Config) ->
137
do_test(faulty_cth_exit_in_id, "ct_cth_empty_SUITE.erl",
138
[crash_id_cth], Config,
139
{error,"Failed to start CTH, see the "
140
"CT Log for details"}).
142
scope_per_suite_cth(Config) when is_list(Config) ->
143
do_test(scope_per_suite_cth, "ct_scope_per_suite_cth_SUITE.erl",
146
scope_suite_cth(Config) when is_list(Config) ->
147
do_test(scope_suite_cth, "ct_scope_suite_cth_SUITE.erl",
150
scope_per_group_cth(Config) when is_list(Config) ->
151
do_test(scope_per_group_cth, "ct_scope_per_group_cth_SUITE.erl",
154
scope_per_suite_state_cth(Config) when is_list(Config) ->
155
do_test(scope_per_suite_state_cth, "ct_scope_per_suite_state_cth_SUITE.erl",
158
scope_suite_state_cth(Config) when is_list(Config) ->
159
do_test(scope_suite_state_cth, "ct_scope_suite_state_cth_SUITE.erl",
162
scope_per_group_state_cth(Config) when is_list(Config) ->
163
do_test(scope_per_group_state_cth, "ct_scope_per_group_state_cth_SUITE.erl",
166
fail_pre_suite_cth(Config) when is_list(Config) ->
167
do_test(fail_pre_suite_cth, "ct_cth_empty_SUITE.erl",
168
[fail_pre_suite_cth],Config).
170
fail_post_suite_cth(Config) when is_list(Config) ->
171
do_test(fail_post_suite_cth, "ct_cth_empty_SUITE.erl",
172
[fail_post_suite_cth],Config).
174
skip_pre_suite_cth(Config) when is_list(Config) ->
175
do_test(skip_pre_suite_cth, "ct_cth_empty_SUITE.erl",
176
[skip_pre_suite_cth],Config).
178
skip_post_suite_cth(Config) when is_list(Config) ->
179
do_test(skip_post_suite_cth, "ct_cth_empty_SUITE.erl",
180
[skip_post_suite_cth],Config).
182
recover_post_suite_cth(Config) when is_list(Config) ->
183
do_test(recover_post_suite_cth, "ct_cth_fail_per_suite_SUITE.erl",
184
[recover_post_suite_cth],Config).
186
update_config_cth(Config) when is_list(Config) ->
187
do_test(update_config_cth, "ct_update_config_SUITE.erl",
188
[update_config_cth],Config).
190
state_update_cth(Config) when is_list(Config) ->
191
do_test(state_update_cth, "ct_cth_fail_one_skip_one_SUITE.erl",
192
[state_update_cth,state_update_cth],Config).
194
options_cth(Config) when is_list(Config) ->
195
do_test(options_cth, "ct_cth_empty_SUITE.erl",
196
[{empty_cth,[test]}],Config).
198
same_id_cth(Config) when is_list(Config) ->
199
do_test(same_id_cth, "ct_cth_empty_SUITE.erl",
200
[same_id_cth,same_id_cth],Config).
202
fail_n_skip_with_minimal_cth(Config) when is_list(Config) ->
203
do_test(fail_n_skip_with_minimal_cth, "ct_cth_fail_one_skip_one_SUITE.erl",
204
[minimal_terminate_cth],Config).
206
%%%-----------------------------------------------------------------
208
%%%-----------------------------------------------------------------
210
do_test(Tag, SWC, CTHs, Config) ->
211
do_test(Tag, SWC, CTHs, Config, ok).
212
do_test(Tag, SWC, CTHs, Config, {error,_} = Res) ->
213
do_test(Tag, SWC, CTHs, Config, Res, 1);
214
do_test(Tag, SWC, CTHs, Config, Res) ->
215
do_test(Tag, SWC, CTHs, Config, Res, 2).
217
do_test(Tag, SuiteWildCard, CTHs, Config, Res, EC) ->
219
DataDir = ?config(data_dir, Config),
220
Suites = filelib:wildcard(
221
filename:join([DataDir,"cth/tests",SuiteWildCard])),
222
{Opts,ERPid} = setup([{suite,Suites},
223
{ct_hooks,CTHs},{label,Tag}], Config),
224
Res = ct_test_support:run(Opts, Config),
225
Events = ct_test_support:get_events(ERPid, Config),
227
ct_test_support:log_events(Tag,
228
reformat(Events, ?eh),
229
?config(priv_dir, Config)),
231
TestEvents = events_to_check(Tag, EC),
232
ok = ct_test_support:verify_events(TestEvents, Events, Config).
234
setup(Test, Config) ->
235
Opts0 = ct_test_support:get_opts(Config),
236
Level = ?config(trace_level, Config),
237
EvHArgs = [{cbm,ct_test_support},{trace_level,Level}],
238
Opts = Opts0 ++ [{event_handler,{?eh,EvHArgs}}|Test],
239
ERPid = ct_test_support:start_event_receiver(Config),
242
reformat(Events, EH) ->
243
ct_test_support:reformat(Events, EH).
244
%reformat(Events, _EH) ->
247
%%%-----------------------------------------------------------------
249
%%%-----------------------------------------------------------------
250
events_to_check(Test) ->
251
%% 2 tests (ct:run_test + script_start) is default
252
events_to_check(Test, 2).
254
events_to_check(_, 0) ->
256
events_to_check(Test, N) ->
257
test_events(Test) ++ events_to_check(Test, N-1).
259
test_events(one_empty_cth) ->
261
{?eh,start_logging,{'DEF','RUNDIR'}},
262
{?eh,cth,{empty_cth,id,[[]]}},
263
{?eh,cth,{empty_cth,init,[{'_','_','_'},[]]}},
264
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
265
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
266
{?eh,cth,{empty_cth,pre_init_per_suite,
267
[ct_cth_empty_SUITE,'$proplist',[]]}},
268
{?eh,cth,{empty_cth,post_init_per_suite,
269
[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
270
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,ok}},
272
{?eh,tc_start,{ct_cth_empty_SUITE,test_case}},
273
{?eh,cth,{empty_cth,pre_init_per_testcase,[test_case,'$proplist',[]]}},
274
{?eh,cth,{empty_cth,post_end_per_testcase,[test_case,'$proplist','_',[]]}},
275
{?eh,tc_done,{ct_cth_empty_SUITE,test_case,ok}},
277
{?eh,tc_start,{ct_cth_empty_SUITE,end_per_suite}},
278
{?eh,cth,{empty_cth,pre_end_per_suite,
279
[ct_cth_empty_SUITE,'$proplist',[]]}},
280
{?eh,cth,{empty_cth,post_end_per_suite,[ct_cth_empty_SUITE,'$proplist','_',[]]}},
281
{?eh,tc_done,{ct_cth_empty_SUITE,end_per_suite,ok}},
282
{?eh,test_done,{'DEF','STOP_TIME'}},
283
{?eh,cth,{empty_cth,terminate,[[]]}},
284
{?eh,stop_logging,[]}
287
test_events(two_empty_cth) ->
289
{?eh,start_logging,{'DEF','RUNDIR'}},
290
{?eh,cth,{'_',id,[[]]}},
291
{?eh,cth,{'_',init,['_',[]]}},
292
{?eh,cth,{'_',id,[[]]}},
293
{?eh,cth,{'_',init,['_',[]]}},
294
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
295
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
296
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
297
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
298
{?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
299
{?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
300
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,ok}},
302
{?eh,tc_start,{ct_cth_empty_SUITE,test_case}},
303
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}},
304
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}},
305
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[]]}},
306
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[]]}},
307
{?eh,tc_done,{ct_cth_empty_SUITE,test_case,ok}},
309
{?eh,tc_start,{ct_cth_empty_SUITE,end_per_suite}},
310
{?eh,cth,{'_',pre_end_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
311
{?eh,cth,{'_',pre_end_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
312
{?eh,cth,{'_',post_end_per_suite,[ct_cth_empty_SUITE,'$proplist','_',[]]}},
313
{?eh,cth,{'_',post_end_per_suite,[ct_cth_empty_SUITE,'$proplist','_',[]]}},
314
{?eh,tc_done,{ct_cth_empty_SUITE,end_per_suite,ok}},
315
{?eh,test_done,{'DEF','STOP_TIME'}},
316
{?eh,cth,{'_',terminate,[[]]}},
317
{?eh,cth,{'_',terminate,[[]]}},
318
{?eh,stop_logging,[]}
321
test_events(faulty_cth_no_init) ->
323
{?eh,start_logging,{'DEF','RUNDIR'}},
324
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
325
{?eh,test_done,{'DEF','STOP_TIME'}},
326
{?eh,stop_logging,[]}
329
test_events(faulty_cth_id_no_init) ->
331
{?eh,start_logging,{'DEF','RUNDIR'}},
332
{?eh,cth,{'_',id,[[]]}},
333
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
334
{negative,{?eh,tc_start,'_'},
335
{?eh,test_done,{'DEF','STOP_TIME'}}},
336
{?eh,stop_logging,[]}
339
test_events(minimal_cth) ->
341
{?eh,start_logging,{'DEF','RUNDIR'}},
342
{negative,{?eh,cth,{'_',id,['_',[]]}},
343
{?eh,cth,{'_',init,['_',[]]}}},
344
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
345
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
346
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,ok}},
348
{?eh,tc_start,{ct_cth_empty_SUITE,test_case}},
349
{?eh,tc_done,{ct_cth_empty_SUITE,test_case,ok}},
351
{?eh,tc_start,{ct_cth_empty_SUITE,end_per_suite}},
352
{?eh,tc_done,{ct_cth_empty_SUITE,end_per_suite,ok}},
353
{?eh,test_done,{'DEF','STOP_TIME'}},
354
{?eh,stop_logging,[]}
357
test_events(minimal_and_maximal_cth) ->
359
{?eh,start_logging,{'DEF','RUNDIR'}},
360
{negative,{?eh,cth,{'_',id,['_',[]]}},
361
{?eh,cth,{'_',init,['_',[]]}}},
362
{?eh,cth,{'_',id,[[]]}},
363
{?eh,cth,{'_',init,['_',[]]}},
364
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
365
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
366
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
367
{?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
368
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,ok}},
370
{?eh,tc_start,{ct_cth_empty_SUITE,test_case}},
371
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}},
372
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[]]}},
373
{?eh,tc_done,{ct_cth_empty_SUITE,test_case,ok}},
375
{?eh,tc_start,{ct_cth_empty_SUITE,end_per_suite}},
376
{?eh,cth,{'_',pre_end_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
377
{?eh,cth,{'_',post_end_per_suite,[ct_cth_empty_SUITE,'$proplist','_',[]]}},
378
{?eh,tc_done,{ct_cth_empty_SUITE,end_per_suite,ok}},
379
{?eh,test_done,{'DEF','STOP_TIME'}},
380
{?eh,cth,{'_',terminate,[[]]}},
381
{?eh,stop_logging,[]}
384
test_events(faulty_cth_undef) ->
385
FailReasonStr = "undef_cth:pre_init_per_suite/3 CTH call failed",
386
FailReason = {ct_cth_empty_SUITE,init_per_suite,
387
{failed,FailReasonStr}},
389
{?eh,start_logging,{'DEF','RUNDIR'}},
390
{?eh,cth,{'_',init,['_',[]]}},
391
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
392
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
393
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,
394
{failed, {error,FailReasonStr}}}},
395
{?eh,cth,{'_',on_tc_fail,'_'}},
397
{?eh,tc_auto_skip,{ct_cth_empty_SUITE,test_case,
398
{failed, FailReason}}},
399
{?eh,cth,{'_',on_tc_skip,'_'}},
401
{?eh,tc_auto_skip,{ct_cth_empty_SUITE,end_per_suite,
402
{failed, FailReason}}},
403
{?eh,cth,{'_',on_tc_skip,'_'}},
405
{?eh,test_done,{'DEF','STOP_TIME'}},
406
{?eh,stop_logging,[]}
409
test_events(faulty_cth_exit_in_init_scope_suite) ->
410
[{?eh,start_logging,{'DEF','RUNDIR'}},
411
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
412
{?eh,tc_start,{'_',init_per_suite}},
413
{?eh,cth,{empty_cth,init,['_',[]]}},
415
{ct_exit_in_init_scope_suite_cth_SUITE,init_per_suite,
418
"Failed to start CTH, see the CT Log for details"}}}},
420
{ct_exit_in_init_scope_suite_cth_SUITE,test_case,
422
{ct_exit_in_init_scope_suite_cth_SUITE,init_per_suite,
424
"Failed to start CTH, see the CT Log for details"}}}}},
426
{ct_exit_in_init_scope_suite_cth_SUITE,end_per_suite,
428
{ct_exit_in_init_scope_suite_cth_SUITE,init_per_suite,
430
"Failed to start CTH, see the CT Log for details"}}}}},
431
{?eh,test_done,{'DEF','STOP_TIME'}},
432
{?eh,stop_logging,[]}];
434
test_events(faulty_cth_exit_in_init) ->
435
[{?eh,start_logging,{'DEF','RUNDIR'}},
436
{?eh,cth,{empty_cth,init,['_',[]]}},
437
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
438
{?eh,test_done,{'DEF','STOP_TIME'}},
439
{?eh,stop_logging,[]}];
441
test_events(faulty_cth_exit_in_id) ->
442
[{?eh,start_logging,{'DEF','RUNDIR'}},
443
{?eh,cth,{empty_cth,id,[[]]}},
444
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
445
{negative, {?eh,tc_start,'_'},
446
{?eh,test_done,{'DEF','STOP_TIME'}}},
447
{?eh,stop_logging,[]}];
449
test_events(scope_per_suite_cth) ->
451
{?eh,start_logging,{'DEF','RUNDIR'}},
452
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
453
{?eh,tc_start,{ct_scope_per_suite_cth_SUITE,init_per_suite}},
454
{?eh,cth,{'_',id,[[]]}},
455
{?eh,cth,{'_',init,['_',[]]}},
456
{?eh,cth,{'_',post_init_per_suite,[ct_scope_per_suite_cth_SUITE,'$proplist','$proplist',[]]}},
457
{?eh,tc_done,{ct_scope_per_suite_cth_SUITE,init_per_suite,ok}},
459
{?eh,tc_start,{ct_scope_per_suite_cth_SUITE,test_case}},
460
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}},
461
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[]]}},
462
{?eh,tc_done,{ct_scope_per_suite_cth_SUITE,test_case,ok}},
464
{?eh,tc_start,{ct_scope_per_suite_cth_SUITE,end_per_suite}},
465
{?eh,cth,{'_',pre_end_per_suite,
466
[ct_scope_per_suite_cth_SUITE,'$proplist',[]]}},
467
{?eh,cth,{'_',post_end_per_suite,[ct_scope_per_suite_cth_SUITE,'$proplist','_',[]]}},
468
{?eh,cth,{'_',terminate,[[]]}},
469
{?eh,tc_done,{ct_scope_per_suite_cth_SUITE,end_per_suite,ok}},
470
{?eh,test_done,{'DEF','STOP_TIME'}},
471
{?eh,stop_logging,[]}
474
test_events(scope_suite_cth) ->
476
{?eh,start_logging,{'DEF','RUNDIR'}},
477
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
478
{?eh,tc_start,{ct_scope_suite_cth_SUITE,init_per_suite}},
479
{?eh,cth,{'_',id,[[]]}},
480
{?eh,cth,{'_',init,['_',[]]}},
481
{?eh,cth,{'_',pre_init_per_suite,[ct_scope_suite_cth_SUITE,'$proplist',[]]}},
482
{?eh,cth,{'_',post_init_per_suite,[ct_scope_suite_cth_SUITE,'$proplist','$proplist',[]]}},
483
{?eh,tc_done,{ct_scope_suite_cth_SUITE,init_per_suite,ok}},
485
{?eh,tc_start,{ct_scope_suite_cth_SUITE,test_case}},
486
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}},
487
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[]]}},
488
{?eh,tc_done,{ct_scope_suite_cth_SUITE,test_case,ok}},
490
{?eh,tc_start,{ct_scope_suite_cth_SUITE,end_per_suite}},
491
{?eh,cth,{'_',pre_end_per_suite,[ct_scope_suite_cth_SUITE,'$proplist',[]]}},
492
{?eh,cth,{'_',post_end_per_suite,[ct_scope_suite_cth_SUITE,'$proplist','_',[]]}},
493
{?eh,cth,{'_',terminate,[[]]}},
494
{?eh,tc_done,{ct_scope_suite_cth_SUITE,end_per_suite,ok}},
495
{?eh,test_done,{'DEF','STOP_TIME'}},
496
{?eh,stop_logging,[]}
499
test_events(scope_per_group_cth) ->
501
{?eh,start_logging,{'DEF','RUNDIR'}},
502
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
503
{?eh,tc_start,{ct_scope_per_group_cth_SUITE,init_per_suite}},
504
{?eh,tc_done,{ct_scope_per_group_cth_SUITE,init_per_suite,ok}},
506
[{?eh,tc_start,{ct_scope_per_group_cth_SUITE,{init_per_group,group1,[]}}},
507
{?eh,cth,{'_',id,[[]]}},
508
{?eh,cth,{'_',init,['_',[]]}},
509
{?eh,cth,{'_',post_init_per_group,[group1,'$proplist','$proplist',[]]}},
510
{?eh,tc_done,{ct_scope_per_group_cth_SUITE,{init_per_group,group1,[]},ok}},
512
{?eh,tc_start,{ct_scope_per_group_cth_SUITE,test_case}},
513
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}},
514
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[]]}},
515
{?eh,tc_done,{ct_scope_per_group_cth_SUITE,test_case,ok}},
517
{?eh,tc_start,{ct_scope_per_group_cth_SUITE,{end_per_group,group1,[]}}},
518
{?eh,cth,{'_',pre_end_per_group,[group1,'$proplist',[]]}},
519
{?eh,cth,{'_',post_end_per_group,[group1,'$proplist','_',[]]}},
520
{?eh,cth,{'_',terminate,[[]]}},
521
{?eh,tc_done,{ct_scope_per_group_cth_SUITE,{end_per_group,group1,[]},ok}}],
523
{?eh,tc_start,{ct_scope_per_group_cth_SUITE,end_per_suite}},
524
{?eh,tc_done,{ct_scope_per_group_cth_SUITE,end_per_suite,ok}},
525
{?eh,test_done,{'DEF','STOP_TIME'}},
526
{?eh,stop_logging,[]}
529
test_events(scope_per_suite_state_cth) ->
531
{?eh,start_logging,{'DEF','RUNDIR'}},
532
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
533
{?eh,tc_start,{ct_scope_per_suite_state_cth_SUITE,init_per_suite}},
534
{?eh,cth,{'_',id,[[test]]}},
535
{?eh,cth,{'_',init,['_',[test]]}},
536
{?eh,cth,{'_',post_init_per_suite,[ct_scope_per_suite_state_cth_SUITE,'$proplist','$proplist',[test]]}},
537
{?eh,tc_done,{ct_scope_per_suite_state_cth_SUITE,init_per_suite,ok}},
539
{?eh,tc_start,{ct_scope_per_suite_state_cth_SUITE,test_case}},
540
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[test]]}},
541
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[test]]}},
542
{?eh,tc_done,{ct_scope_per_suite_state_cth_SUITE,test_case,ok}},
544
{?eh,tc_start,{ct_scope_per_suite_state_cth_SUITE,end_per_suite}},
545
{?eh,cth,{'_',pre_end_per_suite,
546
[ct_scope_per_suite_state_cth_SUITE,'$proplist',[test]]}},
547
{?eh,cth,{'_',post_end_per_suite,[ct_scope_per_suite_state_cth_SUITE,'$proplist','_',[test]]}},
548
{?eh,cth,{'_',terminate,[[test]]}},
549
{?eh,tc_done,{ct_scope_per_suite_state_cth_SUITE,end_per_suite,ok}},
550
{?eh,test_done,{'DEF','STOP_TIME'}},
551
{?eh,stop_logging,[]}
554
test_events(scope_suite_state_cth) ->
556
{?eh,start_logging,{'DEF','RUNDIR'}},
557
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
558
{?eh,tc_start,{ct_scope_suite_state_cth_SUITE,init_per_suite}},
559
{?eh,cth,{'_',id,[[test]]}},
560
{?eh,cth,{'_',init,['_',[test]]}},
561
{?eh,cth,{'_',pre_init_per_suite,[ct_scope_suite_state_cth_SUITE,'$proplist',[test]]}},
562
{?eh,cth,{'_',post_init_per_suite,[ct_scope_suite_state_cth_SUITE,'$proplist','$proplist',[test]]}},
563
{?eh,tc_done,{ct_scope_suite_state_cth_SUITE,init_per_suite,ok}},
565
{?eh,tc_start,{ct_scope_suite_state_cth_SUITE,test_case}},
566
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[test]]}},
567
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[test]]}},
568
{?eh,tc_done,{ct_scope_suite_state_cth_SUITE,test_case,ok}},
570
{?eh,tc_start,{ct_scope_suite_state_cth_SUITE,end_per_suite}},
571
{?eh,cth,{'_',pre_end_per_suite,[ct_scope_suite_state_cth_SUITE,'$proplist',[test]]}},
572
{?eh,cth,{'_',post_end_per_suite,[ct_scope_suite_state_cth_SUITE,'$proplist','_',[test]]}},
573
{?eh,cth,{'_',terminate,[[test]]}},
574
{?eh,tc_done,{ct_scope_suite_state_cth_SUITE,end_per_suite,ok}},
575
{?eh,test_done,{'DEF','STOP_TIME'}},
576
{?eh,stop_logging,[]}
579
test_events(scope_per_group_state_cth) ->
581
{?eh,start_logging,{'DEF','RUNDIR'}},
582
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
583
{?eh,tc_start,{ct_scope_per_group_state_cth_SUITE,init_per_suite}},
584
{?eh,tc_done,{ct_scope_per_group_state_cth_SUITE,init_per_suite,ok}},
586
[{?eh,tc_start,{ct_scope_per_group_state_cth_SUITE,{init_per_group,group1,[]}}},
587
{?eh,cth,{'_',id,[[test]]}},
588
{?eh,cth,{'_',init,['_',[test]]}},
589
{?eh,cth,{'_',post_init_per_group,[group1,'$proplist','$proplist',[test]]}},
590
{?eh,tc_done,{ct_scope_per_group_state_cth_SUITE,{init_per_group,group1,[]},ok}},
592
{?eh,tc_start,{ct_scope_per_group_state_cth_SUITE,test_case}},
593
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[test]]}},
594
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[test]]}},
595
{?eh,tc_done,{ct_scope_per_group_state_cth_SUITE,test_case,ok}},
597
{?eh,tc_start,{ct_scope_per_group_state_cth_SUITE,{end_per_group,group1,[]}}},
598
{?eh,cth,{'_',pre_end_per_group,[group1,'$proplist',[test]]}},
599
{?eh,cth,{'_',post_end_per_group,[group1,'$proplist','_',[test]]}},
600
{?eh,cth,{'_',terminate,[[test]]}},
601
{?eh,tc_done,{ct_scope_per_group_state_cth_SUITE,{end_per_group,group1,[]},ok}}],
603
{?eh,tc_start,{ct_scope_per_group_state_cth_SUITE,end_per_suite}},
604
{?eh,tc_done,{ct_scope_per_group_state_cth_SUITE,end_per_suite,ok}},
605
{?eh,test_done,{'DEF','STOP_TIME'}},
606
{?eh,stop_logging,[]}
609
test_events(fail_pre_suite_cth) ->
611
{?eh,start_logging,{'DEF','RUNDIR'}},
612
{?eh,cth,{'_',init,['_',[]]}},
613
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
616
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
617
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
618
{?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist',
619
{fail,"Test failure"},[]]}},
620
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,
621
{failed, {error,"Test failure"}}}},
622
{?eh,cth,{'_',on_tc_fail,
623
[init_per_suite,{failed,"Test failure"},[]]}},
626
{?eh,tc_auto_skip,{ct_cth_empty_SUITE,test_case,
627
{failed,{ct_cth_empty_SUITE,init_per_suite,
628
{failed,"Test failure"}}}}},
629
{?eh,cth,{'_',on_tc_skip,
630
[test_case, {tc_auto_skip,
631
{failed, {ct_cth_empty_SUITE, init_per_suite,
632
{failed, "Test failure"}}}},[]]}},
635
{?eh,tc_auto_skip, {ct_cth_empty_SUITE, end_per_suite,
636
{failed, {ct_cth_empty_SUITE, init_per_suite,
637
{failed, "Test failure"}}}}},
638
{?eh,cth,{'_',on_tc_skip,
639
[end_per_suite, {tc_auto_skip,
640
{failed, {ct_cth_empty_SUITE, init_per_suite,
641
{failed, "Test failure"}}}},[]]}},
644
{?eh,test_done,{'DEF','STOP_TIME'}},
645
{?eh,cth, {'_',terminate,[[]]}},
646
{?eh,stop_logging,[]}
649
test_events(fail_post_suite_cth) ->
651
{?eh,start_logging,{'DEF','RUNDIR'}},
652
{?eh,cth,{'_',init,['_',[]]}},
653
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
654
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
655
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
656
{?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
657
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,
658
{failed,{error,"Test failure"}}}},
659
{?eh,cth,{'_',on_tc_fail,[init_per_suite, {failed,"Test failure"}, []]}},
661
{?eh,tc_auto_skip,{ct_cth_empty_SUITE,test_case,
662
{failed,{ct_cth_empty_SUITE,init_per_suite,
663
{failed,"Test failure"}}}}},
664
{?eh,cth,{'_',on_tc_skip,[test_case,{tc_auto_skip,'_'},[]]}},
666
{?eh,tc_auto_skip, {ct_cth_empty_SUITE, end_per_suite,
667
{failed, {ct_cth_empty_SUITE, init_per_suite,
668
{failed, "Test failure"}}}}},
669
{?eh,cth,{'_',on_tc_skip,[end_per_suite,{tc_auto_skip,'_'},[]]}},
671
{?eh,test_done,{'DEF','STOP_TIME'}},
672
{?eh,cth, {'_',terminate,[[]]}},
673
{?eh,stop_logging,[]}
676
test_events(skip_pre_suite_cth) ->
678
{?eh,start_logging,{'DEF','RUNDIR'}},
679
{?eh,cth,{'_',init,['_',[]]}},
680
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
681
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
682
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
683
{?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist',{skip,"Test skip"},[]]}},
684
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,{skipped,"Test skip"}}},
685
{?eh,cth,{'_',on_tc_skip,
686
[init_per_suite,{tc_user_skip,{skipped,"Test skip"}},[]]}},
688
{?eh,tc_auto_skip,{ct_cth_empty_SUITE,test_case,"Test skip"}},
689
{?eh,cth,{'_',on_tc_skip,[test_case,{tc_auto_skip,"Test skip"},[]]}},
691
{?eh,tc_auto_skip, {ct_cth_empty_SUITE, end_per_suite,"Test skip"}},
692
{?eh,cth,{'_',on_tc_skip,[end_per_suite,{tc_auto_skip,"Test skip"},[]]}},
694
{?eh,test_done,{'DEF','STOP_TIME'}},
695
{?eh,cth, {'_',terminate,[[]]}},
696
{?eh,stop_logging,[]}
699
test_events(skip_post_suite_cth) ->
701
{?eh,start_logging,{'DEF','RUNDIR'}},
702
{?eh,cth,{'_',init,['_',[]]}},
703
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
705
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
706
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
707
{?eh,cth,{'_',post_init_per_suite,[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
708
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,{skipped,"Test skip"}}},
709
{?eh,cth,{'_',on_tc_skip,
710
[init_per_suite,{tc_user_skip,{skipped,"Test skip"}},[]]}},
712
{?eh,tc_auto_skip,{ct_cth_empty_SUITE,test_case,"Test skip"}},
713
{?eh,cth,{'_',on_tc_skip,[test_case,{tc_auto_skip,"Test skip"},[]]}},
715
{?eh,tc_auto_skip, {ct_cth_empty_SUITE, end_per_suite,"Test skip"}},
716
{?eh,cth,{'_',on_tc_skip,[end_per_suite,{tc_auto_skip,"Test skip"},[]]}},
718
{?eh,test_done,{'DEF','STOP_TIME'}},
719
{?eh,cth,{'_',terminate,[[]]}},
720
{?eh,stop_logging,[]}
723
test_events(recover_post_suite_cth) ->
724
Suite = ct_cth_fail_per_suite_SUITE,
726
{?eh,start_logging,'_'},
727
{?eh,cth,{'_',init,['_',[]]}},
728
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
729
{?eh,tc_start,{Suite,init_per_suite}},
730
{?eh,cth,{'_',pre_init_per_suite,[Suite,'$proplist','$proplist']}},
731
{?eh,cth,{'_',post_init_per_suite,[Suite,contains([tc_status]),
732
{'EXIT',{'_','_'}},[]]}},
733
{?eh,tc_done,{Suite,init_per_suite,ok}},
735
{?eh,tc_start,{Suite,test_case}},
736
{?eh,cth,{'_',pre_init_per_testcase,
737
[test_case, not_contains([tc_status]),[]]}},
738
{?eh,cth,{'_',post_end_per_testcase,
739
[test_case, contains([tc_status]),'_',[]]}},
740
{?eh,tc_done,{Suite,test_case,ok}},
742
{?eh,tc_start,{Suite,end_per_suite}},
743
{?eh,cth,{'_',pre_end_per_suite,
744
[Suite,not_contains([tc_status]),[]]}},
745
{?eh,cth,{'_',post_end_per_suite,
746
[Suite,not_contains([tc_status]),'_',[]]}},
747
{?eh,tc_done,{Suite,end_per_suite,ok}},
748
{?eh,test_done,{'DEF','STOP_TIME'}},
749
{?eh,cth,{'_',terminate,[[]]}},
750
{?eh,stop_logging,[]}
753
test_events(update_config_cth) ->
755
{?eh,start_logging,{'DEF','RUNDIR'}},
756
{?eh,cth,{'_',init,['_',[]]}},
757
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
759
{?eh,tc_start,{ct_update_config_SUITE,init_per_suite}},
760
{?eh,cth,{'_',pre_init_per_suite,
761
[ct_update_config_SUITE,contains([]),[]]}},
762
{?eh,cth,{'_',post_init_per_suite,
763
[ct_update_config_SUITE,
767
pre_init_per_suite]),
769
{?eh,tc_done,{ct_update_config_SUITE,init_per_suite,ok}},
771
{?eh,tc_start,{ct_update_config_SUITE, {init_per_group,group1,[]}}},
772
{?eh,cth,{'_',pre_init_per_group,
774
[post_init_per_suite,
776
pre_init_per_suite]),
778
{?eh,cth,{'_',post_init_per_group,
781
[post_init_per_suite,
783
pre_init_per_suite]),
789
pre_init_per_suite]),
791
{?eh,tc_done,{ct_update_config_SUITE,{init_per_group,group1,[]},ok}},
793
{?eh,tc_start,{ct_update_config_SUITE,test_case}},
794
{?eh,cth,{'_',pre_init_per_testcase,
796
[post_init_per_group,
801
pre_init_per_suite]),
803
{?eh,cth,{'_',post_end_per_testcase,
806
pre_init_per_testcase,
812
pre_init_per_suite]),
814
{?eh,tc_done,{ct_update_config_SUITE,test_case,ok}},
816
{?eh,tc_start,{ct_update_config_SUITE, {end_per_group,group1,[]}}},
817
{?eh,cth,{'_',pre_end_per_group,
819
[post_init_per_group,
824
pre_init_per_suite]),
826
{?eh,cth,{'_',post_end_per_group,
835
pre_init_per_suite]),
837
{?eh,tc_done,{ct_update_config_SUITE,{end_per_group,group1,[]},ok}},
839
{?eh,tc_start,{ct_update_config_SUITE,end_per_suite}},
840
{?eh,cth,{'_',pre_end_per_suite,
841
[ct_update_config_SUITE,contains(
842
[post_init_per_suite,
844
pre_init_per_suite]),
846
{?eh,cth,{'_',post_end_per_suite,
847
[ct_update_config_SUITE,contains(
851
pre_init_per_suite]),
853
{?eh,tc_done,{ct_update_config_SUITE,end_per_suite,ok}},
854
{?eh,test_done,{'DEF','STOP_TIME'}},
855
{?eh,cth,{'_',terminate,[contains(
860
pre_init_per_suite])]}},
861
{?eh,stop_logging,[]}
864
test_events(state_update_cth) ->
866
{?eh,start_logging,{'DEF','RUNDIR'}},
867
{?eh,cth,{'_',init,['_',[]]}},
868
{?eh,cth,{'_',init,['_',[]]}},
869
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
870
{?eh,tc_start,{'_',init_per_suite}},
872
{?eh,tc_done,{'_',end_per_suite,ok}},
873
{?eh,test_done,{'DEF','STOP_TIME'}},
874
{?eh,cth,{'_',terminate,[contains(
875
[post_end_per_suite,pre_end_per_suite,
876
post_end_per_group,pre_end_per_group,
878
[post_end_per_testcase,pre_init_per_testcase,
879
on_tc_skip,post_end_per_testcase,
880
pre_init_per_testcase,on_tc_fail,
881
post_end_per_testcase,pre_init_per_testcase]
883
post_init_per_group,pre_init_per_group,
884
post_init_per_suite,pre_init_per_suite,
886
{?eh,cth,{'_',terminate,[contains(
887
[post_end_per_suite,pre_end_per_suite,
888
post_end_per_group,pre_end_per_group,
890
[post_end_per_testcase,pre_init_per_testcase,
891
on_tc_skip,post_end_per_testcase,
892
pre_init_per_testcase,on_tc_fail,
893
post_end_per_testcase,pre_init_per_testcase]
895
post_init_per_group,pre_init_per_group,
896
post_init_per_suite,pre_init_per_suite,
899
{?eh,stop_logging,[]}
902
test_events(options_cth) ->
904
{?eh,start_logging,{'DEF','RUNDIR'}},
905
{?eh,cth,{empty_cth,init,['_',[test]]}},
906
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
907
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
908
{?eh,cth,{empty_cth,pre_init_per_suite,
909
[ct_cth_empty_SUITE,'$proplist',[test]]}},
910
{?eh,cth,{empty_cth,post_init_per_suite,
911
[ct_cth_empty_SUITE,'$proplist','$proplist',[test]]}},
912
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,ok}},
914
{?eh,tc_start,{ct_cth_empty_SUITE,test_case}},
915
{?eh,cth,{empty_cth,pre_init_per_testcase,[test_case,'$proplist',[test]]}},
916
{?eh,cth,{empty_cth,post_end_per_testcase,[test_case,'$proplist','_',[test]]}},
917
{?eh,tc_done,{ct_cth_empty_SUITE,test_case,ok}},
919
{?eh,tc_start,{ct_cth_empty_SUITE,end_per_suite}},
920
{?eh,cth,{empty_cth,pre_end_per_suite,
921
[ct_cth_empty_SUITE,'$proplist',[test]]}},
922
{?eh,cth,{empty_cth,post_end_per_suite,[ct_cth_empty_SUITE,'$proplist','_',[test]]}},
923
{?eh,tc_done,{ct_cth_empty_SUITE,end_per_suite,ok}},
924
{?eh,test_done,{'DEF','STOP_TIME'}},
925
{?eh,cth,{empty_cth,terminate,[[test]]}},
926
{?eh,stop_logging,[]}
929
test_events(same_id_cth) ->
931
{?eh,start_logging,{'DEF','RUNDIR'}},
932
{?eh,cth,{'_',id,[[]]}},
933
{?eh,cth,{'_',init,[same_id_cth,[]]}},
934
{?eh,cth,{'_',id,[[]]}},
935
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
936
{?eh,tc_start,{ct_cth_empty_SUITE,init_per_suite}},
937
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
939
{?eh,cth,{'_',pre_init_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
940
{?eh,cth,{'_',post_init_per_suite,
941
[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}}},
943
{?eh,cth,{'_',post_init_per_suite,
944
[ct_cth_empty_SUITE,'$proplist','$proplist',[]]}},
945
{?eh,tc_done,{ct_cth_empty_SUITE,init_per_suite,ok}}},
947
{?eh,tc_start,{ct_cth_empty_SUITE,test_case}},
948
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}},
950
{?eh,cth,{'_',pre_init_per_testcase,[test_case,'$proplist',[]]}},
951
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[]]}}},
953
{?eh,cth,{'_',post_end_per_testcase,[test_case,'$proplist',ok,[]]}},
954
{?eh,tc_done,{ct_cth_empty_SUITE,test_case,ok}}},
956
{?eh,tc_start,{ct_cth_empty_SUITE,end_per_suite}},
957
{?eh,cth,{'_',pre_end_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
959
{?eh,cth,{'_',pre_end_per_suite,[ct_cth_empty_SUITE,'$proplist',[]]}},
960
{?eh,cth,{'_',post_end_per_suite,[ct_cth_empty_SUITE,'$proplist','_',[]]}}},
962
{?eh,cth,{'_',post_end_per_suite,
963
[ct_cth_empty_SUITE,'$proplist','_',[]]}},
964
{?eh,tc_done,{ct_cth_empty_SUITE,end_per_suite,ok}}},
965
{?eh,test_done,{'DEF','STOP_TIME'}},
966
{?eh,cth,{'_',terminate,[[]]}},
967
{?eh,stop_logging,[]}
970
test_events(fail_n_skip_with_minimal_cth) ->
971
[{?eh,start_logging,{'DEF','RUNDIR'}},
972
{?eh,cth,{'_',init,['_',[]]}},
973
{?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
974
{?eh,tc_start,{'_',init_per_suite}},
976
{?eh,tc_done,{'_',end_per_suite,ok}},
977
{?eh,cth,{'_',terminate,[[]]}},
978
{?eh,stop_logging,[]}
985
%% test events help functions
987
fun(Proplist) when is_list(Proplist) ->
988
contains(List,Proplist)
991
contains([{not_in_order,List}|T],Rest) ->
992
contains_parallel(List,Rest),
994
contains([{Ele,Pos}|T] = L,[H|T2]) ->
995
case element(Pos,H) of
1001
contains([Ele|T],[{Ele,_}|T2])->
1003
contains([Ele|T],[Ele|T2])->
1005
contains(List,[_|T]) ->
1010
contains_parallel([Key | T], Elems) ->
1011
contains([Key],Elems),
1012
contains_parallel(T,Elems);
1013
contains_parallel([],_Elems) ->
1016
not_contains(List) ->
1017
fun(Proplist) when is_list(Proplist) ->
1018
[] = [Ele || {Ele,_} <- Proplist,