diff options
Diffstat (limited to 'lib/debugger/test')
23 files changed, 395 insertions, 182 deletions
diff --git a/lib/debugger/test/andor_SUITE.erl b/lib/debugger/test/andor_SUITE.erl index 346ca42376..2ac7a73ebe 100644 --- a/lib/debugger/test/andor_SUITE.erl +++ b/lib/debugger/test/andor_SUITE.erl @@ -20,14 +20,24 @@ %% -module(andor_SUITE). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, t_andalso/1,t_orelse/1,inside/1,overlap/1, combined/1,in_case/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). + +all() -> +[cases()]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [{conf,init_all,cases(),finish_all}]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -39,16 +49,17 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. -cases() -> - [t_andalso,t_orelse,inside,overlap,combined,in_case]. +cases() -> +[t_andalso, t_orelse, inside, overlap, combined, + in_case]. t_andalso(Config) when is_list(Config) -> Bs = [true,false], diff --git a/lib/debugger/test/bs_bincomp_SUITE.erl b/lib/debugger/test/bs_bincomp_SUITE.erl index 0a574ecd5f..d25f68e91d 100644 --- a/lib/debugger/test/bs_bincomp_SUITE.erl +++ b/lib/debugger/test/bs_bincomp_SUITE.erl @@ -23,11 +23,11 @@ -module(bs_bincomp_SUITE). --export([all/1,init_per_testcase/2,end_per_testcase/2, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2, byte_aligned/1,bit_aligned/1,extended_byte_aligned/1, extended_bit_aligned/1,mixed/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -39,9 +39,19 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -all(suite) -> - [byte_aligned,bit_aligned,extended_byte_aligned, - extended_bit_aligned,mixed]. +all() -> +[byte_aligned, bit_aligned, extended_byte_aligned, + extended_bit_aligned, mixed]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + byte_aligned(Config) when is_list(Config) -> diff --git a/lib/debugger/test/bs_construct_SUITE.erl b/lib/debugger/test/bs_construct_SUITE.erl index 4416a675b8..9971b90a42 100644 --- a/lib/debugger/test/bs_construct_SUITE.erl +++ b/lib/debugger/test/bs_construct_SUITE.erl @@ -19,18 +19,28 @@ -module(bs_construct_SUITE). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, test1/1, test2/1, test3/1, test4/1, test5/1, testf/1, not_used/1, in_guard/1, coerce_to_float/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [test1, test2, test3, test4, test5, testf, - not_used, in_guard, coerce_to_float]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[test1, test2, test3, test4, test5, testf, not_used, + in_guard, coerce_to_float]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -42,12 +52,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. big(1) -> diff --git a/lib/debugger/test/bs_match_bin_SUITE.erl b/lib/debugger/test/bs_match_bin_SUITE.erl index ab2ce88e12..d422580b20 100644 --- a/lib/debugger/test/bs_match_bin_SUITE.erl +++ b/lib/debugger/test/bs_match_bin_SUITE.erl @@ -21,16 +21,26 @@ -module(bs_match_bin_SUITE). -author('[email protected]'). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, byte_split_binary/1,bit_split_binary/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [byte_split_binary,bit_split_binary]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[byte_split_binary, bit_split_binary]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -42,12 +52,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. byte_split_binary(doc) -> "Tries to split a binary at all byte-aligned positions."; diff --git a/lib/debugger/test/bs_match_int_SUITE.erl b/lib/debugger/test/bs_match_int_SUITE.erl index 0cb9062575..14ccbe425a 100644 --- a/lib/debugger/test/bs_match_int_SUITE.erl +++ b/lib/debugger/test/bs_match_int_SUITE.erl @@ -20,18 +20,28 @@ -module(bs_match_int_SUITE). -author('[email protected]'). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, integer/1,signed_integer/1,dynamic/1,more_dynamic/1,mml/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -import(lists, [seq/2]). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [integer,signed_integer,dynamic,more_dynamic,mml]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[integer, signed_integer, dynamic, more_dynamic, mml]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -43,12 +53,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. integer(suite) -> []; diff --git a/lib/debugger/test/bs_match_misc_SUITE.erl b/lib/debugger/test/bs_match_misc_SUITE.erl index 7414685f0c..d9116c6f8a 100644 --- a/lib/debugger/test/bs_match_misc_SUITE.erl +++ b/lib/debugger/test/bs_match_misc_SUITE.erl @@ -20,16 +20,26 @@ -module(bs_match_misc_SUITE). -author('[email protected]'). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, bound_var/1,bound_tail/1,t_float/1,little_float/1,sean/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [bound_var,bound_tail,t_float,little_float,sean]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[bound_var, bound_tail, t_float, little_float, sean]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -41,12 +51,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. bound_var(doc) -> "Test matching of bound variables."; diff --git a/lib/debugger/test/bs_match_tail_SUITE.erl b/lib/debugger/test/bs_match_tail_SUITE.erl index 9c8d753371..3f5dea3011 100644 --- a/lib/debugger/test/bs_match_tail_SUITE.erl +++ b/lib/debugger/test/bs_match_tail_SUITE.erl @@ -20,16 +20,26 @@ -module(bs_match_tail_SUITE). -author('[email protected]'). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, aligned/1,unaligned/1,zero_tail/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [aligned,unaligned,zero_tail]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[aligned, unaligned, zero_tail]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -41,12 +51,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. aligned(doc) -> "Test aligned tails."; diff --git a/lib/debugger/test/bs_utf_SUITE.erl b/lib/debugger/test/bs_utf_SUITE.erl index a114bc2b46..c15c4be351 100644 --- a/lib/debugger/test/bs_utf_SUITE.erl +++ b/lib/debugger/test/bs_utf_SUITE.erl @@ -21,20 +21,30 @@ -module(bs_utf_SUITE). --export([all/1,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_suite/1,end_per_suite/1, init_per_testcase/2,end_per_testcase/2, utf8_roundtrip/1,unused_utf_char/1,utf16_roundtrip/1, utf32_roundtrip/1,guard/1,extreme_tripping/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -compile([no_jopt,time]). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [utf8_roundtrip,unused_utf_char,utf16_roundtrip, - utf32_roundtrip,guard,extreme_tripping]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[utf8_roundtrip, unused_utf_char, utf16_roundtrip, + utf32_roundtrip, guard, extreme_tripping]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -46,12 +56,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. utf8_roundtrip(Config) when is_list(Config) -> diff --git a/lib/debugger/test/bug_SUITE.erl b/lib/debugger/test/bug_SUITE.erl index cf732c8115..fab94cc08f 100644 --- a/lib/debugger/test/bug_SUITE.erl +++ b/lib/debugger/test/bug_SUITE.erl @@ -20,18 +20,27 @@ %% -module(bug_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). --export([all/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2]). --export([ticket_tests/1]). +-export([]). -export([otp2163/1, otp4845/1]). -all(suite) -> [ticket_tests]. +all() -> +[{group, ticket_tests}]. + +groups() -> + [{ticket_tests, [], [otp2163, otp4845]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + -ticket_tests(doc) -> ["Tests tickets regarding bugs"]; -ticket_tests(suite) -> [otp2163, otp4845]. otp2163(doc) -> ["BIF exit reason"]; otp2163(suite) -> []; diff --git a/lib/debugger/test/cleanup.erl b/lib/debugger/test/cleanup.erl index 59b4c35ac7..5f1ea71d2e 100644 --- a/lib/debugger/test/cleanup.erl +++ b/lib/debugger/test/cleanup.erl @@ -20,11 +20,22 @@ %% -module(cleanup). --export([all/1, cleanup/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2, cleanup/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). + +all() -> +[cleanup]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> {req, [interpreter], [cleanup]}. cleanup(suite) -> []; cleanup(_) -> diff --git a/lib/debugger/test/dbg_ui_SUITE.erl b/lib/debugger/test/dbg_ui_SUITE.erl index 00e75d6bb3..6207524be5 100644 --- a/lib/debugger/test/dbg_ui_SUITE.erl +++ b/lib/debugger/test/dbg_ui_SUITE.erl @@ -21,11 +21,11 @@ -module(dbg_ui_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). % Test server specific exports --export([all/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2]). -export([function_tests/1]). @@ -37,7 +37,7 @@ % Manual test suites/cases exports --export([manual_tests/1]). +-export([]). -export([start1/1, interpret1/1, quit1/1, start2/1, interpret2/1, break2/1, options2/1, quit2/1, interpret3/1, all_step3/1,all_next3/1,save3/1,restore3/1,finish3/1, @@ -62,8 +62,24 @@ end_per_testcase(_Func, Config) -> test_server:timetrap_cancel(Dog). -all (suite)-> - {req, [debugger], [function_tests, manual_tests]}. +all() -> +[function_tests, {group, manual_tests}]. + +groups() -> + [{manual_tests, [], + [start1, interpret1, quit1, start2, interpret2, break2, + options2, interpret3, all_step3, all_next3, save3, + restore3, finish3, killinit3, killone3, killall3, + deleteone3, deleteall3, viewbreak4, delete4, attach5, + normal5, exit5, options5, distsetup6, all_step6, + all_next6]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + function_tests (doc) -> @@ -164,15 +180,6 @@ check(Case, Config) -> -manual_tests(doc) -> ["Manual tests"]; -manual_tests(suite) -> [start1, interpret1, quit1, - start2, interpret2, break2, options2, - interpret3, all_step3,all_next3,save3,restore3,finish3, - killinit3, killone3, killall3, deleteone3, deleteall3, - viewbreak4, delete4, - attach5, normal5, exit5, options5, - distsetup6, all_step6, all_next6 - ]. diff --git a/lib/debugger/test/debugger.spec b/lib/debugger/test/debugger.spec index cc8a5aff37..426b2757ac 100644 --- a/lib/debugger/test/debugger.spec +++ b/lib/debugger/test/debugger.spec @@ -1 +1 @@ -{topcase, {dir, "../debugger_test"}}. +{suites,"debugger_test",all}. diff --git a/lib/debugger/test/debugger_SUITE.erl b/lib/debugger/test/debugger_SUITE.erl index 648c6808a9..a10b2aecbc 100644 --- a/lib/debugger/test/debugger_SUITE.erl +++ b/lib/debugger/test/debugger_SUITE.erl @@ -22,14 +22,25 @@ %% Test break points. --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). --export([all/1,init_per_testcase/2,end_per_testcase/2, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2, app_test/1,erts_debug/1,encrypted_debug_info/1, no_abstract_code/1]). -all(suite) -> - [app_test,erts_debug,no_abstract_code,encrypted_debug_info]. +all() -> +[app_test, erts_debug, no_abstract_code, + encrypted_debug_info]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_testcase(_Case, Config) -> Dog=test_server:timetrap(?t:minutes(0.5)), diff --git a/lib/debugger/test/erl_eval_SUITE.erl b/lib/debugger/test/erl_eval_SUITE.erl index 9c62e1713a..f49e95669e 100644 --- a/lib/debugger/test/erl_eval_SUITE.erl +++ b/lib/debugger/test/erl_eval_SUITE.erl @@ -17,7 +17,7 @@ %% %CopyrightEnd% -module(erl_eval_SUITE). --export([all/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2]). -export([guard_1/1, guard_2/1, match_pattern/1, @@ -57,7 +57,7 @@ config(priv_dir,_) -> ".". -else. --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -export([init_per_testcase/2, end_per_testcase/2]). % Default timetrap timeout (set in init_per_testcase). -define(default_timeout, ?t:minutes(1)). @@ -70,13 +70,22 @@ end_per_testcase(_Case, Config) -> ok. -endif. -all(doc) -> - ["Test cases for the 'erl_eval' module."]; -all(suite) -> - [guard_1, guard_2, match_pattern, string_plusplus, pattern_expr, - match_bin, guard_3, guard_4, - lc, simple_cases, unary_plus, apply_atom, otp_5269, otp_6539, otp_6543, - otp_6787, otp_6977, otp_7550, otp_8133, funs, try_catch, eval_expr_5]. +all() -> +[guard_1, guard_2, match_pattern, string_plusplus, + pattern_expr, match_bin, guard_3, guard_4, lc, + simple_cases, unary_plus, apply_atom, otp_5269, + otp_6539, otp_6543, otp_6787, otp_6977, otp_7550, + otp_8133, funs, try_catch, eval_expr_5]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + guard_1(doc) -> ["(OTP-2405)"]; diff --git a/lib/debugger/test/exception_SUITE.erl b/lib/debugger/test/exception_SUITE.erl index 1ba4945e33..9fc1a28b2f 100644 --- a/lib/debugger/test/exception_SUITE.erl +++ b/lib/debugger/test/exception_SUITE.erl @@ -20,18 +20,28 @@ %% -module(exception_SUITE). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, badmatch/1,pending_errors/1,nil_arith/1]). -export([bad_guy/2]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [badmatch, pending_errors, nil_arith]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[badmatch, pending_errors, nil_arith]. -define(try_match(E), catch ?MODULE:bar(), @@ -47,12 +57,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. badmatch(doc) -> "Test that deliberately bad matches are reported correctly."; diff --git a/lib/debugger/test/fun_SUITE.erl b/lib/debugger/test/fun_SUITE.erl index 721048b6b6..c52ddec1b5 100644 --- a/lib/debugger/test/fun_SUITE.erl +++ b/lib/debugger/test/fun_SUITE.erl @@ -20,20 +20,31 @@ %% -module(fun_SUITE). --export([all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2,end_per_testcase/2, - init_all/1,finish_all/1, + init_per_suite/1,end_per_suite/1, good_call/1,bad_apply/1,bad_fun_call/1,badarity/1, ext_badarity/1,otp_6061/1]). -export([nothing/0]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [good_call,bad_apply,bad_fun_call,badarity,ext_badarity,otp_6061]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[good_call, bad_apply, bad_fun_call, badarity, + ext_badarity, otp_6061]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -45,12 +56,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. good_call(Config) when is_list(Config) -> diff --git a/lib/debugger/test/guard_SUITE.erl b/lib/debugger/test/guard_SUITE.erl index 13a0e67041..8b127f183f 100644 --- a/lib/debugger/test/guard_SUITE.erl +++ b/lib/debugger/test/guard_SUITE.erl @@ -20,7 +20,7 @@ %% -module(guard_SUITE). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, bad_arith/1,bad_tuple/1,test_heap_guards/1,guard_bifs/1, type_tests/1,const_guard/1, const_cond/1,basic_not/1,complex_not/1, @@ -35,24 +35,33 @@ basic_andalso_orelse/1,traverse_dcd/1, check_qlc_hrl/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -export([init/4]). -import(lists, [member/2]). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [bad_arith,bad_tuple,test_heap_guards,guard_bifs,type_tests,const_guard, - const_cond,basic_not,complex_not, - semicolon,complex_semicolon, - comma,or_guard,more_or_guards, - complex_or_guards,and_guard, - xor_guard,more_xor_guards, - build_in_guard,old_guard_tests,gbif, - t_is_boolean,is_function_2,tricky,rel_ops, - basic_andalso_orelse,traverse_dcd,check_qlc_hrl]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[bad_arith, bad_tuple, test_heap_guards, guard_bifs, + type_tests, const_guard, const_cond, basic_not, + complex_not, semicolon, complex_semicolon, comma, + or_guard, more_or_guards, complex_or_guards, and_guard, + xor_guard, more_xor_guards, build_in_guard, + old_guard_tests, gbif, t_is_boolean, is_function_2, + tricky, rel_ops, basic_andalso_orelse, traverse_dcd, + check_qlc_hrl]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -64,12 +73,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. bad_arith(doc) -> "Test that a bad arithmetic operation in a guard works correctly."; diff --git a/lib/debugger/test/int_SUITE.erl b/lib/debugger/test/int_SUITE.erl index 0326325888..f235d6e385 100644 --- a/lib/debugger/test/int_SUITE.erl +++ b/lib/debugger/test/int_SUITE.erl @@ -19,15 +19,15 @@ %% -module(int_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). %% Test server specific exports --export([all/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2]). -export([init_per_testcase/2, end_per_testcase/2]). %% Test cases --export([interpret/1, guards/1, list_suite/1, interpretable/1]). --export([append/1, append_1/1, append_2/1, member/1, reverse/1]). +-export([interpret/1, guards/1, interpretable/1]). +-export([ append_1/1, append_2/1, member/1, reverse/1]). %% Default timetrap timeout (set in init_per_testcase) -define(default_timeout, ?t:minutes(1)). @@ -59,8 +59,19 @@ end_per_testcase(_Case, Config) -> ?line test_server:timetrap_cancel(Dog), ?line ok. -all(suite)-> - [interpret, guards, list_suite, interpretable]. +all() -> +[interpret, guards, {group, list_suite}, interpretable]. + +groups() -> + [{list_suite, [], [{group, append}, reverse, member]}, + {append, [], [append_1, append_2]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + interpret(suite) -> []; @@ -97,13 +108,7 @@ guards(Config) when is_list(Config) -> ok = guards:guards(). -list_suite(suite) -> - [append, reverse, member]. -append(doc) -> - ["Tests lists1:append/1 & lists1:append/2"]; -append(suite) -> - [append_1, append_2]. append_1(suite) -> []; diff --git a/lib/debugger/test/int_break_SUITE.erl b/lib/debugger/test/int_break_SUITE.erl index c70551de6e..cd33046efa 100644 --- a/lib/debugger/test/int_break_SUITE.erl +++ b/lib/debugger/test/int_break_SUITE.erl @@ -22,15 +22,25 @@ %% Test break points. --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). --export([all/1,init_per_testcase/2,end_per_testcase/2, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2, basic/1,cleanup/1]). -export([auto_attach/1]). -all(suite) -> - [basic,cleanup]. +all() -> +[basic, cleanup]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_testcase(_Case, Config) -> ?line DataDir = ?config(data_dir, Config), diff --git a/lib/debugger/test/int_eval_SUITE.erl b/lib/debugger/test/int_eval_SUITE.erl index 390147147e..9f0836c406 100644 --- a/lib/debugger/test/int_eval_SUITE.erl +++ b/lib/debugger/test/int_eval_SUITE.erl @@ -22,7 +22,7 @@ %% Purpose: Deeper test of the evaluator. --export([all/1,init_per_testcase/2, end_per_testcase/2, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2, end_per_testcase/2, bifs_outside_erlang/1, spawning/1, applying/1, catch_and_throw/1, external_call/1, test_module_info/1, apply_interpreted_fun/1, apply_uninterpreted_fun/1, @@ -33,13 +33,23 @@ -define(IM, my_int_eval_module). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). + +all() -> +[bifs_outside_erlang, spawning, applying, + catch_and_throw, external_call, test_module_info, + apply_interpreted_fun, apply_uninterpreted_fun, + interpreted_exit, otp_8310]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [bifs_outside_erlang,spawning,applying,catch_and_throw, - external_call,test_module_info, - apply_interpreted_fun,apply_uninterpreted_fun, - interpreted_exit, otp_8310]. init_per_testcase(_Case, Config) -> ?line DataDir = ?config(data_dir, Config), diff --git a/lib/debugger/test/lc_SUITE.erl b/lib/debugger/test/lc_SUITE.erl index daa53e41a3..362e18eba1 100644 --- a/lib/debugger/test/lc_SUITE.erl +++ b/lib/debugger/test/lc_SUITE.erl @@ -21,16 +21,26 @@ -module(lc_SUITE). -author('[email protected]'). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, basic/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [basic]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[basic]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -42,12 +52,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. basic(Config) when list(Config) -> diff --git a/lib/debugger/test/record_SUITE.erl b/lib/debugger/test/record_SUITE.erl index 9021ad55d1..684bc2eaa3 100644 --- a/lib/debugger/test/record_SUITE.erl +++ b/lib/debugger/test/record_SUITE.erl @@ -22,16 +22,26 @@ -module(record_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, errors/1,record_test/1,eval_once/1]). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [errors,record_test,eval_once]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[errors, record_test, eval_once]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -43,12 +53,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. -record(foo, {a,b,c,d}). diff --git a/lib/debugger/test/trycatch_SUITE.erl b/lib/debugger/test/trycatch_SUITE.erl index e039d0ff85..2d951be68f 100644 --- a/lib/debugger/test/trycatch_SUITE.erl +++ b/lib/debugger/test/trycatch_SUITE.erl @@ -20,20 +20,30 @@ %% -module(trycatch_SUITE). --export([all/1,init_per_testcase/2,end_per_testcase/2,init_all/1,finish_all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2,init_per_testcase/2,end_per_testcase/2,init_per_suite/1,end_per_suite/1, basic/1,lean_throw/1,try_of/1,try_after/1,%after_bind/1, catch_oops/1,after_oops/1,eclectic/1,rethrow/1, nested_of/1,nested_catch/1,nested_after/1]). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [{conf,init_all,cases(),finish_all}]. +all() -> +[cases()]. -cases() -> - [basic,lean_throw,try_of,try_after,%after_bind, - catch_oops,after_oops,eclectic,rethrow, - nested_of,nested_catch,nested_after]. +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +cases() -> +[basic, lean_throw, try_of, try_after, catch_oops, + after_oops, eclectic, rethrow, nested_of, nested_catch, + nested_after]. init_per_testcase(_Case, Config) -> test_lib:interpret(?MODULE), @@ -45,12 +55,12 @@ end_per_testcase(_Case, Config) -> ?t:timetrap_cancel(Dog), ok. -init_all(Config) when is_list(Config) -> +init_per_suite(Config) when is_list(Config) -> ?line test_lib:interpret(?MODULE), ?line true = lists:member(?MODULE, int:interpreted()), ok. -finish_all(Config) when is_list(Config) -> +end_per_suite(Config) when is_list(Config) -> ok. basic(Conf) when is_list(Conf) -> |