diff options
author | Fredrik Gustafsson <[email protected]> | 2013-11-18 10:22:39 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-11-18 10:22:39 +0100 |
commit | 58fb18b66eca3de6af4f33f5447fd8de63adf3a8 (patch) | |
tree | 860d040d13eeaba14f8596963d6262c3a574465c | |
parent | 04f5e4e820f792b3f07dd232f582e6a7e0a3d3f7 (diff) | |
parent | fb0006c937e284cefe5217d4c2a4b45ff7dfb758 (diff) | |
download | otp-58fb18b66eca3de6af4f33f5447fd8de63adf3a8.tar.gz otp-58fb18b66eca3de6af4f33f5447fd8de63adf3a8.tar.bz2 otp-58fb18b66eca3de6af4f33f5447fd8de63adf3a8.zip |
Merge branch 'maint'
-rw-r--r-- | lib/eldap/test/eldap_basic_SUITE.erl | 17 | ||||
-rw-r--r-- | lib/inets/test/httpc_SUITE.erl | 23 |
2 files changed, 35 insertions, 5 deletions
diff --git a/lib/eldap/test/eldap_basic_SUITE.erl b/lib/eldap/test/eldap_basic_SUITE.erl index 127d753b92..bf5fa83c3c 100644 --- a/lib/eldap/test/eldap_basic_SUITE.erl +++ b/lib/eldap/test/eldap_basic_SUITE.erl @@ -28,10 +28,19 @@ -define(TIMEOUT, 120000). % 2 min init_per_suite(Config) -> - ssl:start(), - chk_config(ldap_server, {"localhost",9876}, - chk_config(ldaps_server, {"localhost",9877}, - Config)). + StartSsl = try ssl:start() + catch + Error:Reason -> + {skip, lists:flatten(io_lib:format("eldap init_per_suite failed to start ssl Error=~p Reason=~p", [Error, Reason]))} + end, + case StartSsl of + ok -> + chk_config(ldap_server, {"localhost",9876}, + chk_config(ldaps_server, {"localhost",9877}, + Config)); + _ -> + StartSsl + end. end_per_suite(_Config) -> ok. diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index 818edc12ac..fe6edd504e 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -145,6 +145,22 @@ init_per_group(misc = Group, Config) -> ok = httpc:set_options([{ipfamily, Inet}]), Config; +init_per_group(Group, Config0) when Group =:= sim_https; Group =:= https-> + start_apps(Group), + StartSsl = try ssl:start() + catch + Error:Reason -> + {skip, lists:flatten(io_lib:format("Failed to start apps for https Error=~p Reason=~p", [Error, Reason]))} + end, + case StartSsl of + {error, {already_started, _}} -> + do_init_per_group(Group, Config0); + ok -> + do_init_per_group(Group, Config0); + _ -> + StartSsl + end; + init_per_group(Group, Config0) -> start_apps(Group), Config = proplists:delete(port, Config0), @@ -153,7 +169,10 @@ init_per_group(Group, Config0) -> end_per_group(_, _Config) -> ok. - +do_init_per_group(Group, Config0) -> + Config = proplists:delete(port, Config0), + Port = server_start(Group, server_config(Group, Config)), + [{port, Port} | Config]. %%-------------------------------------------------------------------- init_per_testcase(pipeline, Config) -> inets:start(httpc, [{profile, pipeline}]), @@ -1069,6 +1088,8 @@ server_config(_, _) -> start_apps(https) -> inets_test_lib:start_apps([crypto, public_key, ssl]); +start_apps(sim_https) -> + inets_test_lib:start_apps([crypto, public_key, ssl]); start_apps(_) -> ok. |