diff options
author | Peter Andersson <[email protected]> | 2011-12-06 00:10:13 +0100 |
---|---|---|
committer | Peter Andersson <[email protected]> | 2011-12-07 15:30:22 +0100 |
commit | 0c5481927c9b187d9f8bdb10bc12fd94f5923691 (patch) | |
tree | 9bd08c9d3e29f5b5601b728d82ecacfa64615c32 /lib/common_test | |
parent | 093cfddf405754c1027839746ba93a6ac512d313 (diff) | |
download | otp-0c5481927c9b187d9f8bdb10bc12fd94f5923691.tar.gz otp-0c5481927c9b187d9f8bdb10bc12fd94f5923691.tar.bz2 otp-0c5481927c9b187d9f8bdb10bc12fd94f5923691.zip |
Change init/end_per_group/0 -> init/end_per_group/1
Diffstat (limited to 'lib/common_test')
10 files changed, 1333 insertions, 61 deletions
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl index 4c539fe696..ee8bb36c9e 100644 --- a/lib/common_test/src/ct_framework.erl +++ b/lib/common_test/src/ct_framework.erl @@ -52,6 +52,8 @@ %%% @doc Test server framework callback, called by the test_server %%% when a new test case is started. init_tc(Mod,Func,Config) -> + %% in case Mod == ct_framework, lookup the suite name + Suite = get_suite_name(Mod, Config), %% check if previous testcase was interpreted and has left %% a "dead" trace window behind - if so, kill it case ct_util:get_testdata(interpret) of @@ -61,34 +63,36 @@ init_tc(Mod,Func,Config) -> _ -> ok end, - %% check if we need to add defaults explicitly because %% there's no init_per_suite exported from Mod {InitFailed,DoInit} = case ct_util:get_testdata(curr_tc) of - {Mod,{suite0_failed,_}=Failure} -> + {Suite,{suite0_failed,_}=Failure} -> {Failure,false}; - {Mod,_} -> + {?MODULE,_} -> % should not really happen {false,false}; - _ when Func == init_per_suite -> + {Suite,_} -> % Func is not 1st case in suite {false,false}; - _ -> + _ when Func == init_per_suite -> % defaults will be added anyway + {false,false}; + _ -> % first case in suite {false,true} end, case InitFailed of false -> - ct_util:set_testdata({curr_tc,{Mod,Func}}), - case ct_util:read_suite_data({seq,Mod,Func}) of + ct_util:set_testdata({curr_tc,{Suite,Func}}), + case ct_util:read_suite_data({seq,Suite,Func}) of undefined -> init_tc1(Mod,Func,Config,DoInit); Seq when is_atom(Seq) -> - case ct_util:read_suite_data({seq,Mod,Seq}) of + case ct_util:read_suite_data({seq,Suite,Seq}) of [Func|TCs] -> % this is the 1st case in Seq %% make sure no cases in this seq are marked as failed %% from an earlier execution in the same suite - lists:foreach(fun(TC) -> - ct_util:save_suite_data({seq,Mod,TC},Seq) - end, TCs); + lists:foreach( + fun(TC) -> + ct_util:save_suite_data({seq,Suite,TC},Seq) + end, TCs); _ -> ok end, @@ -150,13 +154,15 @@ init_tc1(Mod,Func,[Config0],DoInit) when is_list(Config0) -> true -> ct_config:delete_default_config(testcase) end, + %% in case Mod == ct_framework, lookup the suite name + Suite = get_suite_name(Mod, Config), case add_defaults(Mod,Func,AllGroups,DoInit) of Error = {suite0_failed,_} -> ct_logs:init_tc(false), ct_event:notify(#event{name=tc_start, node=node(), data={Mod,FuncSpec}}), - ct_util:set_testdata({curr_tc,{Mod,Error}}), + ct_util:set_testdata({curr_tc,{Suite,Error}}), {error,Error}; {SuiteInfo,MergeResult} -> case MergeResult of @@ -261,9 +267,10 @@ ct_suite_init(Mod, Func, [Config]) when is_list(Config) -> end. add_defaults(Mod,Func, GroupPath, DoInit) -> - case (catch Mod:suite()) of + Suite = get_suite_name(Mod, GroupPath), + case (catch Suite:suite()) of {'EXIT',{undef,_}} -> - SuiteInfo = merge_with_suite_defaults(Mod,[]), + SuiteInfo = merge_with_suite_defaults(Suite,[]), SuiteInfoNoCTH = [I || I <- SuiteInfo, element(1,I) =/= ct_hooks], case add_defaults1(Mod,Func, GroupPath, SuiteInfoNoCTH, DoInit) of Error = {error,_} -> {SuiteInfo,Error}; @@ -272,7 +279,7 @@ add_defaults(Mod,Func, GroupPath, DoInit) -> {'EXIT',Reason} -> ErrStr = io_lib:format("~n*** ERROR *** " "~w:suite/0 failed: ~p~n", - [Mod,Reason]), + [Suite,Reason]), io:format(ErrStr, []), io:format(user, ErrStr, []), {suite0_failed,{exited,Reason}}; @@ -281,7 +288,7 @@ add_defaults(Mod,Func, GroupPath, DoInit) -> (_) -> false end, SuiteInfo) of true -> - SuiteInfo1 = merge_with_suite_defaults(Mod, SuiteInfo), + SuiteInfo1 = merge_with_suite_defaults(Suite, SuiteInfo), SuiteInfoNoCTH = [I || I <- SuiteInfo1, element(1,I) =/= ct_hooks], case add_defaults1(Mod,Func, GroupPath, @@ -292,7 +299,7 @@ add_defaults(Mod,Func, GroupPath, DoInit) -> false -> ErrStr = io_lib:format("~n*** ERROR *** " "Invalid return value from " - "~w:suite/0: ~p~n", [Mod,SuiteInfo]), + "~w:suite/0: ~p~n", [Suite,SuiteInfo]), io:format(ErrStr, []), io:format(user, ErrStr, []), {suite0_failed,bad_return_value} @@ -300,25 +307,32 @@ add_defaults(Mod,Func, GroupPath, DoInit) -> SuiteInfo -> ErrStr = io_lib:format("~n*** ERROR *** " "Invalid return value from " - "~w:suite/0: ~p~n", [Mod,SuiteInfo]), + "~w:suite/0: ~p~n", [Suite,SuiteInfo]), io:format(ErrStr, []), io:format(user, ErrStr, []), {suite0_failed,bad_return_value} end. add_defaults1(Mod,Func, GroupPath, SuiteInfo, DoInit) -> + Suite = get_suite_name(Mod, GroupPath), %% GroupPathInfo (for subgroup on level X) = %% [LevelXGroupInfo, LevelX-1GroupInfo, ..., TopLevelGroupInfo] GroupPathInfo = lists:map(fun(GroupProps) -> Name = ?val(name, GroupProps), - case catch Mod:group(Name) of + case catch Suite:group(Name) of GrInfo when is_list(GrInfo) -> GrInfo; _ -> [] end end, GroupPath), + Args = if Func == init_per_group; Func == ct_init_per_group; + Func == end_per_group; Func == ct_end_per_group -> + [?val(name, hd(GroupPath))]; + true -> + [] + end, TestCaseInfo = - case catch apply(Mod,Func,[]) of + case catch apply(Mod,Func,Args) of TCInfo when is_list(TCInfo) -> TCInfo; _ -> [] end, @@ -331,7 +345,6 @@ add_defaults1(Mod,Func, GroupPath, SuiteInfo, DoInit) -> [SDDef || SDDef <- SuiteInfo, ((require == element(1,SDDef)) or (default_config == element(1,SDDef)))], - case check_for_clashes(TestCaseInfo, GroupPathInfo, SuiteReqs) of [] -> add_defaults2(Mod,Func, TCAndGroupInfo,SuiteInfo,SuiteReqs, DoInit); @@ -339,6 +352,25 @@ add_defaults1(Mod,Func, GroupPath, SuiteInfo, DoInit) -> {error,{config_name_already_in_use,Clashes}} end. +get_suite_name(?MODULE, [Cfg|_]) when is_list(Cfg), Cfg /= [] -> + get_suite_name(?MODULE, Cfg); + +get_suite_name(?MODULE, Cfg) when is_list(Cfg), Cfg /= [] -> + case ?val(tc_group_properties, Cfg) of + undefined -> + case ?val(suite, Cfg) of + undefined -> ?MODULE; + Suite -> Suite + end; + GrProps -> + case ?val(suite, GrProps) of + undefined -> ?MODULE; + Suite -> Suite + end + end; +get_suite_name(Mod, _) -> + Mod. + %% Check that alias names are not already in use check_for_clashes(TCInfo, GrPathInfo, SuiteInfo) -> {CurrGrInfo,SearchIn} = case GrPathInfo of @@ -1562,7 +1594,9 @@ report(What,Data) -> node=node(), data=Data}), ct_hooks:on_tc_skip(What, Data), - if Case /= end_per_suite, Case /= end_per_group -> + if Case /= end_per_suite, + Case /= end_per_group, + Case /= ct_end_per_group -> add_to_stats(auto_skipped); true -> ok diff --git a/lib/common_test/test/ct_config_info_SUITE.erl b/lib/common_test/test/ct_config_info_SUITE.erl index b217b80dd7..40da377ee5 100644 --- a/lib/common_test/test/ct_config_info_SUITE.erl +++ b/lib/common_test/test/ct_config_info_SUITE.erl @@ -125,12 +125,12 @@ test_events(config_info) -> [{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g1,[]}}}, {?eh,tc_done,{config_info_1_SUITE, {init_per_group,unknown,[]}, - {failed,{timetrap_timeout,400}}}}, + {failed,{timetrap_timeout,350}}}}, {?eh,tc_auto_skip,{config_info_1_SUITE,t11, - {failed,{config_info_1_SUITE,init_per_group,{timetrap_timeout,400}}}}}, + {failed,{config_info_1_SUITE,init_per_group,{timetrap_timeout,350}}}}}, {?eh,tc_auto_skip,{config_info_1_SUITE,end_per_group, {failed,{config_info_1_SUITE,init_per_group, - {timetrap_timeout,400}}}}}], + {timetrap_timeout,350}}}}}], [{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g2,[]}}}, {?eh,tc_done,{config_info_1_SUITE,{init_per_group,g2,[]},ok}}, @@ -138,7 +138,7 @@ test_events(config_info) -> {?eh,tc_start,{config_info_1_SUITE,{end_per_group,g2,[]}}}, {?eh,tc_done,{config_info_1_SUITE, {end_per_group,unknown,[]}, - {failed,{timetrap_timeout,350}}}}], + {failed,{timetrap_timeout,450}}}}], [{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g3,[]}}}, {?eh,tc_done,{config_info_1_SUITE,{init_per_group,g3,[]},ok}}, [{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g4,[]}}}, @@ -154,11 +154,11 @@ test_events(config_info) -> {?eh,tc_start,{config_info_1_SUITE,t31}}, {?eh,tc_done,{config_info_1_SUITE,t31, {skipped,{failed,{config_info_1_SUITE,init_per_testcase, - {timetrap_timeout,750}}}}}}, + {timetrap_timeout,250}}}}}}, {?eh,tc_start,{config_info_1_SUITE,t32}}, {?eh,tc_done,{config_info_1_SUITE,t32, - {failed,{config_info_1_SUITE,end_per_testcase, - {timetrap_timeout,600}}}}}, + {failed,{config_info_1_SUITE,end_per_testcase, + {timetrap_timeout,250}}}}}, [{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g5,[]}}}, {?eh,tc_done,{config_info_1_SUITE,{init_per_group,g5,[]},ok}}, @@ -166,7 +166,7 @@ test_events(config_info) -> {?eh,tc_start,{config_info_1_SUITE,{end_per_group,g5,[]}}}, {?eh,tc_done,{config_info_1_SUITE, {end_per_group,unknown,[]}, - {failed,{timetrap_timeout,350}}}}], + {failed,{timetrap_timeout,400}}}}], {?eh,tc_start,{config_info_1_SUITE,{end_per_group,g3,[]}}}, {?eh,tc_done,{config_info_1_SUITE,{end_per_group,g3,[]},ok}}], diff --git a/lib/common_test/test/ct_config_info_SUITE_data/config_info_1_SUITE.erl b/lib/common_test/test/ct_config_info_SUITE_data/config_info_1_SUITE.erl index 1ec5592e6a..53a233b7a4 100644 --- a/lib/common_test/test/ct_config_info_SUITE_data/config_info_1_SUITE.erl +++ b/lib/common_test/test/ct_config_info_SUITE_data/config_info_1_SUITE.erl @@ -35,6 +35,7 @@ group(_) -> %%%----------------------------------------------------------------- init_per_suite() -> + ct:pal("init_per_suite info called", []), [{timetrap,1000}, {require,suite_data}, {default_config,suite_data,suite_data_val}]. @@ -47,6 +48,7 @@ init_per_suite(Config) -> %%%----------------------------------------------------------------- end_per_suite() -> + ct:pal("end_per_suite info called", []), [{timetrap,300}, {require,suite_data2}, {default_config,suite_data2,suite_data2_val}]. @@ -58,12 +60,16 @@ end_per_suite(_Config) -> %%%----------------------------------------------------------------- -init_per_group() -> +init_per_group(g1) -> + ct:pal("init_per_group(g1) info called", []), + [{timetrap,350}]; +init_per_group(G) -> + ct:pal("init_per_group(~w) info called", [G]), [{timetrap,400}]. -init_per_group(g1, Config) -> +init_per_group(g1, _Config) -> ct:sleep(1000); -init_per_group(g4, Config) -> +init_per_group(g4, _Config) -> ct:sleep(1000); init_per_group(G, Config) -> GrProps = proplists:get_value(tc_group_properties, Config), @@ -74,12 +80,16 @@ init_per_group(G, Config) -> %%%----------------------------------------------------------------- -end_per_group() -> - [{timetrap,350}]. +end_per_group(g2) -> + ct:pal("end_per_group(g2) info called", []), + [{timetrap,450}]; +end_per_group(G) -> + ct:pal("end_per_group(~w) info called", [G]), + [{timetrap,400}]. -end_per_group(g2, Config) -> +end_per_group(g2, _Config) -> ct:sleep(1000); -end_per_group(g5, Config) -> +end_per_group(g5, _Config) -> ct:sleep(1000); end_per_group(G, Config) -> GrProps = proplists:get_value(tc_group_properties, Config), @@ -92,9 +102,9 @@ end_per_group(G, Config) -> init_per_testcase() -> [{timetrap,750}]. -init_per_testcase(t1, Config) -> +init_per_testcase(t1, _Config) -> ct:sleep(1000); -init_per_testcase(t31, Config) -> +init_per_testcase(t31, _Config) -> ct:sleep(1000); init_per_testcase(_TestCase, Config) -> Config. @@ -104,9 +114,9 @@ init_per_testcase(_TestCase, Config) -> end_per_testcase() -> [{timetrap,600}]. -end_per_testcase(t2, Config) -> +end_per_testcase(t2, _Config) -> ct:sleep(1000); -end_per_testcase(t32, Config) -> +end_per_testcase(t32, _Config) -> ct:sleep(1000); end_per_testcase(_TestCase, _Config) -> ok. diff --git a/lib/common_test/test/ct_error_SUITE.erl b/lib/common_test/test/ct_error_SUITE.erl index 2f081decca..2b3157ff3b 100644 --- a/lib/common_test/test/ct_error_SUITE.erl +++ b/lib/common_test/test/ct_error_SUITE.erl @@ -870,10 +870,10 @@ test_events(timetrap_fun) -> {?eh,tc_done, {timetrap_6_SUITE,init_per_suite,{skipped,{timetrap_error,kaboom}}}}, {?eh,tc_auto_skip, - {timetrap_6_SUITE,tc0,{fw_auto_skip,{timetrap_error,kaboom}}}}, + {timetrap_6_SUITE,tc0,{timetrap_error,kaboom}}}, {?eh,test_stats,{0,8,{0,5}}}, {?eh,tc_auto_skip, - {timetrap_6_SUITE,end_per_suite,{fw_auto_skip,{timetrap_error,kaboom}}}}, + {timetrap_6_SUITE,end_per_suite,{timetrap_error,kaboom}}}, {?eh,tc_done,{timetrap_7_SUITE,init_per_suite,ok}}, {?eh,tc_start,{timetrap_7_SUITE,tc0}}, diff --git a/lib/common_test/test/ct_group_info_SUITE.erl b/lib/common_test/test/ct_group_info_SUITE.erl index 2ad908e5fc..2da8219196 100644 --- a/lib/common_test/test/ct_group_info_SUITE.erl +++ b/lib/common_test/test/ct_group_info_SUITE.erl @@ -63,8 +63,12 @@ all() -> timetrap_all, timetrap_group, timetrap_group_case, + timetrap_all_no_ips, + timetrap_all_no_ipg, require, - require_default + require_default, + require_no_ips, + require_no_ipg ]. %%-------------------------------------------------------------------- @@ -100,6 +104,24 @@ timetrap_group_case(Config) when is_list(Config) -> %%%----------------------------------------------------------------- %%% +timetrap_all_no_ips(Config) when is_list(Config) -> + DataDir = ?config(data_dir, Config), + Suite = filename:join(DataDir, "group_timetrap_2_SUITE"), + {Opts,ERPid} = setup([{suite,Suite}, + {label,timetrap_all_no_ips}], Config), + ok = execute(timetrap_all_no_ips, Opts, ERPid, Config). + +%%%----------------------------------------------------------------- +%%% +timetrap_all_no_ipg(Config) when is_list(Config) -> + DataDir = ?config(data_dir, Config), + Suite = filename:join(DataDir, "group_timetrap_3_SUITE"), + {Opts,ERPid} = setup([{suite,Suite}, + {label,timetrap_all_no_ipg}], Config), + ok = execute(timetrap_all_no_ipg, Opts, ERPid, Config). + +%%%----------------------------------------------------------------- +%%% require(Config) when is_list(Config) -> DataDir = ?config(data_dir, Config), Suite = filename:join(DataDir, "group_require_1_SUITE"), @@ -117,6 +139,25 @@ require_default(Config) when is_list(Config) -> {label,require_default}], Config), ok = execute(require_default, Opts, ERPid, Config). +%%%----------------------------------------------------------------- +%%% +require_no_ips(Config) when is_list(Config) -> + DataDir = ?config(data_dir, Config), + Suite = filename:join(DataDir, "group_require_2_SUITE"), + CfgFile = filename:join(DataDir, "vars.cfg"), + {Opts,ERPid} = setup([{suite,Suite},{config,CfgFile}, + {label,require_no_ips}], Config), + ok = execute(require_no_ips, Opts, ERPid, Config). + +%%%----------------------------------------------------------------- +%%% +require_no_ipg(Config) when is_list(Config) -> + DataDir = ?config(data_dir, Config), + Suite = filename:join(DataDir, "group_require_3_SUITE"), + CfgFile = filename:join(DataDir, "vars.cfg"), + {Opts,ERPid} = setup([{suite,Suite},{config,CfgFile}, + {label,require_no_ipg}], Config), + ok = execute(require_no_ipg, Opts, ERPid, Config). %%%----------------------------------------------------------------- %%% HELP FUNCTIONS @@ -311,6 +352,165 @@ test_events(timetrap_group_case) -> {?eh,test_done,{'DEF','STOP_TIME'}}, {?eh,stop_logging,[]} ]; + +test_events(timetrap_all_no_ips) -> + [ + {?eh,start_logging,{'DEF','RUNDIR'}}, + {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, + {?eh,start_info,{1,1,14}}, + + {?eh,tc_done,{group_timetrap_2_SUITE,t1,{failed,{timetrap_timeout,1000}}}}, + + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g1,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g1,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t11,{failed,{timetrap_timeout,500}}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g1,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g1,[]},ok}}], + + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g2,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g2,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t21,{failed,{timetrap_timeout,1500}}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g2,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g2,[]},ok}}], + + {?eh,tc_done,{group_timetrap_2_SUITE,t2,{failed,{timetrap_timeout,1000}}}}, + + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g3,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g3,[]},ok}}, + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g4,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g4,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t41,{failed,{timetrap_timeout,250}}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g4,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g4,[]},ok}}], + {?eh,tc_done,{group_timetrap_2_SUITE,t31,{failed,{timetrap_timeout,500}}}}, + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g5,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g5,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t51,{failed,{timetrap_timeout,1500}}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g5,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g5,[]},ok}}], + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g3,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g3,[]},ok}}], + + {?eh,tc_done,{group_timetrap_2_SUITE,t3,{failed,{timetrap_timeout,250}}}}, + + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g6,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g6,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t61,{failed,{timetrap_timeout,500}}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g6,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g6,[]},ok}}], + + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g7,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g7,[]},ok}}, + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g8,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g8,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t81,{failed,{timetrap_timeout,750}}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g8,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g8,[]},ok}}], + {?eh,tc_done,{group_timetrap_2_SUITE,t71,{failed,{timetrap_timeout,500}}}}, + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g9,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g9,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t91,{failed,{timetrap_timeout,250}}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g9,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g9,[]},ok}}], + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g7,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g7,[]},ok}}], + + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g10,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g10,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t101,{failed,{timetrap_timeout,1000}}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g10,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g10,[]},ok}}], + + [{?eh,tc_start,{group_timetrap_2_SUITE,{init_per_group,g11,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{init_per_group,g11,[]},ok}}, + {?eh,tc_done,{group_timetrap_2_SUITE,t111,{failed,{timetrap_timeout,1000}}}}, + {?eh,test_stats,{0,14,{0,0}}}, + {?eh,tc_start,{group_timetrap_2_SUITE,{end_per_group,g11,[]}}}, + {?eh,tc_done,{group_timetrap_2_SUITE,{end_per_group,g11,[]},ok}}], + + {?eh,test_done,{'DEF','STOP_TIME'}}, + {?eh,stop_logging,[]} + ]; + +test_events(timetrap_all_no_ipg) -> + [ + {?eh,start_logging,{'DEF','RUNDIR'}}, + {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, + {?eh,start_info,{1,1,14}}, + + {?eh,tc_done,{group_timetrap_3_SUITE,t1,{failed,{timetrap_timeout,1000}}}}, + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g1,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g1,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t11,{failed,{timetrap_timeout,500}}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g1,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g1,[{suite,group_timetrap_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g2,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g2,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t21,{failed,{timetrap_timeout,1500}}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g2,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g2,[{suite,group_timetrap_3_SUITE}]},ok}}], + + {?eh,tc_done,{group_timetrap_3_SUITE,t2,{failed,{timetrap_timeout,1000}}}}, + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g3,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g3,[{suite,group_timetrap_3_SUITE}]},ok}}, + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g4,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g4,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t41,{failed,{timetrap_timeout,250}}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g4,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g4,[{suite,group_timetrap_3_SUITE}]},ok}}], + {?eh,tc_done,{group_timetrap_3_SUITE,t31,{failed,{timetrap_timeout,500}}}}, + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g5,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g5,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t51,{failed,{timetrap_timeout,1500}}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g5,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g5,[{suite,group_timetrap_3_SUITE}]},ok}}], + {?eh,tc_start,{ct_framework,{ct_end_per_group,g3,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g3,[{suite,group_timetrap_3_SUITE}]},ok}}], + + {?eh,tc_done,{group_timetrap_3_SUITE,t3,{failed,{timetrap_timeout,250}}}}, + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g6,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g6,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t61,{failed,{timetrap_timeout,500}}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g6,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g6,[{suite,group_timetrap_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g7,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g7,[{suite,group_timetrap_3_SUITE}]},ok}}, + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g8,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g8,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t81,{failed,{timetrap_timeout,750}}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g8,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g8,[{suite,group_timetrap_3_SUITE}]},ok}}], + {?eh,tc_done,{group_timetrap_3_SUITE,t71,{failed,{timetrap_timeout,500}}}}, + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g9,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g9,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t91,{failed,{timetrap_timeout,250}}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g9,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g9,[{suite,group_timetrap_3_SUITE}]},ok}}], + {?eh,tc_start,{ct_framework,{ct_end_per_group,g7,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g7,[{suite,group_timetrap_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g10,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g10,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t101,{failed,{timetrap_timeout,1000}}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g10,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g10,[{suite,group_timetrap_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g11,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g11,[{suite,group_timetrap_3_SUITE}]},ok}}, + {?eh,tc_done,{group_timetrap_3_SUITE,t111,{failed,{timetrap_timeout,1000}}}}, + {?eh,test_stats,{0,14,{0,0}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g11,[{suite,group_timetrap_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g11,[{suite,group_timetrap_3_SUITE}]},ok}}], + + {?eh,test_done,{'DEF','STOP_TIME'}}, + {?eh,stop_logging,[]} + ]; + test_events(require) -> [ {?eh,start_logging,{'DEF','RUNDIR'}}, @@ -341,11 +541,10 @@ test_events(require) -> {?eh,tc_done,{group_require_1_SUITE,{init_per_group,g4,[]}, {skipped,{require_failed,{name_in_use,common2_alias,common2}}}}}, {?eh,tc_auto_skip,{group_require_1_SUITE,t41, - {fw_auto_skip, - {require_failed,{name_in_use,common2_alias,common2}}}}}, + {require_failed,{name_in_use,common2_alias,common2}}}}, {?eh,test_stats,{4,0,{0,1}}}, {?eh,tc_auto_skip,{group_require_1_SUITE,end_per_group, - {fw_auto_skip,{require_failed,{name_in_use,common2_alias,common2}}}}}], + {require_failed,{name_in_use,common2_alias,common2}}}}], [{?eh,tc_start,{group_require_1_SUITE,{init_per_group,g5,[]}}}, {?eh,tc_done,{group_require_1_SUITE,{init_per_group,g5,[]},ok}}, @@ -369,10 +568,10 @@ test_events(require) -> {init_per_group,g8,[]}, {skipped,{require_failed,{not_available,non_existing}}}}}, {?eh,tc_auto_skip,{group_require_1_SUITE,t81, - {fw_auto_skip,{require_failed,{not_available,non_existing}}}}}, + {require_failed,{not_available,non_existing}}}}, {?eh,test_stats,{8,0,{0,2}}}, {?eh,tc_auto_skip,{group_require_1_SUITE,end_per_group, - {fw_auto_skip,{require_failed,{not_available,non_existing}}}}}], + {require_failed,{not_available,non_existing}}}}], [{?eh,tc_start,{group_require_1_SUITE,{init_per_group,g9,[]}}}, {?eh,tc_done,{group_require_1_SUITE,{init_per_group,g9,[]},ok}}, {?eh,tc_done,{group_require_1_SUITE,t91, @@ -430,10 +629,10 @@ test_events(require_default) -> {init_per_group,g4,[]}, {skipped,{require_failed,{not_available,common3}}}}}, {?eh,tc_auto_skip,{group_require_1_SUITE,t41, - {fw_auto_skip,{require_failed,{not_available,common3}}}}}, + {require_failed,{not_available,common3}}}}, {?eh,test_stats,{4,0,{0,1}}}, {?eh,tc_auto_skip,{group_require_1_SUITE,end_per_group, - {fw_auto_skip,{require_failed,{not_available,common3}}}}}], + {require_failed,{not_available,common3}}}}], [{?eh,tc_start,{group_require_1_SUITE,{init_per_group,g5,[]}}}, {?eh,tc_done,{group_require_1_SUITE,{init_per_group,g5,[]},ok}}, @@ -457,10 +656,10 @@ test_events(require_default) -> {init_per_group,g8,[]}, {skipped,{require_failed,{not_available,non_existing}}}}}, {?eh,tc_auto_skip,{group_require_1_SUITE,t81, - {fw_auto_skip,{require_failed,{not_available,non_existing}}}}}, + {require_failed,{not_available,non_existing}}}}, {?eh,test_stats,{8,0,{0,2}}}, {?eh,tc_auto_skip,{group_require_1_SUITE,end_per_group, - {fw_auto_skip,{require_failed,{not_available,non_existing}}}}}], + {require_failed,{not_available,non_existing}}}}], [{?eh,tc_start,{group_require_1_SUITE,{init_per_group,g9,[]}}}, {?eh,tc_done,{group_require_1_SUITE,{init_per_group,g9,[]},ok}}, @@ -486,4 +685,175 @@ test_events(require_default) -> {?eh,tc_done,{group_require_1_SUITE,end_per_suite,ok}}, {?eh,test_done,{'DEF','STOP_TIME'}}, {?eh,stop_logging,[]} + ]; + +test_events(require_no_ips) -> + [ + {?eh,start_logging,{'DEF','RUNDIR'}}, + {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, + {?eh,start_info,{1,1,13}}, + {?eh,tc_done,{group_require_2_SUITE,t1,ok}}, + + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g1,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g1,[]},ok}}, + {?eh,tc_done,{group_require_2_SUITE,t11,ok}}, + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g1,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g1,[]},ok}}], + + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g2,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g2,[]},ok}}, + {?eh,tc_done,{group_require_2_SUITE,t21,ok}}, + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g2,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g2,[]},ok}}], + + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g3,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g3,[]},ok}}, + {?eh,tc_done,{group_require_2_SUITE,t31,ok}}, + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g3,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g3,[]},ok}}], + + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g4,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g4,[]}, + {skipped,{require_failed,{name_in_use,common2_alias,common2}}}}}, + {?eh,tc_auto_skip,{group_require_2_SUITE,t41, + {require_failed,{name_in_use,common2_alias,common2}}}}, + {?eh,test_stats,{4,0,{0,1}}}, + {?eh,tc_auto_skip,{group_require_2_SUITE,end_per_group, + {require_failed,{name_in_use,common2_alias,common2}}}}], + + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g5,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g5,[]},ok}}, + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g6,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g6,[]},ok}}, + {?eh,tc_done,{group_require_2_SUITE,t61,ok}}, + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g6,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g6,[]},ok}}], + {?eh,tc_done,{group_require_2_SUITE,t51,ok}}, + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g7,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g7,[]},ok}}, + {?eh,tc_done,{group_require_2_SUITE,t71,ok}}, + {?eh,tc_done,{group_require_2_SUITE,t72,ok}}, + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g7,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g7,[]},ok}}], + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g5,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g5,[]},ok}}], + + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g8,[]}}}, + {?eh,tc_done,{group_require_2_SUITE, + {init_per_group,g8,[]}, + {skipped,{require_failed,{not_available,non_existing}}}}}, + {?eh,tc_auto_skip,{group_require_2_SUITE,t81, + {require_failed,{not_available,non_existing}}}}, + {?eh,test_stats,{8,0,{0,2}}}, + {?eh,tc_auto_skip,{group_require_2_SUITE,end_per_group, + {require_failed,{not_available,non_existing}}}}], + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g9,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g9,[]},ok}}, + {?eh,tc_done,{group_require_2_SUITE,t91, + {skipped,{require_failed,{not_available,non_existing}}}}}, + {?eh,test_stats,{8,0,{0,3}}}, + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g9,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g9,[]},ok}}], + + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g10,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g10,[]},ok}}, + {?eh,tc_done,{group_require_2_SUITE,t101,ok}}, + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g10,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g10,[]},ok}}], + + [{?eh,tc_start,{group_require_2_SUITE,{init_per_group,g11,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{init_per_group,g11,[]},ok}}, + {?eh,tc_done,{group_require_2_SUITE,t111,ok}}, + {?eh,test_stats,{10,0,{0,3}}}, + {?eh,tc_start,{group_require_2_SUITE,{end_per_group,g11,[]}}}, + {?eh,tc_done,{group_require_2_SUITE,{end_per_group,g11,[]},ok}}], + + {?eh,test_done,{'DEF','STOP_TIME'}}, + {?eh,stop_logging,[]} + ]; + +test_events(require_no_ipg) -> + [ + {?eh,start_logging,{'DEF','RUNDIR'}}, + {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}}, + {?eh,start_info,{1,1,13}}, + {?eh,tc_done,{group_require_3_SUITE,t1,ok}}, + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g1,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g1,[{suite,group_require_3_SUITE}]},ok}}, + {?eh,tc_done,{group_require_3_SUITE,t11,ok}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g1,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g1,[{suite,group_require_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g2,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g2,[{suite,group_require_3_SUITE}]},ok}}, + {?eh,tc_done,{group_require_3_SUITE,t21,ok}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g2,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g2,[{suite,group_require_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g3,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g3,[{suite,group_require_3_SUITE}]},ok}}, + {?eh,tc_done,{group_require_3_SUITE,t31,ok}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g3,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g3,[{suite,group_require_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g4,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g4,[{suite,group_require_3_SUITE}]}, + {skipped,{require_failed,{name_in_use,common2_alias,common2}}}}}, + {?eh,tc_auto_skip,{group_require_3_SUITE,t41, + {require_failed,{name_in_use,common2_alias,common2}}}}, + {?eh,test_stats,{4,0,{0,1}}}, + {?eh,tc_auto_skip,{ct_framework,ct_end_per_group, + {require_failed,{name_in_use,common2_alias,common2}}}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g5,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g5,[{suite,group_require_3_SUITE}]},ok}}, + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g6,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g6,[{suite,group_require_3_SUITE}]},ok}}, + {?eh,tc_done,{group_require_3_SUITE,t61,ok}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g6,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g6,[{suite,group_require_3_SUITE}]},ok}}], + {?eh,tc_done,{group_require_3_SUITE,t51,ok}}, + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g7,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g7,[{suite,group_require_3_SUITE}]},ok}}, + {?eh,tc_done,{group_require_3_SUITE,t71,ok}}, + {?eh,tc_done,{group_require_3_SUITE,t72,ok}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g7,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g7,[{suite,group_require_3_SUITE}]},ok}}], + {?eh,tc_start,{ct_framework,{ct_end_per_group,g5,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g5,[{suite,group_require_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g8,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g8,[{suite,group_require_3_SUITE}]}, + {skipped,{require_failed,{not_available,non_existing}}}}}, + {?eh,tc_auto_skip,{group_require_3_SUITE,t81, + {require_failed,{not_available,non_existing}}}}, + {?eh,test_stats,{8,0,{0,2}}}, + {?eh,tc_auto_skip,{ct_framework,ct_end_per_group, + {require_failed,{not_available,non_existing}}}}], + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g9,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g9,[{suite,group_require_3_SUITE}]},ok}}, + {?eh,tc_done,{group_require_3_SUITE,t91, + {skipped,{require_failed,{not_available,non_existing}}}}}, + {?eh,test_stats,{8,0,{0,3}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g9,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g9,[{suite,group_require_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g10,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g10,[{suite,group_require_3_SUITE}]},ok}}, + {?eh,tc_done,{group_require_3_SUITE,t101,ok}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g10,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g10,[{suite,group_require_3_SUITE}]},ok}}], + + [{?eh,tc_start,{ct_framework,{ct_init_per_group,g11,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_init_per_group,g11,[{suite,group_require_3_SUITE}]},ok}}, + {?eh,tc_done,{group_require_3_SUITE,t111,ok}}, + {?eh,test_stats,{10,0,{0,3}}}, + {?eh,tc_start,{ct_framework,{ct_end_per_group,g11,[{suite,group_require_3_SUITE}]}}}, + {?eh,tc_done,{ct_framework,{ct_end_per_group,g11,[{suite,group_require_3_SUITE}]},ok}}], + + {?eh,test_done,{'DEF','STOP_TIME'}}, + {?eh,stop_logging,[]} ]. + + diff --git a/lib/common_test/test/ct_group_info_SUITE_data/group_require_2_SUITE.erl b/lib/common_test/test/ct_group_info_SUITE_data/group_require_2_SUITE.erl new file mode 100644 index 0000000000..adb53ff564 --- /dev/null +++ b/lib/common_test/test/ct_group_info_SUITE_data/group_require_2_SUITE.erl @@ -0,0 +1,252 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +-module(group_require_2_SUITE). + +-compile(export_all). + +-include_lib("common_test/include/ct.hrl"). + + +%%%----------------------------------------------------------------- +%%% CONFIG FUNCS +%%%----------------------------------------------------------------- + +init_per_group(G, Config) -> + GrProps = proplists:get_value(tc_group_properties, Config), + _GrProps1 = proplists:delete(name, GrProps), + Info = case catch group(G) of {'EXIT',_} -> []; I -> I end, + ct:comment(io_lib:format("init( ~w ): ~p", [G, Info])), + if Info /= [] -> verify_cfg(G); true -> ok end, + Config. + +end_per_group(G, Config) -> + GrProps = proplists:get_value(tc_group_properties, Config), + _GrProps1 = proplists:delete(name, GrProps), + Info = case catch group(G) of {'EXIT',_} -> []; I -> I end, + ct:comment(io_lib:format("end( ~w )", [G])), + if Info /= [] -> verify_cfg(G); true -> ok end, + ok. + +init_per_testcase(t101, Config) -> + Config; +init_per_testcase(t111, Config) -> + Config; +init_per_testcase(TestCase, Config) -> + GrProps = proplists:get_value(tc_group_properties, Config), + GrProps1 = if GrProps == undefined -> []; true -> GrProps end, + verify_cfg(proplists:get_value(name, GrProps1)), + if TestCase == t72 -> verify_cfg(TestCase); true -> ok end, + Info = case catch apply(?MODULE,TestCase,[]) of + {'EXIT',_} -> []; + I -> I + end, + ct:comment(io_lib:format("init( ~w ): ~p", [TestCase, Info])), + Config. + +end_per_testcase(t101, Config) -> + ok; +end_per_testcase(t111, Config) -> + ok; +end_per_testcase(TestCase, Config) -> + GrProps = proplists:get_value(tc_group_properties, Config), + GrProps1 = if GrProps == undefined -> []; true -> GrProps end, + verify_cfg(proplists:get_value(name, GrProps1)), + if TestCase == t72 -> verify_cfg(TestCase); true -> ok end, + ok. + +verify_cfg(undefined) -> + ok; +verify_cfg(Name) -> + Key = list_to_atom(atom_to_list(Name) ++ "_cfg"), + Alias = list_to_atom(atom_to_list(Name) ++ "_cfg_alias"), + Val = list_to_atom(atom_to_list(Name) ++ "_cfg_val"), + ct:pal("Reading ~p & ~p. Expecting ~p.", [Key,Alias,Val]), + Val = ct:get_config(Key), + Val = ct:get_config(Alias), + suite_cfg_val = ct:get_config(suite_cfg), + suite_cfg_val = ct:get_config(suite_cfg_alias). + + + +%%%------------------------------------------------------------------ +%%% TEST DECLARATIONS +%%%------------------------------------------------------------------ + +groups() -> + [{g1,[],[t11]}, + {g2,[],[t21]}, + {g3,[],[t31]}, + {g4,[],[t41]}, + + {g5,[],[{group,g6},t51,{group,g7}]}, + + {g6,[],[t61]}, + {g7,[],[t71,t72]}, + + {g8,[],[t81]}, + {g9,[],[t91]}, + {g10,[],[t101]}, + {g11,[],[t111]} + ]. + + +all() -> + [t1, + {group,g1}, + {group,g2}, + {group,g3}, + {group,g4}, + {group,g5}, + {group,g8}, + {group,g9}, + {group,g10}, + {group,g11} + ]. + +%%%----------------------------------------------------------------- +%%% INFO FUNCS +%%%----------------------------------------------------------------- + +suite() -> [{require,suite_cfg}, + {require,suite_cfg_alias,suite_cfg}, + {require,common1}, + {default_config,suite_cfg,suite_cfg_val}, + {default_config,common1,common1_val}]. + +group(g1) -> [{require,g1_cfg}, + {require,g1_cfg_alias,g1_cfg}, + {default_config,g1_cfg,g1_cfg_val}]; + +group(g2) -> [{require,g2_cfg}, + {require,g2_cfg_alias,g2_cfg}, + {require,common1}, + {require,common2}, + {default_config,g2_cfg,g2_cfg_val}, + {default_config,common1,common1_val}, + {default_config,common2,common2_val}]; + +group(g3) -> [{require,g3_cfg}, + {require,g3_cfg_alias,g3_cfg}, + {require,common2}, + {require,common2_alias,common2}, + {default_config,g3_cfg,g3_cfg_val}, + {default_config,common2,common2_val}]; + +group(g4) -> [{require,g4_cfg}, + {require,g4_cfg_alias,g4_cfg}, + {require,common2_alias,common3}, + {default_config,g4_cfg,g4_cfg_val}]; + +group(g5) -> [{require,g5_cfg}, + {require,g5_cfg_alias,g5_cfg}, + {default_config,g5_cfg,g5_cfg_val}]; + +group(g6) -> [{require,g6_cfg}, + {require,g6_cfg_alias,g6_cfg}, + {default_config,g6_cfg,g6_cfg_val}]; + +group(g7) -> [{require,g7_cfg}, + {require,g7_cfg_alias,g7_cfg}, + {default_config,g7_cfg,g7_cfg_val}]; + +group(g8) -> [{require,non_existing}]; + +group(g9) -> [{require,g9_cfg}, + {require,g9_cfg_alias,g9_cfg}, + {default_config,g9_cfg,g9_cfg_val}]; + +group(G) when G /= g11 -> []. + +t72() -> [{require,t72_cfg}, + {require,t72_cfg_alias,t72_cfg}, + {default_config,t72_cfg,t72_cfg_val}]. + +t91() -> [{require,non_existing}]. + + +%%%------------------------------------------------------------------ +%%% TEST CASES +%%%------------------------------------------------------------------ + +t1(_) -> + suite_cfg_val = ct:get_config(suite_cfg). + +t11(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + suite_cfg_val = ct:get_config(suite_cfg_alias), + g1_cfg_val = ct:get_config(g1_cfg), + g1_cfg_val = ct:get_config(g1_cfg_alias). + +t21(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g2_cfg_val = ct:get_config(g2_cfg), + g2_cfg_val = ct:get_config(g2_cfg_alias), + common1_val = ct:get_config(common1), + common2_val = ct:get_config(common2). + +t31(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g3_cfg_val = ct:get_config(g3_cfg), + g3_cfg_val = ct:get_config(g3_cfg_alias), + common2_val = ct:get_config(common2), + common2_val = ct:get_config(common2_alias). + +t41(_) -> + exit(should_be_skipped). + +t51(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g5_cfg_val = ct:get_config(g5_cfg), + g5_cfg_val = ct:get_config(g5_cfg_alias). + +t61(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g5_cfg_val = ct:get_config(g5_cfg), + g5_cfg_val = ct:get_config(g5_cfg_alias), + g6_cfg_val = ct:get_config(g6_cfg), + g6_cfg_val = ct:get_config(g6_cfg_alias). + +t71(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g5_cfg_val = ct:get_config(g5_cfg), + g5_cfg_val = ct:get_config(g5_cfg_alias), + g7_cfg_val = ct:get_config(g7_cfg), + g7_cfg_val = ct:get_config(g7_cfg_alias). + +t72(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g5_cfg_val = ct:get_config(g5_cfg), + g5_cfg_val = ct:get_config(g5_cfg_alias), + g7_cfg_val = ct:get_config(g7_cfg), + g7_cfg_val = ct:get_config(g7_cfg_alias), + t72_cfg_val = ct:get_config(t72_cfg). + +t81(_) -> + exit(should_be_skipped). + +t91(_) -> + exit(should_be_skipped). + +t101(_) -> + suite_cfg_val = ct:get_config(suite_cfg). + +t111(_) -> + suite_cfg_val = ct:get_config(suite_cfg). + + diff --git a/lib/common_test/test/ct_group_info_SUITE_data/group_require_3_SUITE.erl b/lib/common_test/test/ct_group_info_SUITE_data/group_require_3_SUITE.erl new file mode 100644 index 0000000000..1f2dfd2a30 --- /dev/null +++ b/lib/common_test/test/ct_group_info_SUITE_data/group_require_3_SUITE.erl @@ -0,0 +1,241 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +-module(group_require_3_SUITE). + +-compile(export_all). + +-include_lib("common_test/include/ct.hrl"). + + +%%%----------------------------------------------------------------- +%%% CONFIG FUNCS +%%%----------------------------------------------------------------- + +%% init_per_suite(Config) -> +%% Config. +%% end_per_suite(_) -> +%% ok. + +init_per_testcase(t101, Config) -> + Config; +init_per_testcase(t111, Config) -> + Config; +init_per_testcase(TestCase, Config) -> + GrProps = proplists:get_value(tc_group_properties, Config), + GrProps1 = if GrProps == undefined -> []; true -> GrProps end, + verify_cfg(proplists:get_value(name, GrProps1)), + if TestCase == t72 -> verify_cfg(TestCase); true -> ok end, + Info = case catch apply(?MODULE,TestCase,[]) of + {'EXIT',_} -> []; + I -> I + end, + ct:comment(io_lib:format("init( ~w ): ~p", [TestCase, Info])), + Config. + +end_per_testcase(t101, _Config) -> + ok; +end_per_testcase(t111, _Config) -> + ok; +end_per_testcase(TestCase, Config) -> + GrProps = proplists:get_value(tc_group_properties, Config), + GrProps1 = if GrProps == undefined -> []; true -> GrProps end, + verify_cfg(proplists:get_value(name, GrProps1)), + if TestCase == t72 -> verify_cfg(TestCase); true -> ok end, + ok. + +verify_cfg(undefined) -> + ok; +verify_cfg(Name) -> + Key = list_to_atom(atom_to_list(Name) ++ "_cfg"), + Alias = list_to_atom(atom_to_list(Name) ++ "_cfg_alias"), + Val = list_to_atom(atom_to_list(Name) ++ "_cfg_val"), + ct:pal("Reading ~p & ~p. Expecting ~p.", [Key,Alias,Val]), + Val = ct:get_config(Key), + Val = ct:get_config(Alias), + suite_cfg_val = ct:get_config(suite_cfg), + suite_cfg_val = ct:get_config(suite_cfg_alias). + + + +%%%------------------------------------------------------------------ +%%% TEST DECLARATIONS +%%%------------------------------------------------------------------ + +groups() -> + [{g1,[],[t11]}, + {g2,[],[t21]}, + {g3,[],[t31]}, + {g4,[],[t41]}, + + {g5,[],[{group,g6},t51,{group,g7}]}, + + {g6,[],[t61]}, + {g7,[],[t71,t72]}, + + {g8,[],[t81]}, + {g9,[],[t91]}, + {g10,[],[t101]}, + {g11,[],[t111]} + ]. + + +all() -> + [t1, + {group,g1}, + {group,g2}, + {group,g3}, + {group,g4}, + {group,g5}, + {group,g8}, + {group,g9}, + {group,g10}, + {group,g11} + ]. + +%%%----------------------------------------------------------------- +%%% INFO FUNCS +%%%----------------------------------------------------------------- + +suite() -> [{require,suite_cfg}, + {require,suite_cfg_alias,suite_cfg}, + {require,common1}, + {default_config,suite_cfg,suite_cfg_val}, + {default_config,common1,common1_val}]. + +group(g1) -> [{require,g1_cfg}, + {require,g1_cfg_alias,g1_cfg}, + {default_config,g1_cfg,g1_cfg_val}]; + +group(g2) -> [{require,g2_cfg}, + {require,g2_cfg_alias,g2_cfg}, + {require,common1}, + {require,common2}, + {default_config,g2_cfg,g2_cfg_val}, + {default_config,common1,common1_val}, + {default_config,common2,common2_val}]; + +group(g3) -> [{require,g3_cfg}, + {require,g3_cfg_alias,g3_cfg}, + {require,common2}, + {require,common2_alias,common2}, + {default_config,g3_cfg,g3_cfg_val}, + {default_config,common2,common2_val}]; + +group(g4) -> [{require,g4_cfg}, + {require,g4_cfg_alias,g4_cfg}, + {require,common2_alias,common3}, + {default_config,g4_cfg,g4_cfg_val}]; + +group(g5) -> [{require,g5_cfg}, + {require,g5_cfg_alias,g5_cfg}, + {default_config,g5_cfg,g5_cfg_val}]; + +group(g6) -> [{require,g6_cfg}, + {require,g6_cfg_alias,g6_cfg}, + {default_config,g6_cfg,g6_cfg_val}]; + +group(g7) -> [{require,g7_cfg}, + {require,g7_cfg_alias,g7_cfg}, + {default_config,g7_cfg,g7_cfg_val}]; + +group(g8) -> [{require,non_existing}]; + +group(g9) -> [{require,g9_cfg}, + {require,g9_cfg_alias,g9_cfg}, + {default_config,g9_cfg,g9_cfg_val}]; + +group(G) when G /= g11 -> []. + +t72() -> [{require,t72_cfg}, + {require,t72_cfg_alias,t72_cfg}, + {default_config,t72_cfg,t72_cfg_val}]. + +t91() -> [{require,non_existing}]. + + +%%%------------------------------------------------------------------ +%%% TEST CASES +%%%------------------------------------------------------------------ + +t1(_) -> + suite_cfg_val = ct:get_config(suite_cfg). + +t11(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + suite_cfg_val = ct:get_config(suite_cfg_alias), + g1_cfg_val = ct:get_config(g1_cfg), + g1_cfg_val = ct:get_config(g1_cfg_alias). + +t21(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g2_cfg_val = ct:get_config(g2_cfg), + g2_cfg_val = ct:get_config(g2_cfg_alias), + common1_val = ct:get_config(common1), + common2_val = ct:get_config(common2). + +t31(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g3_cfg_val = ct:get_config(g3_cfg), + g3_cfg_val = ct:get_config(g3_cfg_alias), + common2_val = ct:get_config(common2), + common2_val = ct:get_config(common2_alias). + +t41(_) -> + exit(should_be_skipped). + +t51(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g5_cfg_val = ct:get_config(g5_cfg), + g5_cfg_val = ct:get_config(g5_cfg_alias). + +t61(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g5_cfg_val = ct:get_config(g5_cfg), + g5_cfg_val = ct:get_config(g5_cfg_alias), + g6_cfg_val = ct:get_config(g6_cfg), + g6_cfg_val = ct:get_config(g6_cfg_alias). + +t71(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g5_cfg_val = ct:get_config(g5_cfg), + g5_cfg_val = ct:get_config(g5_cfg_alias), + g7_cfg_val = ct:get_config(g7_cfg), + g7_cfg_val = ct:get_config(g7_cfg_alias). + +t72(_) -> + suite_cfg_val = ct:get_config(suite_cfg), + g5_cfg_val = ct:get_config(g5_cfg), + g5_cfg_val = ct:get_config(g5_cfg_alias), + g7_cfg_val = ct:get_config(g7_cfg), + g7_cfg_val = ct:get_config(g7_cfg_alias), + t72_cfg_val = ct:get_config(t72_cfg). + +t81(_) -> + exit(should_be_skipped). + +t91(_) -> + exit(should_be_skipped). + +t101(_) -> + suite_cfg_val = ct:get_config(suite_cfg). + +t111(_) -> + suite_cfg_val = ct:get_config(suite_cfg). + + diff --git a/lib/common_test/test/ct_group_info_SUITE_data/group_timetrap_2_SUITE.erl b/lib/common_test/test/ct_group_info_SUITE_data/group_timetrap_2_SUITE.erl new file mode 100644 index 0000000000..1ebe8bd510 --- /dev/null +++ b/lib/common_test/test/ct_group_info_SUITE_data/group_timetrap_2_SUITE.erl @@ -0,0 +1,184 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +-module(group_timetrap_2_SUITE). + +-compile(export_all). + +-include_lib("common_test/include/ct.hrl"). + + +%%%----------------------------------------------------------------- +%%% CONFIG FUNCS +%%%----------------------------------------------------------------- + +init_per_group(G, Config) -> + GrProps = proplists:get_value(tc_group_properties, Config), + _GrProps1 = proplists:delete(name, GrProps), + Info = case catch group(G) of {'EXIT',_} -> []; I -> I end, + ct:comment(io_lib:format("init( ~w ): ~p", [G, Info])), + Config. + +end_per_group(G, Config) -> + GrProps = proplists:get_value(tc_group_properties, Config), + _GrProps1 = proplists:delete(name, GrProps), + ct:comment(io_lib:format("end( ~w )", [G])), + ok. + +init_per_testcase(TestCase, Config) -> + Info = case catch apply(?MODULE,TestCase,[]) of + {'EXIT',_} -> []; + I -> I + end, + ct:comment(io_lib:format("init( ~w ): ~p", [TestCase, Info])), + Config. + +end_per_testcase(_TestCase, _Config) -> + ok. + +%%%------------------------------------------------------------------ +%%% TEST DECLARATIONS +%%%------------------------------------------------------------------ + +groups() -> + [{g1,[],[t11]}, + {g2,[],[t21]}, + {g3,[],[{group,g4},t31,{group,g5}]}, + + {g4,[],[t41]}, + {g5,[],[t51]}, + + {g6,[],[t61]}, + {g7,[],[{group,g8},t71,{group,g9}]}, + + {g8,[],[t81]}, + {g9,[],[t91]}, + + {g10,[],[t101]}, + {g11,[],[t111]} + ]. + + +all() -> + [t1, + {group,g1}, + {group,g2}, + t2, + {group,g3}, + t3, + {group,g6}, + {group,g7}, + {group,g10}, + {group,g11} + ]. + +%%%----------------------------------------------------------------- +%%% INFO FUNCS +%%%----------------------------------------------------------------- + +suite() -> [{timetrap,1000}]. + +group(g1) -> [{timetrap,500}]; + +group(g2) -> [{timetrap,1500}]; + +group(g3) -> [{timetrap,500}]; + +group(g4) -> [{timetrap,250}]; + +group(g5) -> [{timetrap,1500}]; + +group(g6) -> [{timetrap,250}]; + +group(g7) -> [{timetrap,250}]; + +group(g8) -> [{timetrap,250}]; + +group(G) when G /= g11 -> []. + +t3() -> [{timetrap,250}]. + +t61() -> [{timetrap,500}]. + +t71() -> [{timetrap,500}]. + +t81() -> [{timetrap,750}]. + +t91() -> [{timetrap,250}]. + +%%%------------------------------------------------------------------ +%%% TEST CASES +%%%------------------------------------------------------------------ + +t1(_) -> + ct:sleep(3000), + exit(should_timeout). + +t11(_) -> + ct:sleep(750), + exit(should_timeout). + +t21(_) -> + ct:sleep(3000), + exit(should_timeout). + +t2(_) -> + ct:sleep(1250), + exit(should_timeout). + +t31(_) -> + ct:sleep(750), + exit(should_timeout). + +t41(_) -> + ct:sleep(350), + exit(should_timeout). + +t51(_) -> + ct:sleep(2000), + exit(should_timeout). + +t3(_) -> + ct:sleep(500), + exit(should_timeout). + +t61(_) -> + ct:sleep(750), + exit(should_timeout). + +t71(_) -> + ct:sleep(750), + exit(should_timeout). + +t81(_) -> + ct:sleep(1000), + exit(should_timeout). + +t91(_) -> + ct:sleep(350), + exit(should_timeout). + +t101(_) -> + ct:sleep(1500), + exit(should_timeout). + +t111(_) -> + ct:sleep(1500), + exit(should_timeout). + + diff --git a/lib/common_test/test/ct_group_info_SUITE_data/group_timetrap_3_SUITE.erl b/lib/common_test/test/ct_group_info_SUITE_data/group_timetrap_3_SUITE.erl new file mode 100644 index 0000000000..66d29802e2 --- /dev/null +++ b/lib/common_test/test/ct_group_info_SUITE_data/group_timetrap_3_SUITE.erl @@ -0,0 +1,171 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +-module(group_timetrap_3_SUITE). + +-compile(export_all). + +-include_lib("common_test/include/ct.hrl"). + + +%%%----------------------------------------------------------------- +%%% CONFIG FUNCS +%%%----------------------------------------------------------------- + +init_per_testcase(TestCase, Config) -> + Info = case catch apply(?MODULE,TestCase,[]) of + {'EXIT',_} -> []; + I -> I + end, + ct:comment(io_lib:format("init( ~w ): ~p", [TestCase, Info])), + Config. + +end_per_testcase(_TestCase, _Config) -> + ok. + +%%%------------------------------------------------------------------ +%%% TEST DECLARATIONS +%%%------------------------------------------------------------------ + +groups() -> + [{g1,[],[t11]}, + {g2,[],[t21]}, + {g3,[],[{group,g4},t31,{group,g5}]}, + + {g4,[],[t41]}, + {g5,[],[t51]}, + + {g6,[],[t61]}, + {g7,[],[{group,g8},t71,{group,g9}]}, + + {g8,[],[t81]}, + {g9,[],[t91]}, + + {g10,[],[t101]}, + {g11,[],[t111]} + ]. + + +all() -> + [t1, + {group,g1}, + {group,g2}, + t2, + {group,g3}, + t3, + {group,g6}, + {group,g7}, + {group,g10}, + {group,g11} + ]. + +%%%----------------------------------------------------------------- +%%% INFO FUNCS +%%%----------------------------------------------------------------- + +suite() -> [{timetrap,1000}]. + +group(g1) -> [{timetrap,500}]; + +group(g2) -> [{timetrap,1500}]; + +group(g3) -> [{timetrap,500}]; + +group(g4) -> [{timetrap,250}]; + +group(g5) -> [{timetrap,1500}]; + +group(g6) -> [{timetrap,250}]; + +group(g7) -> [{timetrap,250}]; + +group(g8) -> [{timetrap,250}]; + +group(G) when G /= g11 -> []. + +t3() -> [{timetrap,250}]. + +t61() -> [{timetrap,500}]. + +t71() -> [{timetrap,500}]. + +t81() -> [{timetrap,750}]. + +t91() -> [{timetrap,250}]. + +%%%------------------------------------------------------------------ +%%% TEST CASES +%%%------------------------------------------------------------------ + +t1(_) -> + ct:sleep(3000), + exit(should_timeout). + +t11(_) -> + ct:sleep(750), + exit(should_timeout). + +t21(_) -> + ct:sleep(3000), + exit(should_timeout). + +t2(_) -> + ct:sleep(1250), + exit(should_timeout). + +t31(_) -> + ct:sleep(750), + exit(should_timeout). + +t41(_) -> + ct:sleep(350), + exit(should_timeout). + +t51(_) -> + ct:sleep(2000), + exit(should_timeout). + +t3(_) -> + ct:sleep(500), + exit(should_timeout). + +t61(_) -> + ct:sleep(750), + exit(should_timeout). + +t71(_) -> + ct:sleep(750), + exit(should_timeout). + +t81(_) -> + ct:sleep(1000), + exit(should_timeout). + +t91(_) -> + ct:sleep(350), + exit(should_timeout). + +t101(_) -> + ct:sleep(1500), + exit(should_timeout). + +t111(_) -> + ct:sleep(1500), + exit(should_timeout). + + diff --git a/lib/common_test/test/ct_repeat_1_SUITE_data/repeat_1_SUITE.erl b/lib/common_test/test/ct_repeat_1_SUITE_data/repeat_1_SUITE.erl index fb8d31edd4..4c5b880e39 100644 --- a/lib/common_test/test/ct_repeat_1_SUITE_data/repeat_1_SUITE.erl +++ b/lib/common_test/test/ct_repeat_1_SUITE_data/repeat_1_SUITE.erl @@ -1,11 +1,21 @@ -%%%------------------------------------------------------------------- -%%% @author Peter Andersson <[email protected]> -%%% @copyright (C) 2010, Peter Andersson -%%% @doc -%%% -%%% @end -%%% Created : 11 Aug 2010 by Peter Andersson <[email protected]> -%%%------------------------------------------------------------------- +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2009-2011. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% -module(repeat_1_SUITE). -compile(export_all). |