diff options
author | Lukas Larsson <[email protected]> | 2010-10-12 10:38:51 +0200 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2011-02-17 17:25:13 +0100 |
commit | 8bd07f450816eaaae52d28740d89ead1f930cd02 (patch) | |
tree | 0dd5bb7fdaa94978d9326c693f94bb992229b0c2 /lib/kernel/test/gen_sctp_SUITE.erl | |
parent | 670f41232381c6c1a47101349567caf9303dea8f (diff) | |
download | otp-8bd07f450816eaaae52d28740d89ead1f930cd02.tar.gz otp-8bd07f450816eaaae52d28740d89ead1f930cd02.tar.bz2 otp-8bd07f450816eaaae52d28740d89ead1f930cd02.zip |
Update kernel tests to conform with common_test standard
Diffstat (limited to 'lib/kernel/test/gen_sctp_SUITE.erl')
-rw-r--r-- | lib/kernel/test/gen_sctp_SUITE.erl | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/lib/kernel/test/gen_sctp_SUITE.erl b/lib/kernel/test/gen_sctp_SUITE.erl index 39db6ab81c..52f3a6b057 100644 --- a/lib/kernel/test/gen_sctp_SUITE.erl +++ b/lib/kernel/test/gen_sctp_SUITE.erl @@ -18,21 +18,51 @@ %% -module(gen_sctp_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include_lib("kernel/include/inet_sctp.hrl"). %%-compile(export_all). --export([all/1,init_per_testcase/2,end_per_testcase/2]). +-export([all/0,groups/0, + init_per_suite/1,end_per_suite/1, + init_per_group/2,end_per_group/2, + init_per_testcase/2, end_per_testcase/2]). -export( [basic/1, api_open_close/1,api_listen/1,api_connect_init/1,api_opts/1, xfer_min/1,xfer_active/1,def_sndrcvinfo/1,implicit_inet6/1]). -all(suite) -> - [basic, - api_open_close,api_listen,api_connect_init,api_opts, - xfer_min,xfer_active,def_sndrcvinfo,implicit_inet6]. +all() -> +[basic, api_open_close, api_listen, api_connect_init, + api_opts, xfer_min, xfer_active, def_sndrcvinfo, + implicit_inet6]. + +groups() -> + []. + +init_per_suite(Config) -> + try gen_sctp:open() of + {ok,Socket} -> + gen_sctp:close(Socket), + []; + _ -> + [] + catch + error:badarg -> + {skip,"SCTP not supported on this machine"}; + _:_ -> + Config + end. + +end_per_suite(_Conifig) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_testcase(_Func, Config) -> Dog = test_server:timetrap(test_server:seconds(15)), |