diff options
Diffstat (limited to 'lib/compiler')
-rw-r--r-- | lib/compiler/test/beam_validator_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/compiler/test/bs_construct_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/compiler/test/bs_match_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/compiler/test/compilation_SUITE.erl | 32 | ||||
-rw-r--r-- | lib/compiler/test/compile_SUITE.erl | 23 | ||||
-rw-r--r-- | lib/compiler/test/core_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/compiler/test/inline_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/compiler/test/lc_SUITE.erl | 9 | ||||
-rw-r--r-- | lib/compiler/test/misc_SUITE.erl | 14 | ||||
-rw-r--r-- | lib/compiler/test/receive_SUITE.erl | 11 | ||||
-rw-r--r-- | lib/compiler/test/record_SUITE.erl | 11 | ||||
-rw-r--r-- | lib/compiler/test/regressions_SUITE.erl | 17 | ||||
-rw-r--r-- | lib/compiler/test/warnings_SUITE.erl | 14 |
13 files changed, 66 insertions, 110 deletions
diff --git a/lib/compiler/test/beam_validator_SUITE.erl b/lib/compiler/test/beam_validator_SUITE.erl index cb217e4655..e759a75ede 100644 --- a/lib/compiler/test/beam_validator_SUITE.erl +++ b/lib/compiler/test/beam_validator_SUITE.erl @@ -37,15 +37,14 @@ -include_lib("common_test/include/ct.hrl"). init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = test_server:timetrap(?t:minutes(10)), - [{watchdog,Dog}|Config]. + Config. end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = ?config(watchdog, Config), - ?t:timetrap_cancel(Dog), ok. -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,10}}]. all() -> test_lib:recompile(?MODULE), diff --git a/lib/compiler/test/bs_construct_SUITE.erl b/lib/compiler/test/bs_construct_SUITE.erl index caf204032c..811cb42bd9 100644 --- a/lib/compiler/test/bs_construct_SUITE.erl +++ b/lib/compiler/test/bs_construct_SUITE.erl @@ -33,7 +33,9 @@ -include_lib("common_test/include/ct.hrl"). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,1}}]. all() -> test_lib:recompile(?MODULE), @@ -60,12 +62,9 @@ end_per_group(_GroupName, Config) -> init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = test_server:timetrap(?t:minutes(1)), - [{watchdog,Dog}|Config]. + Config. end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = ?config(watchdog, Config), - ?t:timetrap_cancel(Dog), ok. two(Config) when is_list(Config) -> diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl index 99539f3779..01e0cbb5f3 100644 --- a/lib/compiler/test/bs_match_SUITE.erl +++ b/lib/compiler/test/bs_match_SUITE.erl @@ -44,7 +44,9 @@ -include_lib("common_test/include/ct.hrl"). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,1}}]. all() -> test_lib:recompile(?MODULE), @@ -81,12 +83,9 @@ end_per_group(_GroupName, Config) -> init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = test_server:timetrap(?t:minutes(1)), - [{watchdog,Dog}|Config]. + Config. end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = ?config(watchdog, Config), - ?t:timetrap_cancel(Dog), ok. fun_shadow(Config) when is_list(Config) -> diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl index 6bff5e55f2..68bc3d9985 100644 --- a/lib/compiler/test/compilation_SUITE.erl +++ b/lib/compiler/test/compilation_SUITE.erl @@ -24,7 +24,9 @@ -compile(export_all). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,10}}]. all() -> test_lib:recompile(?MODULE), @@ -234,8 +236,11 @@ check_error_1(Str0) -> try_it(Module, Conf) -> %% Change 'false' to 'true' to start a new node for every module. try_it(false, Module, Conf). - + try_it(StartNode, Module, Conf) -> + try_it(StartNode, Module, {minutes,10}, Conf). + +try_it(StartNode, Module, Timetrap, Conf) -> ?line OtherOpts = [], %Can be changed to [time] if needed ?line Src = filename:join(?config(data_dir, Conf), atom_to_list(Module)), ?line Out = ?config(priv_dir,Conf), @@ -245,7 +250,6 @@ try_it(StartNode, Module, Conf) -> ?line io:format("Result: ~p\n",[CompRc0]), ?line {ok,_Mod} = CompRc0, - ?line Dog = test_server:timetrap(test_server:minutes(10)), Node = case StartNode of false -> node(); @@ -257,9 +261,8 @@ try_it(StartNode, Module, Conf) -> ?line ok = rpc:call(Node, ?MODULE, load_and_call, [Out, Module]), ?line load_and_call(Out, Module), - ?line test_server:timetrap_cancel(Dog), - ?line NewDog = test_server:timetrap(test_server:minutes(10)), + ct:timetrap(Timetrap), ?line io:format("Compiling (without optimization): ~s\n", [Src]), ?line CompRc1 = compile:file(Src, [no_copt,no_postopt,{outdir,Out},report|OtherOpts]), @@ -267,18 +270,16 @@ try_it(StartNode, Module, Conf) -> ?line io:format("Result: ~p\n",[CompRc1]), ?line {ok,_Mod} = CompRc1, ?line ok = rpc:call(Node, ?MODULE, load_and_call, [Out, Module]), - ?line test_server:timetrap_cancel(NewDog), - ?line LastDog = test_server:timetrap(test_server:minutes(10)), + ct:timetrap(Timetrap), ?line io:format("Compiling (with old inliner): ~s\n", [Src]), ?line CompRc2 = compile:file(Src, [{outdir,Out},report,bin_opt_info, {inline,1000}|OtherOpts]), ?line io:format("Result: ~p\n",[CompRc2]), ?line {ok,_Mod} = CompRc2, ?line ok = rpc:call(Node, ?MODULE, load_and_call, [Out, Module]), - ?line test_server:timetrap_cancel(LastDog), - AsmDog = test_server:timetrap(test_server:minutes(10)), + ct:timetrap(Timetrap), io:format("Compiling (from assembly): ~s\n", [Src]), {ok,_} = compile:file(Src, [to_asm,{outdir,Out},report|OtherOpts]), Asm = filename:join(Out, lists:concat([Module, ".S"])), @@ -286,13 +287,11 @@ try_it(StartNode, Module, Conf) -> io:format("Result: ~p\n",[CompRc3]), {ok,_} = CompRc3, ok = rpc:call(Node, ?MODULE, load_and_call, [Out, Module]), - test_server:timetrap_cancel(AsmDog), case StartNode of false -> ok; true -> ?line test_server:stop_node(Node) end, - ?line test_server:timetrap_cancel(LastDog), ok. load_and_call(Out, Module) -> @@ -404,9 +403,7 @@ get_vsn(M) -> long_string(Config) when is_list(Config) -> %% The test must complete in one minute - it should be plenty of time. - ?line Dog = test_server:timetrap(test_server:minutes(1)), - ?line try_it(long_string, Config), - ?line test_server:timetrap_cancel(Dog), + try_it(false, long_string, {minutes,1}, Config), ok. compile_load(Module, Dir, Conf) -> @@ -428,7 +425,7 @@ self_compile_old_inliner(Config) when is_list(Config) -> self_compile_1(Config, "old", [verbose,{inline,500}]). self_compile_1(Config, Prefix, Opts) -> - Dog = test_server:timetrap(test_server:minutes(40)), + ct:timetrap({minutes,40}), Priv = ?config(priv_dir,Config), Version = compiler_version(), @@ -449,11 +446,10 @@ self_compile_1(Config, Prefix, Opts) -> %% be equal (except for beam_asm that contains the compiler version). compare_compilers(CompA, CompB), - test_server:timetrap_cancel(Dog), ok. self_compile_node(CompilerDir, OutDir, Version, Opts) -> - Dog = test_server:timetrap(test_server:minutes(15)), + ct:timetrap({minutes,15}), Pa = "-pa " ++ filename:dirname(code:which(?MODULE)) ++ " -pa " ++ CompilerDir, Files = compiler_src(), @@ -466,7 +462,7 @@ self_compile_node(CompilerDir, OutDir, Version, Opts) -> fun() -> compile_compiler(Files, OutDir, Version, Opts) end, Pa), - test_server:timetrap_cancel(Dog), + ok. compile_compiler(Files, OutDir, Version, InlineOpts) -> diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl index c69e0ac408..d2f6a983aa 100644 --- a/lib/compiler/test/compile_SUITE.erl +++ b/lib/compiler/test/compile_SUITE.erl @@ -81,8 +81,6 @@ appup_test(Config) when is_list(Config) -> %% using compile:file/1. file_1(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:minutes(5)), - process_flag(trap_exit, true), {Simple, Target} = get_files(Config, simple, "file_1"), @@ -122,7 +120,6 @@ file_1(Config) when is_list(Config) -> ok end, - ?line test_server:timetrap_cancel(Dog), ok. forms_2(Config) when is_list(Config) -> @@ -159,7 +156,6 @@ module_mismatch(Config) when is_list(Config) -> ok. big_file(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:minutes(5)), {Big,Target} = get_files(Config, big, "big_file"), ok = file:set_cwd(filename:dirname(Target)), ?line compile_and_verify(Big, Target, []), @@ -168,26 +164,22 @@ big_file(Config) when is_list(Config) -> %% Cleanup. ?line ok = file:delete(Target), - ?line test_server:timetrap_cancel(Dog), ok. %% Tests that the {outdir, Dir} option works. outdir(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:seconds(60)), {Simple, Target} = get_files(Config, simple, "outdir"), ?line {ok, simple} = compile:file(Simple, [{outdir, filename:dirname(Target)}]), ?line true = exists(Target), ?line passed = run(Target, test, []), ?line ok = file:delete(Target), ?line ok = file:del_dir(filename:dirname(Target)), - ?line test_server:timetrap_cancel(Dog), ok. %% Tests that the binary option works. binary(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:seconds(60)), {Simple, Target} = get_files(Config, simple, "binary"), ?line {ok, simple, Binary} = compile:file(Simple, [binary]), ?line code:load_binary(simple, Target, Binary), @@ -195,13 +187,11 @@ binary(Config) when is_list(Config) -> ?line true = code:delete(simple), ?line false = code:purge(simple), ?line ok = file:del_dir(filename:dirname(Target)), - ?line test_server:timetrap_cancel(Dog), ok. %% Tests that the dependencies-Makefile-related options work. makedep(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:seconds(60)), {Simple,Target} = get_files(Config, simple, "makedep"), ?line DataDir = ?config(data_dir, Config), ?line SimpleRootname = filename:rootname(Simple), @@ -257,7 +247,6 @@ makedep(Config) when is_list(Config) -> ?line ok = file:delete(Target), ?line ok = file:del_dir(filename:dirname(Target)), - ?line test_server:timetrap_cancel(Dog), ok. makedep_canonicalize_result(Mf, DataDir) -> @@ -277,7 +266,6 @@ makedep_modify_target(Mf, Target) -> %% Tests that conditional compilation, defining values, including files work. cond_and_ifdef(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:seconds(60)), {Simple, Target} = get_files(Config, simple, "cond_and_ifdef"), ?line IncludeDir = filename:join(filename:dirname(Simple), "include"), ?line Options = [{outdir, filename:dirname(Target)}, @@ -288,11 +276,9 @@ cond_and_ifdef(Config) when is_list(Config) -> ?line {hiker, 42} = run(Target, foo, []), ?line ok = file:delete(Target), ?line ok = file:del_dir(filename:dirname(Target)), - ?line test_server:timetrap_cancel(Dog), ok. listings(Config) when is_list(Config) -> - Dog = test_server:timetrap(test_server:minutes(8)), DataDir = ?config(data_dir, Config), PrivDir = ?config(priv_dir, Config), ok = do_file_listings(DataDir, PrivDir, [ @@ -300,7 +286,6 @@ listings(Config) when is_list(Config) -> "small", "small_maps" ]), - test_server:timetrap_cancel(Dog), ok. do_file_listings(_, _, []) -> ok; @@ -357,7 +342,6 @@ do_file_listings(DataDir, PrivDir, [File|Files]) -> do_file_listings(DataDir,PrivDir,Files). listings_big(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:minutes(10)), {Big,Target} = get_files(Config, big, listings_big), TargetDir = filename:dirname(Target), ?line do_listing(Big, TargetDir, 'S'), @@ -373,11 +357,9 @@ listings_big(Config) when is_list(Config) -> ?line lists:foreach(fun(F) -> ok = file:delete(F) end, filelib:wildcard(filename:join(TargetDir, "*"))), ?line ok = file:del_dir(TargetDir), - ?line test_server:timetrap_cancel(Dog), ok. other_output(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:minutes(8)), {Simple,_Target} = get_files(Config, simple, "other_output"), io:put_chars("to_pp"), @@ -418,11 +400,9 @@ other_output(Config) when is_list(Config) -> io:put_chars("to_asm (forms)"), ?line {ok,simple,Asm} = compile:forms(PP, [to_asm,binary,time]), - ?line test_server:timetrap_cancel(Dog), ok. encrypted_abstr(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:minutes(10)), {Simple,Target} = get_files(Config, simple, "encrypted_abstr"), Res = case has_crypto() of @@ -452,7 +432,6 @@ encrypted_abstr(Config) when is_list(Config) -> end, %% Cleanup. - ?line test_server:timetrap_cancel(Dog), Res. encrypted_abstr_1(Simple, Target) -> @@ -786,7 +765,6 @@ compile_forms(Forms, Opts) -> %% run .S through the compiler again. asm(Config) when is_list(Config) -> - ?line Dog = test_server:timetrap(test_server:minutes(20)), ?line PrivDir = ?config(priv_dir, Config), ?line Outdir = filename:join(PrivDir, "asm"), ?line ok = file:make_dir(Outdir), @@ -794,7 +772,6 @@ asm(Config) when is_list(Config) -> ?line Wc = filename:join(filename:dirname(code:which(?MODULE)), "*.beam"), ?line TestBeams = filelib:wildcard(Wc), ?line Res = test_lib:p_run(fun(F) -> do_asm(F, Outdir) end, TestBeams), - ?line test_server:timetrap_cancel(Dog), Res. diff --git a/lib/compiler/test/core_SUITE.erl b/lib/compiler/test/core_SUITE.erl index ddc4c7af5e..3f8bb91e51 100644 --- a/lib/compiler/test/core_SUITE.erl +++ b/lib/compiler/test/core_SUITE.erl @@ -35,15 +35,14 @@ N(Config) when is_list(Config) -> try_it(N, Config)). init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = test_server:timetrap(?t:minutes(5)), - [{watchdog,Dog}|Config]. + Config. end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = ?config(watchdog, Config), - ?t:timetrap_cancel(Dog), ok. -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,5}}]. all() -> test_lib:recompile(?MODULE), diff --git a/lib/compiler/test/inline_SUITE.erl b/lib/compiler/test/inline_SUITE.erl index f28e1e5a25..77a58dff34 100644 --- a/lib/compiler/test/inline_SUITE.erl +++ b/lib/compiler/test/inline_SUITE.erl @@ -97,9 +97,8 @@ try_inline(Mod, Config) -> ?line io:format("Compiling: ~s\n", [Src]), ?line {ok,Mod} = compile:file(Src, [{outdir,Out},report,bin_opt_info,clint]), - ?line Dog = test_server:timetrap(test_server:minutes(10)), + ct:timetrap({minutes,10}), ?line NormalResult = rpc:call(Node, ?MODULE, load_and_call, [Out,Mod]), - ?line test_server:timetrap_cancel(Dog), %% Inlining. ?line io:format("Compiling with old inliner: ~s\n", [Src]), @@ -107,9 +106,8 @@ try_inline(Mod, Config) -> {inline,1000},clint]), %% Run inlined code. - ?line Dog3 = test_server:timetrap(test_server:minutes(10)), + ct:timetrap({minutes,10}), ?line OldInlinedResult = rpc:call(Node, ?MODULE, load_and_call, [Out,Mod]), - ?line test_server:timetrap_cancel(Dog3), %% Compare results. ?line compare(NormalResult, OldInlinedResult), @@ -121,9 +119,8 @@ try_inline(Mod, Config) -> bin_opt_info,inline,clint]), %% Run inlined code. - ?line Dog4 = test_server:timetrap(test_server:minutes(10)), + ct:timetrap({minutes,10}), ?line InlinedResult = rpc:call(Node, ?MODULE, load_and_call, [Out,Mod]), - ?line test_server:timetrap_cancel(Dog4), %% Compare results. ?line compare(NormalResult, InlinedResult), diff --git a/lib/compiler/test/lc_SUITE.erl b/lib/compiler/test/lc_SUITE.erl index 43e23f3b46..1de4fe95c6 100644 --- a/lib/compiler/test/lc_SUITE.erl +++ b/lib/compiler/test/lc_SUITE.erl @@ -28,7 +28,9 @@ -include_lib("common_test/include/ct.hrl"). -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,1}}]. all() -> test_lib:recompile(?MODULE), @@ -59,12 +61,9 @@ end_per_group(_GroupName, Config) -> init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = test_server:timetrap(?t:minutes(1)), - [{watchdog,Dog}|Config]. + Config. end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = ?config(watchdog, Config), - ?t:timetrap_cancel(Dog), ok. basic(Config) when is_list(Config) -> diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl index 9c65151685..9c027bdc6b 100644 --- a/lib/compiler/test/misc_SUITE.erl +++ b/lib/compiler/test/misc_SUITE.erl @@ -49,15 +49,14 @@ -opaque misc_SUITE_test_cases() :: [atom()]. init_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = test_server:timetrap(?t:minutes(10)), - [{watchdog,Dog}|Config]. + Config. end_per_testcase(Case, Config) when is_atom(Case), is_list(Config) -> - Dog = ?config(watchdog, Config), - ?t:timetrap_cancel(Dog), ok. -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,10}}]. -spec all() -> misc_SUITE_test_cases(). all() -> @@ -332,6 +331,9 @@ confused_literals(Config) when is_list(Config) -> confused_literals_1(int) -> {0,infinity}; confused_literals_1(float) -> {0.0,infinity}. +integer_encoding() -> + [{timetrap,{minutes,4}}]. + integer_encoding(Config) when is_list(Config) -> case ?MODULE of misc_SUITE -> integer_encoding_1(Config); @@ -339,7 +341,6 @@ integer_encoding(Config) when is_list(Config) -> end. integer_encoding_1(Config) -> - Dog = test_server:timetrap(?t:minutes(4)), ?line PrivDir = ?config(priv_dir, Config), ?line SrcFile = filename:join(PrivDir, "misc_SUITE_integer_encoding.erl"), ?line DataFile = filename:join(PrivDir, "integer_encoding.data"), @@ -384,7 +385,6 @@ integer_encoding_1(Config) -> %% Cleanup. ?line file:delete(SrcFile), ?line file:delete(DataFile), - ?t:timetrap_cancel(Dog), ok. do_integer_encoding(0, _, _, _) -> ok; diff --git a/lib/compiler/test/receive_SUITE.erl b/lib/compiler/test/receive_SUITE.erl index fef29ab06d..df5df68015 100644 --- a/lib/compiler/test/receive_SUITE.erl +++ b/lib/compiler/test/receive_SUITE.erl @@ -30,15 +30,14 @@ -include_lib("common_test/include/ct.hrl"). init_per_testcase(_Case, Config) -> - ?line Dog = test_server:timetrap(test_server:minutes(2)), - [{watchdog, Dog}|Config]. + Config. -end_per_testcase(_Case, Config) -> - Dog=?config(watchdog, Config), - test_server:timetrap_cancel(Dog), +end_per_testcase(_Case, _Config) -> ok. -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,2}}]. all() -> test_lib:recompile(?MODULE), diff --git a/lib/compiler/test/record_SUITE.erl b/lib/compiler/test/record_SUITE.erl index 48a2a9f5df..9f5d09216e 100644 --- a/lib/compiler/test/record_SUITE.erl +++ b/lib/compiler/test/record_SUITE.erl @@ -31,15 +31,14 @@ nested_access/1,coverage/1]). init_per_testcase(_Case, Config) -> - ?line Dog = test_server:timetrap(test_server:minutes(2)), - [{watchdog,Dog}|Config]. + Config. -end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), - test_server:timetrap_cancel(Dog), +end_per_testcase(_Case, _Config) -> ok. -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,2}}]. all() -> test_lib:recompile(?MODULE), diff --git a/lib/compiler/test/regressions_SUITE.erl b/lib/compiler/test/regressions_SUITE.erl index a8caa34c60..0131a2bdbd 100644 --- a/lib/compiler/test/regressions_SUITE.erl +++ b/lib/compiler/test/regressions_SUITE.erl @@ -21,26 +21,23 @@ -module(regressions_SUITE). -include_lib("common_test/include/ct.hrl"). --export([all/0, groups/0, init_per_testcase/2,end_per_testcase/2]). - +-export([all/0,groups/0,init_per_testcase/2,end_per_testcase/2,suite/0]). -export([maps/1]). groups() -> [{p,test_lib:parallel(), [maps]}]. -% Default timetrap timeout (set in init_per_testcase). --define(default_timeout, ?t:minutes(2)). - init_per_testcase(_Case, Config) -> - ?line Dog = ?t:timetrap(?default_timeout), - [{watchdog, Dog} | Config]. + Config. -end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), - test_server:timetrap_cancel(Dog), +end_per_testcase(_Case, _Config) -> ok. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,2}}]. + all() -> test_lib:recompile(?MODULE), [{group,p}]. diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl index 2a425c2ae5..32cdc4ed94 100644 --- a/lib/compiler/test/warnings_SUITE.erl +++ b/lib/compiler/test/warnings_SUITE.erl @@ -43,19 +43,15 @@ redundant_boolean_clauses/1, latin1_fallback/1,underscore/1,no_warnings/1]). -% Default timetrap timeout (set in init_per_testcase). --define(default_timeout, ?t:minutes(2)). - init_per_testcase(_Case, Config) -> - ?line Dog = ?t:timetrap(?default_timeout), - [{watchdog, Dog} | Config]. + Config. -end_per_testcase(_Case, Config) -> - Dog = ?config(watchdog, Config), - test_server:timetrap_cancel(Dog), +end_per_testcase(_Case, _Config) -> ok. -suite() -> [{ct_hooks,[ts_install_cth]}]. +suite() -> + [{ct_hooks,[ts_install_cth]}, + {timetrap,{minutes,2}}]. all() -> test_lib:recompile(?MODULE), |