diff options
Diffstat (limited to 'lib/inets')
43 files changed, 794 insertions, 767 deletions
diff --git a/lib/inets/doc/src/http_client.xml b/lib/inets/doc/src/http_client.xml index 672ea3fa98..4542211d71 100644 --- a/lib/inets/doc/src/http_client.xml +++ b/lib/inets/doc/src/http_client.xml @@ -42,10 +42,10 @@ dynamically in runtime. Each client profile will spawn a new process to handle each request unless there is a possibility to use a persistent connection with or without pipelining. - The client will add a host header and an empty - te header if there are no such headers present in the request.</p> + The client will add a <c>host</c> header and an empty + <c>te</c> header if there are no such headers present in the request.</p> - <p>The clients supports ipv6 as long as the underlying mechanisms also do + <p>The client supports ipv6 as long as the underlying mechanisms also do so.</p> </section> @@ -87,7 +87,7 @@ httpc:request("http://www.erlang.org"). </code> <p>An ordinary asynchronous request. The result will be sent - to the calling process on the form {http, {ReqestId, Result}}</p> + to the calling process in the form <c>{http, {ReqestId, Result}}</c></p> <code type="erl"> 5 > {ok, RequestId} = httpc:request(get, {"http://www.erlang.org", []}, [], [{sync, false}]). diff --git a/lib/inets/doc/src/http_server.xml b/lib/inets/doc/src/http_server.xml index 68dfd1add0..47ed9cd229 100644 --- a/lib/inets/doc/src/http_server.xml +++ b/lib/inets/doc/src/http_server.xml @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="latin1" ?> +<?xml version="1.0" encoding="iso-8859-1" ?> <!DOCTYPE chapter SYSTEM "chapter.dtd"> <chapter> @@ -766,7 +766,7 @@ http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[ <code> -module(mnesia_test). -export([start/0,load_data/0]). --include("mod_auth.hrl"). +-include_lib("mod_auth.hrl"). first_start() -> mnesia:create_schema([node()]), diff --git a/lib/inets/doc/src/httpc.xml b/lib/inets/doc/src/httpc.xml index c20358178b..bcdd2913e0 100644 --- a/lib/inets/doc/src/httpc.xml +++ b/lib/inets/doc/src/httpc.xml @@ -36,7 +36,7 @@ <note> <p>When starting the Inets application a manager process for the default profile will be started. The functions in this API - that does not explicitly use a profile will accesses the + that do not explicitly use a profile will access the default profile. A profile keeps track of proxy options, cookies and other options that can be applied to more than one request. </p> @@ -117,7 +117,7 @@ ssl_options() = {verify, code()} | application or started dynamically in runtime by calling the inets application API <c>inets:start(httpc, ServiceConfig)</c>, or <c>inets:start(httpc, ServiceConfig, How)</c> - see <seealso marker="inets">inets(3)</seealso> Below follows a + see <seealso marker="inets">inets(3)</seealso>. Below follows a description of the available configuration options.</p> <taglist> <tag>{profile, profile()}</tag> @@ -129,8 +129,8 @@ ssl_options() = {verify, code()} | as session cookies.</item> </taglist> - <p>The client can be stopped using inets:stop(httpc, Pid) or - inets:stop(httpc, Profile).</p> + <p>The client can be stopped using <c>inets:stop(httpc, Pid)</c> or + <c>inets:stop(httpc, Profile)</c>.</p> <marker id="request1"></marker> </section> @@ -148,7 +148,7 @@ ssl_options() = {verify, code()} | <v>Reason = term() </v> </type> <desc> - <p>Equivalent to httpc:request(get, {Url, []}, [], []).</p> + <p>Equivalent to <c>httpc:request(get, {Url, []}, [], [])</c>.</p> <marker id="request2"></marker> </desc> @@ -201,7 +201,7 @@ ssl_options() = {verify, code()} | <desc> <p>Sends a HTTP-request. The function can be both synchronous and asynchronous. In the later case the function will return - {ok, RequestId} and later on the information will be delivered + <c>{ok, RequestId}</c> and later on the information will be delivered to the <c>receiver</c> depending on that value. </p> <p>Http option (<c>http_option()</c>) details: </p> @@ -209,7 +209,7 @@ ssl_options() = {verify, code()} | <tag><c><![CDATA[timeout]]></c></tag> <item> <p>Timeout time for the request. </p> - <p>The clock start ticking as soon as the request has been + <p>The clock starts ticking as soon as the request has been sent. </p> <p>Time is in milliseconds. </p> <p>Defaults to <c>infinity</c>. </p> @@ -246,11 +246,11 @@ ssl_options() = {verify, code()} | <tag><c><![CDATA[autoredirect]]></c></tag> <item> - <p>Should the client automatically retreive the information + <p>Should the client automatically retrieve the information from the new URI and return that as the result instead of a 30X-result code. </p> <p>Note that for some 30X-result codes automatic redirect - is not allowed in these cases the 30X-result will always + is not allowed. In these cases the 30X-result will always be returned. </p> <p>Defaults to <c>true</c>. </p> </item> @@ -267,12 +267,12 @@ ssl_options() = {verify, code()} | <c>HTTP/0.9</c> client. By default this is an <c>HTTP/1.1</c> client. When using <c>HTTP/1.0</c> persistent connections will not be used. </p> - <p>Defaults to the trsing <c>"HTTP/1.1"</c>. </p> + <p>Defaults to the string <c>"HTTP/1.1"</c>. </p> </item> <tag><c><![CDATA[relaxed]]></c></tag> <item> - <p>If set to true workarounds for known server deviations from + <p>If set to <c>true</c> workarounds for known server deviations from the HTTP-standard are enabled. </p> <p>Defaults to <c>false</c>. </p> </item> @@ -296,21 +296,21 @@ ssl_options() = {verify, code()} | <item> <p>Streams the body of a 200 or 206 response to the calling process or to a file. When streaming to the calling process - using the option <c>self</c> the the following stream messages - will be sent to that process: {http, {RequestId, + using the option <c>self</c> the following stream messages + will be sent to that process: <c>{http, {RequestId, stream_start, Headers}, {http, {RequestId, stream, - BinBodyPart}, {http, {RequestId, stream_end, Headers}. When + BinBodyPart}, {http, {RequestId, stream_end, Headers}</c>. When streaming to to the calling processes using the option <c>{self, once}</c> the first message will have an additional - element e.i. {http, {RequestId, stream_start, Headers, Pid}, + element e.i. <c>{http, {RequestId, stream_start, Headers, Pid}</c>, this is the process id that should be used as an argument to - http:stream_next/1 to trigger the next message to be sent to + <c>http:stream_next/1</c> to trigger the next message to be sent to the calling process. </p> <p>Note that it is possible that chunked encoding will add - headers so that there are more headers in the stream_end - message than in the stream_start. + headers so that there are more headers in the <c>stream_end</c> + message than in the <c>stream_start</c>. When streaming to a file and the request is asynchronous the - message {http, {RequestId, saved_to_file}} will be sent. </p> + message <c>{http, {RequestId, saved_to_file}}</c> will be sent. </p> <p>Defaults to <c>none</c>. </p> </item> @@ -338,7 +338,7 @@ ssl_options() = {verify, code()} | case insenstive. This feature should only be used if there is no other way to communicate with the server or for testing purpose. Also note that when this option is used no headers - will be automatically added, all necessary headers has to be + will be automatically added, all necessary headers have to be provided by the user. </p> <p>Defaults to <c>false</c>. </p> </item> @@ -354,16 +354,16 @@ ssl_options() = {verify, code()} | checked in any way. </p> <p>Note that this may change the socket behaviour (see <seealso marker="kernel:inet#setopts">inet:setopts/2</seealso>) - for an already existing, and therefor already connected + for an already existing one, and therefore an already connected request handler. </p> - <p>By defaults the socket options set by the + <p>By default the socket options set by the <seealso marker="#set_options">set_options/1,2</seealso> - function is used when establishing connection. </p> + function are used when establishing a connection. </p> </item> <tag><c><![CDATA[receiver]]></c></tag> <item> - <p>Defines how the client will deliver the result for a + <p>Defines how the client will deliver the result of an asynchroneous request (<c>sync</c> has the value <c>false</c>). </p> @@ -395,7 +395,7 @@ apply(Module, Function, [ReplyInfo | Args]) </item> </taglist> - <p>In all cases above, <c>ReplyInfo</c> has the following + <p>In all of the above cases, <c>ReplyInfo</c> has the following structure: </p> <pre> @@ -470,46 +470,46 @@ apply(Module, Function, [ReplyInfo | Args]) <v>IpDesc = string()</v> <d>ex: "134.138" or "[FEDC:BA98" (all IP-addresses starting with 134.138 or FEDC:BA98), "66.35.250.150" or "[2010:836B:4179::836B:4179]" (a complete IP-address).</d> <v>MaxSessions = integer() </v> - <d>Default is <em>2</em>. + <d>Default is <c>2</c>. Maximum number of persistent connections to a host.</d> <v>MaxKeepAlive = integer() </v> - <d>Default is <em>5</em>. + <d>Default is <c>5</c>. Maximum number of outstanding requests on the same connection to a host.</d> <v>KeepAliveTimeout = integer() </v> - <d>Default is <em>120000</em> (= 2 min). + <d>Default is <c>120000</c> (= 2 min). If a persistent connection is idle longer than the - keep_alive_timeout the client will close the connection. - The server may also have a such a time out but you should + <c>keep_alive_timeout</c> the client will close the connection. + The server may also have such a time out but you should not count on it!</d> <v>MaxPipeline = integer() </v> - <d>Default is <em>2</em>. + <d>Default is <c>2</c>. Maximum number of outstanding requests on a pipelined connection to a host.</d> <v>PipelineTimeout = integer() </v> - <d>Default is <em>0</em>, + <d>Default is <c>0</c>, which will result in pipelining not being used. If a persistent connection is idle longer than the - pipeline_timeout the client will close the connection. </d> + <c>pipeline_timeout</c> the client will close the connection. </d> <v>CookieMode = enabled | disabled | verify </v> - <d>Default is <em>disabled</em>. + <d>Default is <c>disabled</c>. If Cookies are enabled all valid cookies will automatically be saved in the client manager's cookie database. - If the option verify is used the function http:verify_cookie/2 - has to be called for the cookie to be saved.</d> + If the option <c>verify</c> is used the function <c>store_cookies/2</c> + has to be called for the cookies to be saved.</d> <v>IpFamily = inet | inet6 | inet6fb4 </v> - <d>By default <em>inet</em>. + <d>By default <c>inet</c>. When it is set to <c>inet6fb4</c> you can use both ipv4 and ipv6. It first tries <c>inet6</c> and if that does not works falls back to <c>inet</c>. The option is here to provide a workaround for buggy ipv6 stacks to ensure that ipv4 will always work.</d> <v>IpAddress = ip_address() </v> <d>If the host has several network interfaces, this option specifies which one to use. - See gen_tcp:connect/3,4 for more info. </d> + See <seealso marker="kernel:gen_tcp#connect">gen_tcp:connect/3,4</seealso> for more info. </d> <v>Port = integer() </v> <d>Specify which local port number to use. - See gen_tcp:connect/3,4 for more info. </d> + See <seealso marker="kernel:gen_tcp#connect">gen_tcp:connect/3,4</seealso> for more info. </d> <v>VerboseMode = false | verbose | debug | trace </v> - <d>Default is <em>false</em>. + <d>Default is <c>false</c>. This option is used to switch on (or off) different levels of erlang trace on the client. It is a debug feature.</d> @@ -523,14 +523,14 @@ apply(Module, Function, [ReplyInfo | Args]) alive and use persistent connections with or without pipeline depending on configuration and current circumstances. The HTTP/1.1 specification does not - provide a guideline for how many requests that would be + provide a guideline for how many requests would be ideal to be sent on a persistent connection, this very much depends on the application. Note that a very long queue of requests may cause a - user perceived delays as earlier request may take a long time + user perceived delay as earlier requests may take a long time to complete. The HTTP/1.1 specification does suggest a limit of 2 persistent connections per server, which is the - default value of the max_sessions option. </p> + default value of the <c>max_sessions</c> option. </p> </note> <marker id="stream_next"></marker> @@ -549,14 +549,14 @@ apply(Module, Function, [ReplyInfo | Args]) <p>Triggers the next message to be streamed, e.i. same behavior as active once for sockets.</p> - <marker id="verify_cookie"></marker> - <marker id="store_cookie"></marker> + <marker id="verify_cookies"></marker> + <marker id="store_cookies"></marker> </desc> </func> <func> - <name>store_cookie(SetCookieHeaders, Url) -> </name> - <name>store_cookie(SetCookieHeaders, Url, Profile) -> ok | {error, Reason}</name> + <name>store_cookies(SetCookieHeaders, Url) -> </name> + <name>store_cookies(SetCookieHeaders, Url, Profile) -> ok | {error, Reason}</name> <fsummary>Saves the cookies defined in SetCookieHeaders in the client profile's cookie database.</fsummary> <type> <v>SetCookieHeaders = headers() - where field = "set-cookie"</v> @@ -566,7 +566,7 @@ apply(Module, Function, [ReplyInfo | Args]) <desc> <p>Saves the cookies defined in SetCookieHeaders in the client profile's cookie database. You need to - call this function if you set the option cookies to <c>verify</c>. + call this function if you have set the option <c>cookies</c> to <c>verify</c>. If no profile is specified the default profile will be used. </p> @@ -576,16 +576,16 @@ apply(Module, Function, [ReplyInfo | Args]) <func> <name>cookie_header(Url) -> </name> - <name>cookie_header(Url, Profile) -> header() | {error, Rason}</name> + <name>cookie_header(Url, Profile) -> header() | {error, Reason}</name> <fsummary>Returns the cookie header that would be sent when - making a request to Url using the profile Profile.</fsummary> + making a request to Url using the profile <c>Profile</c>.</fsummary> <type> <v>Url = url()</v> <v>Profile = profile()</v> </type> <desc> <p>Returns the cookie header that would be sent - when making a request to Url using the profile Profile. + when making a request to <c>Url</c> using the profile <c>Profile</c>. If no profile is specified the default profile will be used. </p> @@ -602,7 +602,7 @@ apply(Module, Function, [ReplyInfo | Args]) <v>Profile = profile()</v> </type> <desc> - <p>Resets (clears) the cookie database for the specified Profile. + <p>Resets (clears) the cookie database for the specified <c>Profile</c>. If no profile is specified the default profile will be used. </p> </desc> diff --git a/lib/inets/include/mod_auth.hrl b/lib/inets/include/mod_auth.hrl new file mode 100644 index 0000000000..cf931e681a --- /dev/null +++ b/lib/inets/include/mod_auth.hrl @@ -0,0 +1,33 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 1998-2010. 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% +%% +%% + +-ifndef(mod_auth_hrl). +-define(mod_auth_hrl, true). + +-record(httpd_user, + {username, + password, + user_data}). + +-record(httpd_group, + {name, + userlist}). + +-endif. % -ifdef(mod_auth_hrl). diff --git a/lib/inets/src/http_client/httpc.erl b/lib/inets/src/http_client/httpc.erl index ae754fab94..04fae13b20 100644 --- a/lib/inets/src/http_client/httpc.erl +++ b/lib/inets/src/http_client/httpc.erl @@ -252,7 +252,7 @@ set_option(Key, Value, Profile) -> %% Description: Store the cookies from <SetCookieHeaders> %% in the cookie database %% for the profile <Profile>. This function shall be used when the option -%% cookie is set to verify. +%% cookies is set to verify. %%------------------------------------------------------------------------- store_cookies(SetCookieHeaders, Url) -> store_cookies(SetCookieHeaders, Url, default_profile()). diff --git a/lib/inets/src/http_server/Makefile b/lib/inets/src/http_server/Makefile index bdd8c5ee3c..55cc68dede 100644 --- a/lib/inets/src/http_server/Makefile +++ b/lib/inets/src/http_server/Makefile @@ -82,9 +82,7 @@ MODULES = \ mod_security \ mod_security_server -INCLUDE = ../../include - -HRL_FILES = $(INCLUDE)/httpd.hrl httpd_internal.hrl mod_auth.hrl +HRL_FILES = httpd.hrl httpd_internal.hrl mod_auth.hrl ERL_FILES = $(MODULES:%=%.erl) @@ -100,7 +98,6 @@ include ../inets_app/inets.mk ERL_COMPILE_FLAGS += \ $(INETS_FLAGS) \ $(INETS_ERL_COMPILE_FLAGS) \ - -I$(INCLUDE) \ -I../inets_app \ -I../http_lib \ diff --git a/lib/inets/src/http_server/httpd.hrl b/lib/inets/src/http_server/httpd.hrl new file mode 100644 index 0000000000..4eba833e2c --- /dev/null +++ b/lib/inets/src/http_server/httpd.hrl @@ -0,0 +1,27 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 1997-2010. 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% +%% +%% This is a simple wrapper for code that has not been updated to +%% handle the move of this file to the include dir. + +-ifndef(src_httpd_hrl). +-define(src_httpd_hrl, true). + +-include_lib("inets/include/httpd.hrl"). + +-endif. % -ifdef(src_httpd_hrl). diff --git a/lib/inets/src/http_server/mod_auth.hrl b/lib/inets/src/http_server/mod_auth.hrl index 9b316cecc4..674e6d1652 100644 --- a/lib/inets/src/http_server/mod_auth.hrl +++ b/lib/inets/src/http_server/mod_auth.hrl @@ -1,29 +1,27 @@ %% %% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1998-2009. All Rights Reserved. -%% +%% +%% Copyright Ericsson AB 1997-2010. 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% %% +%% %CopyrightEnd% %% +%% This is a simple wrapper for code that has not been updated to +%% handle the move of this file to the include dir. + +-ifndef(src_mod_auth_hrl). +-define(src_mod_auth_hrl, true). --record(httpd_user, - {username, - password, - user_data}). +-include_lib("inets/include/mod_auth.hrl"). --record(httpd_group, - {name, - userlist}). - +-endif. % -ifdef(src_mod_auth_hrl). diff --git a/lib/inets/src/inets_app/Makefile b/lib/inets/src/inets_app/Makefile index 4632ff3b68..20e22917e2 100644 --- a/lib/inets/src/inets_app/Makefile +++ b/lib/inets/src/inets_app/Makefile @@ -47,7 +47,9 @@ MODULES = \ inets_sup \ inets_regexp -HRL_FILES = inets_internal.hrl +INTERNAL_HRL_FILES = inets_internal.hrl +EXTERNAL_HRL_FILES = ../../include/httpd.hrl \ + ../../include/mod_auth.hrl ERL_FILES = $(MODULES:%=%.erl) @@ -74,8 +76,7 @@ include inets.mk ERL_COMPILE_FLAGS += \ $(INETS_FLAGS) \ - $(INETS_ERL_COMPILE_FLAGS) \ - -I../../include + $(INETS_ERL_COMPILE_FLAGS) # ---------------------------------------------------- @@ -110,7 +111,9 @@ include $(ERL_TOP)/make/otp_release_targets.mk release_spec: opt $(INSTALL_DIR) $(RELSYSDIR)/src $(INSTALL_DIR) $(RELSYSDIR)/src/inets_app - $(INSTALL_DATA) $(HRL_FILES) $(ERL_FILES) $(RELSYSDIR)/src/inets_app + $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(ERL_FILES) $(RELSYSDIR)/src/inets_app + $(INSTALL_DIR) $(RELSYSDIR)/include + $(INSTALL_DATA) $(EXTERNAL_HRL_FILES) $(RELSYSDIR)/include $(INSTALL_DIR) $(RELSYSDIR)/ebin $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin diff --git a/lib/inets/test/Makefile b/lib/inets/test/Makefile index 0492d33eab..4b803cfbe2 100644 --- a/lib/inets/test/Makefile +++ b/lib/inets/test/Makefile @@ -200,7 +200,8 @@ SOURCE = $(ERL_FILES) $(HRL_FILES) TARGET_FILES = $(MODULES:%=$(EBIN)/%.$(EMULATOR)) -INETS_SPECS = inets.spec inets.spec.vxworks +INETS_SPECS = inets.spec +COVER_FILE = inets.cover INETS_FILES = inets.config $(INETS_SPECS) # SUB_SUITES = \ @@ -222,10 +223,10 @@ MAKE_EMAKE = $(wildcard $(ERL_TOP)/make/make_emakefile) ifeq ($(MAKE_EMAKE),) BUILDTARGET = $(TARGET_FILES) -RELTEST_FILES = $(INETS_SPECS) $(SOURCE) +RELTEST_FILES = $(COVER_FILE) $(INETS_SPECS) $(SOURCE) else BUILDTARGET = emakebuild -RELTEST_FILES = $(EMAKEFILE) $(INETS_SPECS) $(SOURCE) +RELTEST_FILES = $(EMAKEFILE) $(COVER_FILE) $(INETS_SPECS) $(SOURCE) endif diff --git a/lib/inets/test/ftp_SUITE.erl b/lib/inets/test/ftp_SUITE.erl index e7404f945b..7059bb12cf 100644 --- a/lib/inets/test/ftp_SUITE.erl +++ b/lib/inets/test/ftp_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -20,29 +20,14 @@ -module(ftp_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("test_server_line.hrl"). %% Test server specific exports --export([all/1]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]). % -export([init_per_testcase/2, end_per_testcase/2]). -export([init_per_suite/1, end_per_suite/1]). -%% Test cases must be exported. --export([solaris8_test/1, - solaris9_test/1, - solaris10_test/1, - linux_x86_test/1, - linux_ppc_test/1, - macosx_x86_test/1, - macosx_ppc_test/1, - openbsd_test/1, - freebsd_test/1, - netbsd_test/1, - windows_xp_test/1, - windows_2003_server_test/1, - ticket_tests/1]). - -define(FTP_USER, "anonymous"). -define(FTP_PASS, passwd()). -define(FTP_PORT, 21). @@ -72,52 +57,44 @@ %% Description: Returns documentation/test cases in this test suite %% or a skip tuple if the platform is not supported. %%-------------------------------------------------------------------- -all(doc) -> - ["Test the ftp client in the inets application."]; -all(suite) -> - [ - solaris8_test, - solaris9_test, - solaris10_test, - linux_x86_test, - linux_ppc_test, - macosx_x86_test, - macosx_ppc_test, - openbsd_test, - freebsd_test, - netbsd_test, - windows_xp_test, - windows_2003_server_test, - ticket_tests - ]. - -solaris8_test(suite) -> - [{ftp_solaris8_sparc_test,all}]. -solaris9_test(suite) -> - [{ftp_solaris9_sparc_test,all}]. -solaris10_test(suite) -> - [{ftp_solaris10_sparc_test,all}, {ftp_solaris10_x86_test,all}]. -linux_x86_test(suite) -> - [{ftp_linux_x86_test,all}]. -linux_ppc_test(suite) -> - [{ftp_linux_ppc_test,all}]. -macosx_x86_test(suite) -> - [{ftp_macosx_x86_test,all}]. -macosx_ppc_test(suite) -> - [{ftp_macosx_ppc_test,all}]. -openbsd_test(suite) -> - [{ftp_openbsd_x86_test,all}]. -freebsd_test(suite) -> - [{ftp_freebsd_x86_test,all}]. -netbsd_test(suite) -> - [{ftp_netbsd_x86_test,all}]. -windows_xp_test(suite) -> - [{ftp_windows_xp_test,all}]. -windows_2003_server_test(suite) -> - [{ftp_windows_2003_server_test,all}]. - -ticket_tests(suite) -> - [{ftp_ticket_test, all}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [{group, solaris8_test}, {group, solaris9_test}, + {group, solaris10_test}, {group, linux_x86_test}, + {group, linux_ppc_test}, {group, macosx_x86_test}, + {group, macosx_ppc_test}, {group, openbsd_test}, + {group, freebsd_test}, {group, netbsd_test}, + {group, windows_xp_test}, + {group, windows_2003_server_test}, + {group, ticket_tests}]. + +groups() -> + [{solaris8_test, [], [{ftp_solaris8_sparc_test, all}]}, + {solaris9_test, [], [{ftp_solaris9_sparc_test, all}]}, + {solaris10_test, [], + [{ftp_solaris10_sparc_test, all}, + {ftp_solaris10_x86_test, all}]}, + {linux_x86_test, [], [{ftp_linux_x86_test, all}]}, + {linux_ppc_test, [], [{ftp_linux_ppc_test, all}]}, + {macosx_x86_test, [], [{ftp_macosx_x86_test, all}]}, + {macosx_ppc_test, [], [{ftp_macosx_ppc_test, all}]}, + {openbsd_test, [], [{ftp_openbsd_x86_test, all}]}, + {freebsd_test, [], [{ftp_freebsd_x86_test, all}]}, + {netbsd_test, [], [{ftp_netbsd_x86_test, all}]}, + {windows_xp_test, [], [{ftp_windows_xp_test, all}]}, + {windows_2003_server_test, [], + [{ftp_windows_2003_server_test, all}]}, + {ticket_tests, [], [{ftp_ticket_test, all}]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + + %%-------------------------------------------------------------------- %% Function: init_per_suite(Config) -> Config diff --git a/lib/inets/test/ftp_format_SUITE.erl b/lib/inets/test/ftp_format_SUITE.erl index 9ca6575b2d..3a8cb9a3d0 100644 --- a/lib/inets/test/ftp_format_SUITE.erl +++ b/lib/inets/test/ftp_format_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -20,23 +20,44 @@ -module(ftp_format_SUITE). -author('[email protected]'). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("test_server_line.hrl"). -include("ftp_internal.hrl"). %% Test server specific exports --export([all/1, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/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]). %% Test cases must be exported. --export([ftp_response/1, ftp_150/1, - ftp_200/1, ftp_220/1, ftp_226/1, ftp_257/1, ftp_331/1, ftp_425/1, - ftp_other_status_codes/1, ftp_multiple_lines/1, - ftp_multipel_ctrl_messages/1, format_error/1]). +-export([ ftp_150/1, + ftp_200/1, ftp_220/1, ftp_226/1, ftp_257/1, ftp_331/1, ftp_425/1, + ftp_other_status_codes/1, ftp_multiple_lines/1, + ftp_multipel_ctrl_messages/1, format_error/1]). + +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [{group, ftp_response}, format_error]. + +groups() -> + [{ftp_response, [], + [ftp_150, ftp_200, ftp_220, ftp_226, ftp_257, ftp_331, + ftp_425, ftp_other_status_codes, ftp_multiple_lines, + ftp_multipel_ctrl_messages]}]. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(doc) -> - ["Test library functions for the ftp client."]; -all(suite) -> - [ftp_response, format_error]. init_per_testcase(_, Config) -> Dog = test_server:timetrap(?t:minutes(1)), @@ -51,14 +72,6 @@ end_per_testcase(_, Config) -> %%------------------------------------------------------------------------- %% Test cases starts here. %%------------------------------------------------------------------------- -ftp_response(doc) -> - ["Test ftp_response:parse_lines/3 and ftp_response:interpret/1." - " This test case will simulate that the " - "message will be recived a little at the time on a socket and the " - "package may be broken up into smaller parts at arbitrary point."]; -ftp_response(suite) -> - [ftp_150, ftp_200, ftp_220, ftp_226, ftp_257, ftp_331, ftp_425, - ftp_other_status_codes, ftp_multiple_lines, ftp_multipel_ctrl_messages]. ftp_150(doc) -> ["Especially check that respons can be devided in a random place."]; diff --git a/lib/inets/test/ftp_freebsd_x86_test.erl b/lib/inets/test/ftp_freebsd_x86_test.erl index 457e18ffbe..1d66779882 100644 --- a/lib/inets/test/ftp_freebsd_x86_test.erl +++ b/lib/inets/test/ftp_freebsd_x86_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -86,23 +86,30 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. %%-------------------------------------------------------------------- open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_linux_ppc_test.erl b/lib/inets/test/ftp_linux_ppc_test.erl index ad38137678..bba97237f1 100644 --- a/lib/inets/test/ftp_linux_ppc_test.erl +++ b/lib/inets/test/ftp_linux_ppc_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -23,7 +23,7 @@ %% Note: This directive should only be used in test suites. -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -87,23 +87,30 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. %%-------------------------------------------------------------------- open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_linux_x86_test.erl b/lib/inets/test/ftp_linux_x86_test.erl index b9c88d121a..bbefd8231e 100644 --- a/lib/inets/test/ftp_linux_x86_test.erl +++ b/lib/inets/test/ftp_linux_x86_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -86,30 +86,30 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; - -all(suite) -> - [ - open, - open_port, - passive, - active, - api_missuse, - not_owner, - progress_report - ]. +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% Test cases starts here. %%-------------------------------------------------------------------- open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_macosx_ppc_test.erl b/lib/inets/test/ftp_macosx_ppc_test.erl index cf548a73c0..c9f33b8beb 100644 --- a/lib/inets/test/ftp_macosx_ppc_test.erl +++ b/lib/inets/test/ftp_macosx_ppc_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -87,21 +87,28 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> +[open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_macosx_x86_test.erl b/lib/inets/test/ftp_macosx_x86_test.erl index 5566d4feaa..17b7160b95 100644 --- a/lib/inets/test/ftp_macosx_x86_test.erl +++ b/lib/inets/test/ftp_macosx_x86_test.erl @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -86,22 +86,29 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> +[open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. %%-------------------------------------------------------------------- open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_netbsd_x86_test.erl b/lib/inets/test/ftp_netbsd_x86_test.erl index a5711b7bde..bb474852c5 100644 --- a/lib/inets/test/ftp_netbsd_x86_test.erl +++ b/lib/inets/test/ftp_netbsd_x86_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -86,22 +86,29 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. %%-------------------------------------------------------------------- open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_openbsd_x86_test.erl b/lib/inets/test/ftp_openbsd_x86_test.erl index 4833b6332b..54fce702a0 100644 --- a/lib/inets/test/ftp_openbsd_x86_test.erl +++ b/lib/inets/test/ftp_openbsd_x86_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -23,7 +23,7 @@ %% Note: This directive should only be used in test suites. -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -87,23 +87,30 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. %%-------------------------------------------------------------------- open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_solaris10_sparc_test.erl b/lib/inets/test/ftp_solaris10_sparc_test.erl index 6066195f9b..0da50dc91b 100644 --- a/lib/inets/test/ftp_solaris10_sparc_test.erl +++ b/lib/inets/test/ftp_solaris10_sparc_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -87,23 +87,30 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. %%-------------------------------------------------------------------- open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_solaris10_x86_test.erl b/lib/inets/test/ftp_solaris10_x86_test.erl index 3bd99fc3f2..3e7045bb4d 100644 --- a/lib/inets/test/ftp_solaris10_x86_test.erl +++ b/lib/inets/test/ftp_solaris10_x86_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2009. All Rights Reserved. +%% Copyright Ericsson AB 2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD, ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_), ?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -88,23 +88,30 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. %%-------------------------------------------------------------------- open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_solaris8_sparc_test.erl b/lib/inets/test/ftp_solaris8_sparc_test.erl index 9764071cd9..23dbfc8fe3 100644 --- a/lib/inets/test/ftp_solaris8_sparc_test.erl +++ b/lib/inets/test/ftp_solaris8_sparc_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -86,22 +86,29 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_solaris9_sparc_test.erl b/lib/inets/test/ftp_solaris9_sparc_test.erl index a9f77bbdac..896e2f497f 100644 --- a/lib/inets/test/ftp_solaris9_sparc_test.erl +++ b/lib/inets/test/ftp_solaris9_sparc_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -85,22 +85,29 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl index c539b7c17c..5ae0298b29 100644 --- a/lib/inets/test/ftp_suite_lib.erl +++ b/lib/inets/test/ftp_suite_lib.erl @@ -21,8 +21,8 @@ -module(ftp_suite_lib). --include("test_server.hrl"). --include("test_server_line.hrl"). +-include_lib("test_server/include/test_server.hrl"). +-include_lib("test_server/include/test_server_line.hrl"). -include("inets_test_lib.hrl"). %% Test server specific exports @@ -74,7 +74,7 @@ tickets(suite) -> ftpd_init(FtpdTag, Config) -> %% Get the host name(s) of FTP server Hosts = - case ?config(ftpd_hosts, Config) of + case ct:get_config(ftpd_hosts) of undefined -> ftpd_hosts(data_dir(Config)); H -> @@ -129,7 +129,7 @@ get_ftpd_host([Host|Hosts]) -> dirty_select_ftpd_host(Config) -> Hosts = - case ?config(ftpd_hosts, Config) of + case ct:get_config(ftpd_hosts) of undefined -> ftpd_hosts(data_dir(Config)); H -> diff --git a/lib/inets/test/ftp_ticket_test.erl b/lib/inets/test/ftp_ticket_test.erl index 6748df03bb..fe4ab35728 100644 --- a/lib/inets/test/ftp_ticket_test.erl +++ b/lib/inets/test/ftp_ticket_test.erl @@ -35,17 +35,27 @@ end_per_testcase(Case, Config) -> ftp_suite_lib:end_per_testcase(Case, Config). -all(suite) -> - {conf,init,tickets(),fin}. +all() -> + tickets(). -init(Config) -> +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + +init_per_suite(Config) -> ?LIB_MOD:ftpd_init(ticket_test, Config). -tickets() -> +tickets() -> [ticket_6035]. -fin(Config) -> +end_per_suite(Config) -> ?LIB_MOD:ftpd_fin(Config). ticket_6035(X) -> ?LIB_MOD:ticket_6035(X). diff --git a/lib/inets/test/ftp_windows_2003_server_test.erl b/lib/inets/test/ftp_windows_2003_server_test.erl index d24318d04f..57f1ae8358 100644 --- a/lib/inets/test/ftp_windows_2003_server_test.erl +++ b/lib/inets/test/ftp_windows_2003_server_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -86,22 +86,29 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. %% Test cases starts here. open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/ftp_windows_xp_test.erl b/lib/inets/test/ftp_windows_xp_test.erl index bc161e4f6a..06d919ba00 100644 --- a/lib/inets/test/ftp_windows_xp_test.erl +++ b/lib/inets/test/ftp_windows_xp_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 @@ -22,7 +22,7 @@ -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -define(LIB_MOD,ftp_suite_lib). -define(CASE_WRAPPER(_A_,_B_,_C_),?LIB_MOD:wrapper(_A_,_B_,_C_)). @@ -86,20 +86,27 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test ftp client"]; +all() -> + [open, open_port, {group, passive}, {group, active}, + api_missuse, not_owner, {group, progress_report}]. + +groups() -> + [{passive, [], ftp_suite_lib:passive(suite)}, + {active, [], ftp_suite_lib:active(suite)}, + {progress_report, [], + ftp_suite_lib:progress_report(suite)}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [open, open_port, passive, active, api_missuse, - not_owner, progress_report]. open(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open/1). open_port(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:open_port/1). -passive(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:passive/1). -active(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:active/1). api_missuse(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:api_missuse/1). not_owner(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:not_owner/1). -progress_report(X) -> ?CASE_WRAPPER(?PLATFORM,X,fun ?LIB_MOD:progress_report/1). passive_user(X) -> ?LIB_MOD:passive_user(X). passive_pwd(X) -> ?LIB_MOD:passive_pwd(X). diff --git a/lib/inets/test/http_format_SUITE.erl b/lib/inets/test/http_format_SUITE.erl index 79945f0f4d..f05dfd78bc 100644 --- a/lib/inets/test/http_format_SUITE.erl +++ b/lib/inets/test/http_format_SUITE.erl @@ -21,28 +21,49 @@ -module(http_format_SUITE). -author('[email protected]'). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("test_server_line.hrl"). -include("http_internal.hrl"). %% Test server specific exports --export([all/1, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/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]). %% Test cases must be exported. --export([chunk/1, chunk_decode/1, chunk_encode/1, - chunk_extensions_otp_6005/1, chunk_decode_otp_6264/1, - chunk_decode_empty_chunk_otp_6511/1, - chunk_decode_trailer/1, - http_response/1, http_request/1, validate_request_line/1, script/1, - esi_parse_headers/1, cgi_parse_headers/1, - is_absolut_uri/1, convert_netscapecookie_date/1]). - -all(doc) -> - ["Test library functions to the http client and server."]; -all(suite) -> - [chunk, - http_response, http_request, validate_request_line, - script, is_absolut_uri, convert_netscapecookie_date]. +-export([ chunk_decode/1, chunk_encode/1, + chunk_extensions_otp_6005/1, chunk_decode_otp_6264/1, + chunk_decode_empty_chunk_otp_6511/1, + chunk_decode_trailer/1, + http_response/1, http_request/1, validate_request_line/1, + esi_parse_headers/1, cgi_parse_headers/1, + is_absolut_uri/1, convert_netscapecookie_date/1]). + +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [{group, chunk}, http_response, http_request, + validate_request_line, {group, script}, is_absolut_uri, + convert_netscapecookie_date]. + +groups() -> + [{script, [], [esi_parse_headers, cgi_parse_headers]}, + {chunk, [], + [chunk_decode, chunk_encode, chunk_extensions_otp_6005, + chunk_decode_otp_6264, + chunk_decode_empty_chunk_otp_6511, + chunk_decode_trailer]}]. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + init_per_testcase(_, Config) -> Dog = test_server:timetrap(?t:minutes(1)), @@ -57,17 +78,7 @@ end_per_testcase(_, Config) -> %%------------------------------------------------------------------------- %% Test cases starts here. %%------------------------------------------------------------------------- -script(doc) -> - ["Test header parsing in esi/cgi functionality."]; -script(suite) -> - [esi_parse_headers, cgi_parse_headers]. - -chunk(doc) -> - ["Test chunk encoding"]; -chunk(suite) -> - [chunk_decode, chunk_encode, chunk_extensions_otp_6005, - chunk_decode_otp_6264, chunk_decode_empty_chunk_otp_6511, - chunk_decode_trailer]. + %%------------------------------------------------------------------------- chunk_decode(doc) -> diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index 94d5a48ef6..7aa11ebc27 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -24,7 +24,7 @@ -module(httpc_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("test_server_line.hrl"). -include_lib("kernel/include/file.hrl"). @@ -59,64 +59,47 @@ %% or a skip tuple if the platform is not supported. %%-------------------------------------------------------------------- -all(doc) -> - ["Test the http client in the intes application."]; -all(suite) -> - [ - proxy_options, - proxy_head, - proxy_get, - proxy_trace, - proxy_post, - proxy_put, - proxy_delete, - proxy_auth, - proxy_headers, - proxy_emulate_lower_versions, - http_options, - http_head, - http_get, - http_post, - http_dummy_pipe, - http_inets_pipe, - http_trace, - http_async, - http_save_to_file, - http_save_to_file_async, - http_headers, - http_headers_dummy, - http_bad_response, - ssl_head, - ossl_head, - essl_head, - ssl_get, - ossl_get, - essl_get, - ssl_trace, - ossl_trace, - essl_trace, - http_redirect, - http_redirect_loop, - http_internal_server_error, - http_userinfo, - http_cookie, - http_server_does_not_exist, - http_invalid_http, - http_emulate_lower_versions, - http_relaxed, - page_does_not_exist, - proxy_page_does_not_exist, - proxy_https_not_supported, - http_stream, - http_stream_once, - proxy_stream, - parse_url, - options, - ipv6, - headers_as_is, - tickets - ]. - +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [proxy_options, proxy_head, proxy_get, proxy_trace, + proxy_post, proxy_put, proxy_delete, proxy_auth, + proxy_headers, proxy_emulate_lower_versions, + http_options, http_head, http_get, http_post, + http_dummy_pipe, http_inets_pipe, http_trace, + http_async, http_save_to_file, http_save_to_file_async, + http_headers, http_headers_dummy, http_bad_response, + ssl_head, ossl_head, essl_head, ssl_get, ossl_get, + essl_get, ssl_trace, ossl_trace, essl_trace, + http_redirect, http_redirect_loop, + http_internal_server_error, http_userinfo, http_cookie, + http_server_does_not_exist, http_invalid_http, + http_emulate_lower_versions, http_relaxed, + page_does_not_exist, proxy_page_does_not_exist, + proxy_https_not_supported, http_stream, + http_stream_once, proxy_stream, parse_url, options, + ipv6, headers_as_is, {group, tickets}]. + +groups() -> + [{tickets, [], + [hexed_query_otp_6191, empty_body_otp_6243, + empty_response_header_otp_6830, + transfer_encoding_otp_6807, proxy_not_modified_otp_6821, + no_content_204_otp_6982, missing_CR_otp_7304, + {group, otp_7883}, {group, otp_8154}, {group, otp_8106}, + otp_8056, otp_8352, otp_8371, otp_8739]}, + {otp_7883, [], [otp_7883_1, otp_7883_2]}, + {otp_8154, [], [otp_8154_1]}, + {otp_8106, [], + [otp_8106_pid, otp_8106_fun, otp_8106_mfa]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + %%-------------------------------------------------------------------- %% Function: init_per_suite(Config) -> Config %% Config - [tuple()] @@ -228,6 +211,8 @@ init_per_testcase(Case, Timeout, Config) -> tsp("init_per_testcase -> [proxy case] start inets"), inets:start(), tsp("init_per_testcase -> [proxy case] start ssl"), + application:start(crypto), + application:start(public_key), case (catch application:start(ssl)) of ok -> [{watchdog, Dog} | TmpConfig]; @@ -295,25 +280,6 @@ finish(Config) -> %% Test cases starts here. %%------------------------------------------------------------------------- -tickets(doc) -> - ["."]; -tickets(suite) -> - [ - hexed_query_otp_6191, - empty_body_otp_6243, - empty_response_header_otp_6830, - transfer_encoding_otp_6807, - proxy_not_modified_otp_6821, - no_content_204_otp_6982, - missing_CR_otp_7304, - otp_7883, - otp_8154, - otp_8106, - otp_8056, - otp_8352, - otp_8371, - otp_8739 - ]. %%------------------------------------------------------------------------- @@ -1771,6 +1737,8 @@ parse_url(Config) when is_list(Config) -> %%------------------------------------------------------------------------- +ipv6() -> + [{require,ipv6_hosts}]. ipv6(doc) -> ["Test ipv6."]; ipv6(suite) -> @@ -1779,7 +1747,7 @@ ipv6(Config) when is_list(Config) -> {ok, Hostname} = inet:gethostname(), case lists:member(list_to_atom(Hostname), - ?config(ipv6_hosts, Config)) of + ct:get_config(ipv6_hosts)) of true -> {DummyServerPid, Port} = dummy_server(self(), ipv6), @@ -1979,8 +1947,6 @@ missing_CR_otp_7304(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -otp_7883(suite) -> - [otp_7883_1, otp_7883_2]. otp_7883_1(doc) -> ["OTP-7883-sync"]; @@ -2028,8 +1994,6 @@ otp_7883_2(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -otp_8154(suite) -> - [otp_8154_1]. otp_8154_1(doc) -> ["OTP-8154"]; @@ -2309,12 +2273,6 @@ f(F, A) -> lists:flatten(io_lib:format(F,A)). %%------------------------------------------------------------------------- -otp_8106(suite) -> - [ - otp_8106_pid, - otp_8106_fun, - otp_8106_mfa - ]. otp_8106_pid(doc) -> diff --git a/lib/inets/test/httpc_cookie_SUITE.erl b/lib/inets/test/httpc_cookie_SUITE.erl index ad5df656c6..a9eddac6eb 100644 --- a/lib/inets/test/httpc_cookie_SUITE.erl +++ b/lib/inets/test/httpc_cookie_SUITE.erl @@ -19,11 +19,11 @@ %% -module(httpc_cookie_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include_lib("stdlib/include/ms_transform.hrl"). %% Test server specific exports --export([all/1, init_per_testcase/2, end_per_testcase/2]). +-export([all/0, suite/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]). %% Test cases must be exported. -export([session_cookies_only/1, netscape_cookies/1, @@ -116,22 +116,29 @@ end_per_testcase(Case, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Describe the main purpose of this suite"]; - -all(suite) -> - [ - session_cookies_only, - netscape_cookies, - cookie_cancel, - cookie_expires, - persistent_cookie, - domain_cookie, - secure_cookie, - update_cookie, - update_cookie_session, - cookie_attributes - ]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [session_cookies_only, netscape_cookies, cookie_cancel, + cookie_expires, persistent_cookie, domain_cookie, + secure_cookie, update_cookie, update_cookie_session, + cookie_attributes]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% Test cases starts here. %%-------------------------------------------------------------------- diff --git a/lib/inets/test/httpd_1_1.erl b/lib/inets/test/httpd_1_1.erl index 055d034bec..2a6110e3ea 100644 --- a/lib/inets/test/httpd_1_1.erl +++ b/lib/inets/test/httpd_1_1.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl index 3255cbec06..95ee15d08f 100644 --- a/lib/inets/test/httpd_SUITE.erl +++ b/lib/inets/test/httpd_SUITE.erl @@ -20,28 +20,17 @@ -module(httpd_SUITE). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("test_server_line.hrl"). -include("inets_test_lib.hrl"). -include_lib("kernel/include/file.hrl"). %% Test server specific exports --export([all/1]). +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]). -export([init_per_testcase/2, end_per_testcase/2, init_per_suite/1, end_per_suite/1]). -%% Test cases must be exported. --export([ - ip/1, - ssl/1, pssl/1, ossl/1, essl/1, - http_1_1_ip/1, - http_1_0_ip/1, - http_0_9_ip/1, - ipv6/1, - tickets/1 - ]). - %% Core Server tests -export([ ip_mod_alias/1, @@ -249,19 +238,109 @@ %% Description: Returns documentation/test cases in this test suite %% or a skip tuple if the platform is not supported. %%-------------------------------------------------------------------- -all(doc) -> - ["Test the http server in the intes application."]; -all(suite) -> - [ - ip, - ssl, - http_1_1_ip, - http_1_0_ip, - http_0_9_ip, - %% ipv6, - tickets - ]. - +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [{group, ip}, {group, ssl}, {group, http_1_1_ip}, + {group, http_1_0_ip}, {group, http_0_9_ip}, + {group, tickets}]. + +groups() -> + [{ip, [], + [ip_mod_alias, ip_mod_actions, ip_mod_security, + ip_mod_auth, ip_mod_auth_api, ip_mod_auth_mnesia_api, + ip_mod_htaccess, ip_mod_cgi, ip_mod_esi, ip_mod_get, + ip_mod_head, ip_mod_all, ip_load_light, ip_load_medium, + ip_load_heavy, ip_dos_hostname, ip_time_test, + ip_restart_no_block, ip_restart_disturbing_block, + ip_restart_non_disturbing_block, + ip_block_disturbing_idle, ip_block_non_disturbing_idle, + ip_block_503, ip_block_disturbing_active, + ip_block_non_disturbing_active, + ip_block_disturbing_active_timeout_not_released, + ip_block_disturbing_active_timeout_released, + ip_block_non_disturbing_active_timeout_not_released, + ip_block_non_disturbing_active_timeout_released, + ip_block_disturbing_blocker_dies, + ip_block_non_disturbing_blocker_dies]}, + {ssl, [], + [{group, pssl}, {group, ossl}, {group, essl}]}, + {pssl, [], + [pssl_mod_alias, pssl_mod_actions, pssl_mod_security, + pssl_mod_auth, pssl_mod_auth_api, + pssl_mod_auth_mnesia_api, pssl_mod_htaccess, + pssl_mod_cgi, pssl_mod_esi, pssl_mod_get, pssl_mod_head, + pssl_mod_all, pssl_load_light, pssl_load_medium, + pssl_load_heavy, pssl_dos_hostname, pssl_time_test, + pssl_restart_no_block, pssl_restart_disturbing_block, + pssl_restart_non_disturbing_block, + pssl_block_disturbing_idle, + pssl_block_non_disturbing_idle, pssl_block_503, + pssl_block_disturbing_active, + pssl_block_non_disturbing_active, + pssl_block_disturbing_active_timeout_not_released, + pssl_block_disturbing_active_timeout_released, + pssl_block_non_disturbing_active_timeout_not_released, + pssl_block_non_disturbing_active_timeout_released, + pssl_block_disturbing_blocker_dies, + pssl_block_non_disturbing_blocker_dies]}, + {ossl, [], + [ossl_mod_alias, ossl_mod_actions, ossl_mod_security, + ossl_mod_auth, ossl_mod_auth_api, + ossl_mod_auth_mnesia_api, ossl_mod_htaccess, + ossl_mod_cgi, ossl_mod_esi, ossl_mod_get, ossl_mod_head, + ossl_mod_all, ossl_load_light, ossl_load_medium, + ossl_load_heavy, ossl_dos_hostname, ossl_time_test, + ossl_restart_no_block, ossl_restart_disturbing_block, + ossl_restart_non_disturbing_block, + ossl_block_disturbing_idle, + ossl_block_non_disturbing_idle, ossl_block_503, + ossl_block_disturbing_active, + ossl_block_non_disturbing_active, + ossl_block_disturbing_active_timeout_not_released, + ossl_block_disturbing_active_timeout_released, + ossl_block_non_disturbing_active_timeout_not_released, + ossl_block_non_disturbing_active_timeout_released, + ossl_block_disturbing_blocker_dies, + ossl_block_non_disturbing_blocker_dies]}, + {essl, [], + [essl_mod_alias, essl_mod_actions, essl_mod_security, + essl_mod_auth, essl_mod_auth_api, + essl_mod_auth_mnesia_api, essl_mod_htaccess, + essl_mod_cgi, essl_mod_esi, essl_mod_get, essl_mod_head, + essl_mod_all, essl_load_light, essl_load_medium, + essl_load_heavy, essl_dos_hostname, essl_time_test, + essl_restart_no_block, essl_restart_disturbing_block, + essl_restart_non_disturbing_block, + essl_block_disturbing_idle, + essl_block_non_disturbing_idle, essl_block_503, + essl_block_disturbing_active, + essl_block_non_disturbing_active, + essl_block_disturbing_active_timeout_not_released, + essl_block_disturbing_active_timeout_released, + essl_block_non_disturbing_active_timeout_not_released, + essl_block_non_disturbing_active_timeout_released, + essl_block_disturbing_blocker_dies, + essl_block_non_disturbing_blocker_dies]}, + {http_1_1_ip, [], + [ip_host, ip_chunked, ip_expect, ip_range, ip_if_test, + ip_http_trace, ip_http1_1_head, + ip_mod_cgi_chunked_encoding_test]}, + {http_1_0_ip, [], + [ip_head_1_0, ip_get_1_0, ip_post_1_0]}, + {http_0_9_ip, [], [ip_get_0_9]}, + {ipv6, [], [ipv6_hostname, ipv6_address]}, + {tickets, [], + [ticket_5775, ticket_5865, ticket_5913, ticket_6003, + ticket_7304]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + %%-------------------------------------------------------------------- %% Function: init_per_suite(Config) -> Config %% Config - [tuple()] @@ -615,219 +694,23 @@ end_per_testcase2(Case, Config) -> %%------------------------------------------------------------------------- %% Test cases starts here. %%------------------------------------------------------------------------- -ip(doc) -> - ["HTTP tests using TCP/IP"]; -ip(suite) -> - [ - ip_mod_alias, - ip_mod_actions, - ip_mod_security, - ip_mod_auth, - ip_mod_auth_api, - ip_mod_auth_mnesia_api, - ip_mod_htaccess, - ip_mod_cgi, - ip_mod_esi, - ip_mod_get, - ip_mod_head, - ip_mod_all, - ip_load_light, - ip_load_medium, - ip_load_heavy, - ip_dos_hostname, - ip_time_test, - ip_restart_no_block, - ip_restart_disturbing_block, - ip_restart_non_disturbing_block, - ip_block_disturbing_idle, - ip_block_non_disturbing_idle, - ip_block_503, - ip_block_disturbing_active, - ip_block_non_disturbing_active, - ip_block_disturbing_active_timeout_not_released, - ip_block_disturbing_active_timeout_released, - ip_block_non_disturbing_active_timeout_not_released, - ip_block_non_disturbing_active_timeout_released, - ip_block_disturbing_blocker_dies, - ip_block_non_disturbing_blocker_dies - ]. %%------------------------------------------------------------------------- -ssl(doc) -> - ["HTTP test using SSL"]; -ssl(suite) -> - [ - pssl, - ossl, - essl - ]. -pssl(doc) -> - ["HTTP test using SSL - using old way of configuring SSL"]; -pssl(suite) -> - [ - pssl_mod_alias, - pssl_mod_actions, - pssl_mod_security, - pssl_mod_auth, - pssl_mod_auth_api, - pssl_mod_auth_mnesia_api, - pssl_mod_htaccess, - pssl_mod_cgi, - pssl_mod_esi, - pssl_mod_get, - pssl_mod_head, - pssl_mod_all, - pssl_load_light, - pssl_load_medium, - pssl_load_heavy, - pssl_dos_hostname, - pssl_time_test, - pssl_restart_no_block, - pssl_restart_disturbing_block, - pssl_restart_non_disturbing_block, - pssl_block_disturbing_idle, - pssl_block_non_disturbing_idle, - pssl_block_503, - pssl_block_disturbing_active, - pssl_block_non_disturbing_active, - pssl_block_disturbing_active_timeout_not_released, - pssl_block_disturbing_active_timeout_released, - pssl_block_non_disturbing_active_timeout_not_released, - pssl_block_non_disturbing_active_timeout_released, - pssl_block_disturbing_blocker_dies, - pssl_block_non_disturbing_blocker_dies - ]. -ossl(doc) -> - ["HTTP test using SSL - using new way of configuring usage of old SSL"]; -ossl(suite) -> - [ - ossl_mod_alias, - ossl_mod_actions, - ossl_mod_security, - ossl_mod_auth, - ossl_mod_auth_api, - ossl_mod_auth_mnesia_api, - ossl_mod_htaccess, - ossl_mod_cgi, - ossl_mod_esi, - ossl_mod_get, - ossl_mod_head, - ossl_mod_all, - ossl_load_light, - ossl_load_medium, - ossl_load_heavy, - ossl_dos_hostname, - ossl_time_test, - ossl_restart_no_block, - ossl_restart_disturbing_block, - ossl_restart_non_disturbing_block, - ossl_block_disturbing_idle, - ossl_block_non_disturbing_idle, - ossl_block_503, - ossl_block_disturbing_active, - ossl_block_non_disturbing_active, - ossl_block_disturbing_active_timeout_not_released, - ossl_block_disturbing_active_timeout_released, - ossl_block_non_disturbing_active_timeout_not_released, - ossl_block_non_disturbing_active_timeout_released, - ossl_block_disturbing_blocker_dies, - ossl_block_non_disturbing_blocker_dies - ]. -essl(doc) -> - ["HTTP test using SSL - using new way of configuring usage of new SSL"]; -essl(suite) -> - [ - essl_mod_alias, - essl_mod_actions, - essl_mod_security, - essl_mod_auth, - essl_mod_auth_api, - essl_mod_auth_mnesia_api, - essl_mod_htaccess, - essl_mod_cgi, - essl_mod_esi, - essl_mod_get, - essl_mod_head, - essl_mod_all, - essl_load_light, - essl_load_medium, - essl_load_heavy, - essl_dos_hostname, - essl_time_test, - essl_restart_no_block, - essl_restart_disturbing_block, - essl_restart_non_disturbing_block, - essl_block_disturbing_idle, - essl_block_non_disturbing_idle, - essl_block_503, - essl_block_disturbing_active, - essl_block_non_disturbing_active, - essl_block_disturbing_active_timeout_not_released, - essl_block_disturbing_active_timeout_released, - essl_block_non_disturbing_active_timeout_not_released, - essl_block_non_disturbing_active_timeout_released, - essl_block_disturbing_blocker_dies, - essl_block_non_disturbing_blocker_dies - ]. %%------------------------------------------------------------------------- -http_1_1_ip(doc) -> - ["HTTP/1.1"]; -http_1_1_ip(suite) -> - [ - ip_host, - ip_chunked, - ip_expect, - ip_range, - ip_if_test, - ip_http_trace, - ip_http1_1_head, - ip_mod_cgi_chunked_encoding_test - ]. %%------------------------------------------------------------------------- -http_1_0_ip(doc) -> - ["HTTP/1.0"]; -http_1_0_ip(suite) -> - [ - ip_head_1_0, - ip_get_1_0, - ip_post_1_0 - ]. %%------------------------------------------------------------------------- -http_0_9_ip(doc) -> - ["HTTP/0.9"]; -http_0_9_ip(suite) -> - [ - ip_get_0_9 - ]. %%------------------------------------------------------------------------- -ipv6(doc) -> - ["Tests ipv6 functionality."]; -ipv6(suite) -> - [ - ipv6_hostname, - ipv6_address - ]. %%------------------------------------------------------------------------- -tickets(doc) -> - ["Test cases for reported bugs."]; -tickets(suite) -> - [ - ticket_5775, - ticket_5865, - ticket_5913, - ticket_6003, - ticket_7304 - ]. %%------------------------------------------------------------------------- ip_mod_alias(doc) -> diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl index 9ba2e73942..dcea200a1a 100644 --- a/lib/inets/test/httpd_basic_SUITE.erl +++ b/lib/inets/test/httpd_basic_SUITE.erl @@ -19,23 +19,26 @@ %% -module(httpd_basic_SUITE). --include("test_server.hrl"). --include("test_server_line.hrl"). +-include_lib("common_test/include/ct.hrl"). %% Note: This directive should only be used in test suites. -compile(export_all). -define(URL_START, "http://localhost:"). -all(doc) -> - ["Basic test of httpd."]; +suite() -> [{ct_hooks,[ts_install_cth]}]. -all(suite) -> - [ - uri_too_long_414, - header_too_long_413, - escaped_url_in_error_body - ]. +all() -> + [uri_too_long_414, header_too_long_413, escaped_url_in_error_body]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. %%-------------------------------------------------------------------- %% Function: init_per_suite(Config) -> Config diff --git a/lib/inets/test/httpd_load.erl b/lib/inets/test/httpd_load.erl index 9bb9f9f94e..83520033dc 100644 --- a/lib/inets/test/httpd_load.erl +++ b/lib/inets/test/httpd_load.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2005-2009. All Rights Reserved. +%% Copyright Ericsson AB 2005-2010. 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 diff --git a/lib/inets/test/inets.cover b/lib/inets/test/inets.cover new file mode 100644 index 0000000000..fd0ca41db3 --- /dev/null +++ b/lib/inets/test/inets.cover @@ -0,0 +1,2 @@ +{incl_app,inets,details}. + diff --git a/lib/inets/test/inets.spec b/lib/inets/test/inets.spec index a9b4524295..ed102f8219 100644 --- a/lib/inets/test/inets.spec +++ b/lib/inets/test/inets.spec @@ -1,2 +1 @@ -{topcase, {dir, "../inets_test"}}. -{hosts, ["tuor"]}. +{suites,"../inets_test",all}. diff --git a/lib/inets/test/inets_SUITE.erl b/lib/inets/test/inets_SUITE.erl index 56983caace..8e3ba226b9 100644 --- a/lib/inets/test/inets_SUITE.erl +++ b/lib/inets/test/inets_SUITE.erl @@ -19,7 +19,7 @@ %% -module(inets_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("test_server_line.hrl"). -include("inets_test_lib.hrl"). @@ -28,25 +28,26 @@ -define(NUM_DEFAULT_SERVICES, 1). -all(doc) -> - ["Test suites for the inets application."]; +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [{group, app_test}, {group, appup_test}, + {group, services_test}, httpd_reload]. + +groups() -> + [{services_test, [], + [start_inets, start_httpc, start_httpd, start_ftpc, + start_tftpd]}, + {app_test, [], [{inets_app_test, all}]}, + {appup_test, [], [{inets_appup_test, all}]}]. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. -all(suite) -> - [ - app_test, - appup_test, - services_test, - httpd_reload - ]. -services_test(suite) -> - [ - start_inets, - start_httpc, - start_httpd, - start_ftpc, - start_tftpd - ]. %%-------------------------------------------------------------------- @@ -100,11 +101,7 @@ end_per_testcase(_, Config) -> %%------------------------------------------------------------------------- %% Test cases starts here. %%------------------------------------------------------------------------- -app_test(suite) -> - [{inets_app_test, all}]. -appup_test(suite) -> - [{inets_appup_test, all}]. %%------------------------------------------------------------------------- diff --git a/lib/inets/test/inets_app_test.erl b/lib/inets/test/inets_app_test.erl index 6bdb9bb308..11b507fa26 100644 --- a/lib/inets/test/inets_app_test.erl +++ b/lib/inets/test/inets_app_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2002-2009. All Rights Reserved. +%% Copyright Ericsson AB 2002-2010. 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 @@ -39,28 +39,31 @@ init_per_testcase(undef_funcs, Config) -> init_per_testcase(_, Config) -> Config. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> Config. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -all(suite) -> - Cases = - [ - fields, - modules, - exportall, - app_depend, - undef_funcs - ], - {req, [], {conf, app_init, Cases, app_fin}}. +all() -> + [fields, modules, exportall, app_depend, + undef_funcs]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -app_init(suite) -> []; -app_init(doc) -> []; -app_init(Config) when is_list(Config) -> +init_per_suite(suite) -> []; +init_per_suite(doc) -> []; +init_per_suite(Config) when is_list(Config) -> case is_app(inets) of {ok, AppFile} -> io:format("AppFile: ~n~p~n", [AppFile]), @@ -81,9 +84,9 @@ is_app(App) -> end. -app_fin(suite) -> []; -app_fin(doc) -> []; -app_fin(Config) when is_list(Config) -> +end_per_suite(suite) -> []; +end_per_suite(doc) -> []; +end_per_suite(Config) when is_list(Config) -> Config. diff --git a/lib/inets/test/inets_appup_test.erl b/lib/inets/test/inets_appup_test.erl index 2c9c687c91..7ed237243e 100644 --- a/lib/inets/test/inets_appup_test.erl +++ b/lib/inets/test/inets_appup_test.erl @@ -28,31 +28,37 @@ -include("inets_test_lib.hrl"). -% t() -> megaco_test_lib:t(?MODULE). -% t(Case) -> megaco_test_lib:t({?MODULE, Case}). + % t() -> megaco_test_lib:t(?MODULE). + % t(Case) -> megaco_test_lib:t({?MODULE, Case}). %% Test server callbacks init_per_testcase(_Case, Config) -> Config. -fin_per_testcase(_Case, Config) -> +end_per_testcase(_Case, Config) -> Config. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -all(suite) -> - Cases = - [ - appup - ], - {req, [], {conf, appup_init, Cases, appup_fin}}. +all() -> + [appup]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -appup_init(suite) -> []; -appup_init(doc) -> []; -appup_init(Config) when is_list(Config) -> +init_per_suite(suite) -> []; +init_per_suite(doc) -> []; +init_per_suite(Config) when is_list(Config) -> AppFile = file_name(inets, ".app"), AppupFile = file_name(inets, ".appup"), [{app_file, AppFile}, {appup_file, AppupFile}|Config]. @@ -63,9 +69,9 @@ file_name(App, Ext) -> filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]). -appup_fin(suite) -> []; -appup_fin(doc) -> []; -appup_fin(Config) when is_list(Config) -> +end_per_suite(suite) -> []; +end_per_suite(doc) -> []; +end_per_suite(Config) when is_list(Config) -> Config. diff --git a/lib/inets/test/inets_sup_SUITE.erl b/lib/inets/test/inets_sup_SUITE.erl index 1e701bc074..fb29ab279f 100644 --- a/lib/inets/test/inets_sup_SUITE.erl +++ b/lib/inets/test/inets_sup_SUITE.erl @@ -20,22 +20,27 @@ -module(inets_sup_SUITE). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include("test_server_line.hrl"). %% Note: This directive should only be used in test suites. -compile(export_all). -all(doc) -> - ["Test that the inets supervisorstructur is the expected one."]; -all(suite) -> - [ - default_tree, - ftpc_worker, - tftpd_worker, - httpd_subtree, - httpc_subtree - ]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [default_tree, ftpc_worker, tftpd_worker, httpd_subtree, + httpc_subtree]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %%-------------------------------------------------------------------- %% Function: init_per_suite(Config) -> Config diff --git a/lib/inets/test/tftp_SUITE.erl b/lib/inets/test/tftp_SUITE.erl index 5768fff88b..79e9682ca4 100644 --- a/lib/inets/test/tftp_SUITE.erl +++ b/lib/inets/test/tftp_SUITE.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2006-2009. All Rights Reserved. +%% Copyright Ericsson AB 2006-2010. 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 @@ -64,24 +64,34 @@ default_config() -> init_per_testcase(Case, Config) -> tftp_test_lib:init_per_testcase(Case, Config). -fin_per_testcase(Case, Config) when is_list(Config) -> - tftp_test_lib:fin_per_testcase(Case, Config). +end_per_testcase(Case, Config) when is_list(Config) -> + tftp_test_lib:end_per_testcase(Case, Config). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Top test case %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -all(doc) -> - ["Test suites for TFTP."]; - -all(suite) -> - [ - simple, - extra, - reuse_connection, - resend_client, - resend_server - ]. +suite() -> [{ct_hooks,[ts_install_cth]}]. + +all() -> + [simple, extra, reuse_connection, resend_client, + resend_server]. + +groups() -> + []. + +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Simple diff --git a/lib/inets/test/tftp_test_lib.erl b/lib/inets/test/tftp_test_lib.erl index 3729309b0e..e9b691828f 100644 --- a/lib/inets/test/tftp_test_lib.erl +++ b/lib/inets/test/tftp_test_lib.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2007-2009. All Rights Reserved. +%% Copyright Ericsson AB 2007-2010. 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 @@ -32,7 +32,7 @@ init_per_testcase(_Case, Config) when is_list(Config) -> ?IGNORE(application:stop(inets)), Config. -fin_per_testcase(_Case, Config) when is_list(Config) -> +end_per_testcase(_Case, Config) when is_list(Config) -> ?IGNORE(application:stop(inets)), Config. @@ -143,7 +143,7 @@ eval(Mod, Fun, Config) -> Config2 = Mod:init_per_testcase(Fun, Config), Pid = spawn_link(?MODULE, do_eval, [self(), Mod, Fun, Config2]), R = wait_for_evaluator(Pid, Mod, Fun, Config2, []), - Mod:fin_per_testcase(Fun, Config2), + Mod:end_per_testcase(Fun, Config2), global:unregister_name(tftp_test_case_sup), process_flag(trap_exit, Flag), R. diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk index f462290a99..67737ee552 100644 --- a/lib/inets/vsn.mk +++ b/lib/inets/vsn.mk @@ -18,7 +18,7 @@ # %CopyrightEnd% APPLICATION = inets -INETS_VSN = 5.5.1 +INETS_VSN = 5.5.2 PRE_VSN = APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)" |