diff options
author | Lukas Larsson <[email protected]> | 2010-10-12 10:40:08 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2011-02-17 17:25:13 +0100 |
commit | 87e168ba95f57d6d5de88c2b2f06d37039bb40e5 (patch) | |
tree | d981850794423659cddd30bcc2df4119adcfb156 | |
parent | f02cc10b4bda484996b7b93436fcaf8d714cb3da (diff) | |
download | otp-87e168ba95f57d6d5de88c2b2f06d37039bb40e5.tar.gz otp-87e168ba95f57d6d5de88c2b2f06d37039bb40e5.tar.bz2 otp-87e168ba95f57d6d5de88c2b2f06d37039bb40e5.zip |
Update erl_interface tests to conform with common_test standard
-rw-r--r-- | lib/erl_interface/test/ei_accept_SUITE.erl | 17 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_connect_SUITE.erl | 23 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_decode_SUITE.erl | 29 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_decode_encode_SUITE.erl | 20 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_encode_SUITE.erl | 29 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_format_SUITE.erl | 22 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_print_SUITE.erl | 17 | ||||
-rw-r--r-- | lib/erl_interface/test/ei_tmo_SUITE.erl | 19 | ||||
-rw-r--r-- | lib/erl_interface/test/erl_connect_SUITE.erl | 18 | ||||
-rw-r--r-- | lib/erl_interface/test/erl_eterm_SUITE.erl | 60 | ||||
-rw-r--r-- | lib/erl_interface/test/erl_ext_SUITE.erl | 24 | ||||
-rw-r--r-- | lib/erl_interface/test/erl_format_SUITE.erl | 17 | ||||
-rw-r--r-- | lib/erl_interface/test/erl_global_SUITE.erl | 17 | ||||
-rw-r--r-- | lib/erl_interface/test/erl_interface.spec | 3 | ||||
-rw-r--r-- | lib/erl_interface/test/erl_match_SUITE.erl | 19 | ||||
-rw-r--r-- | lib/erl_interface/test/port_call_SUITE.erl | 18 |
16 files changed, 231 insertions, 121 deletions
diff --git a/lib/erl_interface/test/ei_accept_SUITE.erl b/lib/erl_interface/test/ei_accept_SUITE.erl index c6a78a0065..d1309734f6 100644 --- a/lib/erl_interface/test/ei_accept_SUITE.erl +++ b/lib/erl_interface/test/ei_accept_SUITE.erl @@ -20,15 +20,26 @@ %% -module(ei_accept_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("ei_accept_SUITE_data/ei_accept_test_cases.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, ei_accept/1, ei_threaded_accept/1]). -import(runner, [get_term/1,send_term/2]). -all(suite) -> [ei_accept, ei_threaded_accept]. +all() -> +[ei_accept, ei_threaded_accept]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_testcase(_Case, Config) -> Dog = ?t:timetrap(?t:seconds(30)), diff --git a/lib/erl_interface/test/ei_connect_SUITE.erl b/lib/erl_interface/test/ei_connect_SUITE.erl index fe9b270093..603a300a26 100644 --- a/lib/erl_interface/test/ei_connect_SUITE.erl +++ b/lib/erl_interface/test/ei_connect_SUITE.erl @@ -20,11 +20,11 @@ %% -module(ei_connect_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("ei_connect_SUITE_data/ei_connect_test_cases.hrl"). -export([ - all/1, + all/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2, @@ -40,13 +40,18 @@ -import(runner, [get_term/1,send_term/2]). -all(suite) -> [ ei_send, - ei_reg_send, - ei_format_pid, - ei_rpc, - ei_send_funs, - ei_threaded_send, - ei_set_get_tracelevel]. +all() -> +[ei_send, ei_reg_send, ei_rpc, ei_format_pid, ei_send_funs, + ei_threaded_send, ei_set_get_tracelevel]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. init_per_testcase(_Case, Config) -> Dog = ?t:timetrap(?t:minutes(0.25)), diff --git a/lib/erl_interface/test/ei_decode_SUITE.erl b/lib/erl_interface/test/ei_decode_SUITE.erl index 524a04a3b4..cf30ef96d1 100644 --- a/lib/erl_interface/test/ei_decode_SUITE.erl +++ b/lib/erl_interface/test/ei_decode_SUITE.erl @@ -20,12 +20,12 @@ %% -module(ei_decode_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("ei_decode_SUITE_data/ei_decode_test_cases.hrl"). -export( [ - all/1, +all/0,groups/0,init_per_group/2,end_per_group/2, test_ei_decode_long/1, test_ei_decode_ulong/1, test_ei_decode_longlong/1, @@ -35,16 +35,21 @@ test_ei_decode_misc/1 ]). -all(suite) -> - [ - test_ei_decode_long, - test_ei_decode_ulong, - test_ei_decode_longlong, - test_ei_decode_ulonglong, - test_ei_decode_char, - test_ei_decode_nonoptimal, - test_ei_decode_misc - ]. +all() -> +[test_ei_decode_long, test_ei_decode_ulong, + test_ei_decode_longlong, test_ei_decode_ulonglong, + test_ei_decode_char, test_ei_decode_nonoptimal, + test_ei_decode_misc]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% --------------------------------------------------------------------------- diff --git a/lib/erl_interface/test/ei_decode_encode_SUITE.erl b/lib/erl_interface/test/ei_decode_encode_SUITE.erl index 8c8ec9bacb..b4bb6e187c 100644 --- a/lib/erl_interface/test/ei_decode_encode_SUITE.erl +++ b/lib/erl_interface/test/ei_decode_encode_SUITE.erl @@ -20,19 +20,27 @@ %% -module(ei_decode_encode_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("ei_decode_encode_SUITE_data/ei_decode_encode_test_cases.hrl"). -export( [ - all/1, +all/0,groups/0,init_per_group/2,end_per_group/2, test_ei_decode_encode/1 ]). -all(suite) -> - [ - test_ei_decode_encode - ]. +all() -> +[test_ei_decode_encode]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% --------------------------------------------------------------------------- diff --git a/lib/erl_interface/test/ei_encode_SUITE.erl b/lib/erl_interface/test/ei_encode_SUITE.erl index 6b9de4f093..bc8bcc07a3 100644 --- a/lib/erl_interface/test/ei_encode_SUITE.erl +++ b/lib/erl_interface/test/ei_encode_SUITE.erl @@ -20,12 +20,12 @@ %% -module(ei_encode_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("ei_encode_SUITE_data/ei_encode_test_cases.hrl"). -export( [ - all/1, +all/0,groups/0,init_per_group/2,end_per_group/2, test_ei_encode_long/1, test_ei_encode_ulong/1, test_ei_encode_longlong/1, @@ -35,16 +35,21 @@ test_ei_encode_fails/1 ]). -all(suite) -> - [ - test_ei_encode_long, - test_ei_encode_ulong, - test_ei_encode_longlong, - test_ei_encode_ulonglong, - test_ei_encode_char, - test_ei_encode_misc, - test_ei_encode_fails - ]. +all() -> +[test_ei_encode_long, test_ei_encode_ulong, + test_ei_encode_longlong, test_ei_encode_ulonglong, + test_ei_encode_char, test_ei_encode_misc, + test_ei_encode_fails]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% --------------------------------------------------------------------------- diff --git a/lib/erl_interface/test/ei_format_SUITE.erl b/lib/erl_interface/test/ei_format_SUITE.erl index 9ae4a715b0..29209d50b9 100644 --- a/lib/erl_interface/test/ei_format_SUITE.erl +++ b/lib/erl_interface/test/ei_format_SUITE.erl @@ -20,12 +20,12 @@ %% -module(ei_format_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("ei_format_SUITE_data/ei_format_test_cases.hrl"). -export([ format_wo_ver/1, - all/1, + all/0,groups/0,init_per_group/2,end_per_group/2, atoms/1, tuples/1, lists/1 @@ -36,12 +36,18 @@ %% This test suite test the erl_format() function. %% It uses the port program "ei_format_test". -all(suite) -> [ - format_wo_ver, - atoms, - tuples, - lists - ]. +all() -> +[format_wo_ver, atoms, tuples, lists]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% Tests formatting various atoms. diff --git a/lib/erl_interface/test/ei_print_SUITE.erl b/lib/erl_interface/test/ei_print_SUITE.erl index 61365fcd46..c5c0e84358 100644 --- a/lib/erl_interface/test/ei_print_SUITE.erl +++ b/lib/erl_interface/test/ei_print_SUITE.erl @@ -20,17 +20,28 @@ %% -module(ei_print_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("ei_print_SUITE_data/ei_print_test_cases.hrl"). --export([all/1, atoms/1, tuples/1, lists/1, strings/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2, atoms/1, tuples/1, lists/1, strings/1]). -import(runner, [get_term/1]). %% This test suite test the ei_print() function. %% It uses the port program "ei_format_test". -all(suite) -> [atoms, tuples, lists, strings]. +all() -> +[atoms, tuples, lists, strings]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% Tests formatting various atoms. diff --git a/lib/erl_interface/test/ei_tmo_SUITE.erl b/lib/erl_interface/test/ei_tmo_SUITE.erl index e536fd2688..c1bf5e35f6 100644 --- a/lib/erl_interface/test/ei_tmo_SUITE.erl +++ b/lib/erl_interface/test/ei_tmo_SUITE.erl @@ -20,18 +20,29 @@ %% -module(ei_tmo_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include_lib("kernel/include/inet.hrl"). -include("ei_tmo_SUITE_data/ei_tmo_test_cases.hrl"). -define(dummy_host,test01). --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, framework_check/1, ei_accept_tmo/1, ei_connect_tmo/1, ei_send_tmo/1, ei_recv_tmo/1]). -all(suite) -> [framework_check,ei_accept_tmo,ei_connect_tmo, - ei_send_tmo,ei_recv_tmo]. +all() -> +[framework_check, ei_accept_tmo, ei_connect_tmo, + ei_send_tmo, ei_recv_tmo]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_testcase(_Case, Config) -> Dog = ?t:timetrap(?t:minutes(1)), diff --git a/lib/erl_interface/test/erl_connect_SUITE.erl b/lib/erl_interface/test/erl_connect_SUITE.erl index fd568e56b9..6a8d5a998e 100644 --- a/lib/erl_interface/test/erl_connect_SUITE.erl +++ b/lib/erl_interface/test/erl_connect_SUITE.erl @@ -20,16 +20,26 @@ %% -module(erl_connect_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("erl_connect_SUITE_data/erl_connect_test_cases.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, erl_send/1,erl_reg_send/1, erl_send_cookie_file/1]). -import(runner, [get_term/1,send_term/2]). -all(suite) -> - [erl_send,erl_reg_send,erl_send_cookie_file]. +all() -> +[erl_send, erl_reg_send, erl_send_cookie_file]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_testcase(_Case, Config) -> Dog = ?t:timetrap(?t:minutes(0.25)), diff --git a/lib/erl_interface/test/erl_eterm_SUITE.erl b/lib/erl_interface/test/erl_eterm_SUITE.erl index e77f114066..084415ec41 100644 --- a/lib/erl_interface/test/erl_eterm_SUITE.erl +++ b/lib/erl_interface/test/erl_eterm_SUITE.erl @@ -20,7 +20,7 @@ %% -module(erl_eterm_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("erl_eterm_SUITE_data/eterm_test_cases.hrl"). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -33,7 +33,7 @@ %%% 5. Miscellanous functions. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([all/1, build_terms/1, round_trip_conversion/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2, build_terms/1, round_trip_conversion/1, decode_terms/1, decode_float/1, t_erl_mk_int/1, t_erl_mk_list/1, basic_copy/1, @@ -73,38 +73,30 @@ %% This test suite controls the running of the C language functions %% in eterm_test.c and print_term.c. -all(suite) -> [build_terms, round_trip_conversion, - decode_terms, decode_float, - t_erl_mk_int, t_erl_mk_list, - basic_copy, - t_erl_mk_atom, - t_erl_mk_binary, - t_erl_mk_empty_list, - t_erl_mk_float, - t_erl_mk_pid, - t_erl_mk_xpid, - t_erl_mk_port, - t_erl_mk_xport, - t_erl_mk_ref, - t_erl_mk_long_ref, - t_erl_mk_string, - t_erl_mk_estring, - t_erl_mk_tuple, - t_erl_mk_uint, - t_erl_mk_var, - t_erl_size, - t_erl_var_content, - t_erl_element, - t_erl_cons, - t_erl_length, t_erl_hd, t_erl_tl, - type_checks, extractor_macros, - t_erl_iolist_length, t_erl_iolist_to_binary, - t_erl_iolist_to_string, - erl_print_term, print_string, - t_erl_free_compound, - high_chaparal, - broken_data, - cnode_1]. +all() -> +[build_terms, round_trip_conversion, decode_terms, + decode_float, t_erl_mk_int, t_erl_mk_list, basic_copy, + t_erl_mk_atom, t_erl_mk_binary, t_erl_mk_empty_list, + t_erl_mk_float, t_erl_mk_pid, t_erl_mk_xpid, + t_erl_mk_port, t_erl_mk_xport, t_erl_mk_ref, + t_erl_mk_long_ref, t_erl_mk_string, t_erl_mk_estring, + t_erl_mk_tuple, t_erl_mk_uint, t_erl_mk_var, t_erl_size, + t_erl_var_content, t_erl_element, t_erl_cons, + t_erl_length, t_erl_hd, t_erl_tl, type_checks, + extractor_macros, t_erl_iolist_length, + t_erl_iolist_to_binary, t_erl_iolist_to_string, + erl_print_term, print_string, t_erl_free_compound, + high_chaparal, broken_data, cnode_1]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/erl_interface/test/erl_ext_SUITE.erl b/lib/erl_interface/test/erl_ext_SUITE.erl index d1c27d8158..c3a47a75a0 100644 --- a/lib/erl_interface/test/erl_ext_SUITE.erl +++ b/lib/erl_interface/test/erl_ext_SUITE.erl @@ -20,11 +20,11 @@ %% -module(erl_ext_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("erl_ext_SUITE_data/ext_test_cases.hrl"). -export([ - all/1, + all/0,groups/0,init_per_group/2,end_per_group/2, compare_tuple/1, compare_list/1, compare_string/1, @@ -34,13 +34,19 @@ -import(runner, [get_term/1]). -all(suite) -> [ - compare_tuple, - compare_list, - compare_string, - compare_list_string, - compare_nc_ext - ]. +all() -> +[compare_tuple, compare_list, compare_string, + compare_list_string, compare_nc_ext]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + compare_tuple(suite) -> []; compare_tuple(doc) -> []; diff --git a/lib/erl_interface/test/erl_format_SUITE.erl b/lib/erl_interface/test/erl_format_SUITE.erl index c8809fdde9..3e828d14b7 100644 --- a/lib/erl_interface/test/erl_format_SUITE.erl +++ b/lib/erl_interface/test/erl_format_SUITE.erl @@ -20,17 +20,28 @@ %% -module(erl_format_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("erl_format_SUITE_data/format_test_cases.hrl"). --export([all/1, atoms/1, tuples/1, lists/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2, atoms/1, tuples/1, lists/1]). -import(runner, [get_term/1]). %% This test suite test the erl_format() function. %% It uses the port program "format_test". -all(suite) -> [atoms, tuples, lists]. +all() -> +[atoms, tuples, lists]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% Tests formatting various atoms. diff --git a/lib/erl_interface/test/erl_global_SUITE.erl b/lib/erl_interface/test/erl_global_SUITE.erl index 4f332037c6..3d080f482d 100644 --- a/lib/erl_interface/test/erl_global_SUITE.erl +++ b/lib/erl_interface/test/erl_global_SUITE.erl @@ -20,24 +20,33 @@ %% -module(erl_global_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("erl_global_SUITE_data/erl_global_test_cases.hrl"). --export([all/1,init_per_testcase/2,fin_per_testcase/2, +-export([all/0,suite/0,init_per_suite/1,end_per_suite/1, + init_per_testcase/2,end_per_testcase/2, erl_global_registration/1, erl_global_whereis/1, erl_global_names/1]). -import(runner, [get_term/1,send_term/2]). -define(GLOBAL_NAME, global_register_node_test). -all(suite) -> +all() -> [erl_global_registration, erl_global_whereis, erl_global_names]. +suite() -> [{suite_callbacks,[ts_install_scb]}]. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_testcase(_Case, Config) -> Dog = ?t:timetrap(?t:minutes(0.25)), [{watchdog, Dog}|Config]. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> Dog = ?config(watchdog, Config), test_server:timetrap_cancel(Dog), ok. diff --git a/lib/erl_interface/test/erl_interface.spec b/lib/erl_interface/test/erl_interface.spec index 2789bd3e2c..59542b6558 100644 --- a/lib/erl_interface/test/erl_interface.spec +++ b/lib/erl_interface/test/erl_interface.spec @@ -1,2 +1 @@ -{topcase, {dir, "../erl_interface_test"}}. - +{suites,"erl_interface_test",all}. diff --git a/lib/erl_interface/test/erl_match_SUITE.erl b/lib/erl_interface/test/erl_match_SUITE.erl index 2c0cdc0c27..d2ab6bd722 100644 --- a/lib/erl_interface/test/erl_match_SUITE.erl +++ b/lib/erl_interface/test/erl_match_SUITE.erl @@ -20,10 +20,10 @@ %% -module(erl_match_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("erl_match_SUITE_data/match_test_cases.hrl"). --export([all/1, atoms/1, lists/1, tuples/1, references/1, pids/1, ports/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2, atoms/1, lists/1, tuples/1, references/1, pids/1, ports/1, bind/1, integers/1, floats/1, binaries/1, strings/1]). %% For interactive running of matcher. @@ -31,8 +31,19 @@ %% This test suite tests the erl_match() function. -all(suite) -> [atoms, lists, tuples, references, pids, ports, bind, - integers, floats, binaries, strings]. +all() -> +[atoms, lists, tuples, references, pids, ports, bind, + integers, floats, binaries, strings]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + atoms(suite) -> []; atoms(Config) when is_list(Config) -> diff --git a/lib/erl_interface/test/port_call_SUITE.erl b/lib/erl_interface/test/port_call_SUITE.erl index 55507b2a1b..3c1127bb18 100644 --- a/lib/erl_interface/test/port_call_SUITE.erl +++ b/lib/erl_interface/test/port_call_SUITE.erl @@ -31,13 +31,23 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --export([all/1, basic/1]). +-export([all/0,groups/0,init_per_group/2,end_per_group/2, basic/1]). % Private exports --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -all(suite) -> - [basic]. +all() -> +[basic]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + basic(suite) -> []; basic(Config) when is_list(Config) -> |