aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2011-03-07 10:02:06 +0100
committerIngela Anderton Andin <[email protected]>2011-03-07 10:02:06 +0100
commit7d45e56bbe2d084756fceb4e9b8065f74d1a503b (patch)
treec58e46731cd93ac29d2fb94d0bd7f3d0778ac7eb
parent84884b96de521491d34a19b1b3497d3d76549126 (diff)
downloadotp-7d45e56bbe2d084756fceb4e9b8065f74d1a503b.tar.gz
otp-7d45e56bbe2d084756fceb4e9b8065f74d1a503b.tar.bz2
otp-7d45e56bbe2d084756fceb4e9b8065f74d1a503b.zip
Workaround for application:start(crypto) inconsistency
-rw-r--r--lib/public_key/test/pkits_SUITE.erl6
-rw-r--r--lib/public_key/test/public_key_SUITE.erl6
-rw-r--r--lib/ssl/test/old_ssl_dist_SUITE.erl10
-rw-r--r--lib/ssl/test/old_transport_accept_SUITE.erl10
-rw-r--r--lib/ssl/test/ssl_basic_SUITE.erl6
-rw-r--r--lib/ssl/test/ssl_packet_SUITE.erl6
-rw-r--r--lib/ssl/test/ssl_payload_SUITE.erl6
-rw-r--r--lib/ssl/test/ssl_session_cache_SUITE.erl6
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl6
9 files changed, 37 insertions, 25 deletions
diff --git a/lib/public_key/test/pkits_SUITE.erl b/lib/public_key/test/pkits_SUITE.erl
index fd976cb2f3..660af4e8ab 100644
--- a/lib/public_key/test/pkits_SUITE.erl
+++ b/lib/public_key/test/pkits_SUITE.erl
@@ -585,10 +585,10 @@ end_per_testcase(_Func, Config) ->
Config.
init_per_suite(Config) ->
- case application:start(crypto) of
+ try crypto:start() of
ok ->
- Config;
- _ ->
+ Config
+ catch _:_ ->
{skip, "Crypto did not start"}
end.
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index d130196c15..6c482f9c30 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.erl
@@ -41,10 +41,10 @@
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- case application:start(crypto) of
+ try crypto:start() of
ok ->
- Config;
- _ ->
+ Config
+ catch _:_ ->
{skip, "Crypto did not start"}
end.
%%--------------------------------------------------------------------
diff --git a/lib/ssl/test/old_ssl_dist_SUITE.erl b/lib/ssl/test/old_ssl_dist_SUITE.erl
index 6a072c9d98..4544fb616a 100644
--- a/lib/ssl/test/old_ssl_dist_SUITE.erl
+++ b/lib/ssl/test/old_ssl_dist_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2011. 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
@@ -62,9 +62,15 @@ end_per_group(_GroupName, Config) ->
init_per_suite(Config) ->
- add_ssl_opts_config(Config).
+ try crypto:start() of
+ ok ->
+ add_ssl_opts_config(Config)
+ catch _:_ ->
+ {skip, "Crypto did not start"}
+ end.
end_per_suite(Config) ->
+ application:stop(crypto),
Config.
init_per_testcase(Case, Config) when list(Config) ->
diff --git a/lib/ssl/test/old_transport_accept_SUITE.erl b/lib/ssl/test/old_transport_accept_SUITE.erl
index 21ee0690b1..6f0c8e456b 100644
--- a/lib/ssl/test/old_transport_accept_SUITE.erl
+++ b/lib/ssl/test/old_transport_accept_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2011. 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
@@ -57,9 +57,15 @@ groups() ->
[].
init_per_suite(Config) ->
- Config.
+ try crypto:start() of
+ ok ->
+ Config
+ catch _:_ ->
+ {skip, "Crypto did not start"}
+ end.
end_per_suite(_Config) ->
+ application:stop(crypto),
ok.
init_per_group(_GroupName, Config) ->
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl
index 87d5fc8d71..8495ddb1d7 100644
--- a/lib/ssl/test/ssl_basic_SUITE.erl
+++ b/lib/ssl/test/ssl_basic_SUITE.erl
@@ -48,7 +48,7 @@
%%--------------------------------------------------------------------
init_per_suite(Config0) ->
Dog = ssl_test_lib:timetrap(?LONG_TIMEOUT *2),
- case application:start(crypto) of
+ try crypto:start() of
ok ->
application:start(public_key),
ssl:start(),
@@ -61,8 +61,8 @@ init_per_suite(Config0) ->
Config1 = ssl_test_lib:make_dsa_cert(Config0),
Config = ssl_test_lib:cert_options(Config1),
- [{watchdog, Dog} | Config];
- _ ->
+ [{watchdog, Dog} | Config]
+ catch _:_ ->
{skip, "Crypto did not start"}
end.
%%--------------------------------------------------------------------
diff --git a/lib/ssl/test/ssl_packet_SUITE.erl b/lib/ssl/test/ssl_packet_SUITE.erl
index 1ecf55d6e8..d22d5d2954 100644
--- a/lib/ssl/test/ssl_packet_SUITE.erl
+++ b/lib/ssl/test/ssl_packet_SUITE.erl
@@ -53,7 +53,7 @@
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- case application:start(crypto) of
+ try crypto:start() of
ok ->
application:start(public_key),
ssl:start(),
@@ -61,8 +61,8 @@ init_per_suite(Config) ->
(catch make_certs:all(?config(data_dir, Config),
?config(priv_dir, Config))),
test_server:format("Make certs ~p~n", [Result]),
- ssl_test_lib:cert_options(Config);
- _ ->
+ ssl_test_lib:cert_options(Config)
+ catch _:_ ->
{skip, "Crypto did not start"}
end.
%%--------------------------------------------------------------------
diff --git a/lib/ssl/test/ssl_payload_SUITE.erl b/lib/ssl/test/ssl_payload_SUITE.erl
index f57d7fa0e8..24e86b3913 100644
--- a/lib/ssl/test/ssl_payload_SUITE.erl
+++ b/lib/ssl/test/ssl_payload_SUITE.erl
@@ -37,13 +37,13 @@
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- case application:start(crypto) of
+ try crypto:start() of
ok ->
application:start(public_key),
ssl:start(),
make_certs:all(?config(data_dir, Config), ?config(priv_dir, Config)),
- ssl_test_lib:cert_options(Config);
- _ ->
+ ssl_test_lib:cert_options(Config)
+ catch _:_ ->
{skip, "Crypto did not start"}
end.
%%--------------------------------------------------------------------
diff --git a/lib/ssl/test/ssl_session_cache_SUITE.erl b/lib/ssl/test/ssl_session_cache_SUITE.erl
index b47efe0941..a43b9ab586 100644
--- a/lib/ssl/test/ssl_session_cache_SUITE.erl
+++ b/lib/ssl/test/ssl_session_cache_SUITE.erl
@@ -47,7 +47,7 @@
%%--------------------------------------------------------------------
init_per_suite(Config0) ->
Dog = ssl_test_lib:timetrap(?LONG_TIMEOUT *2),
- case application:start(crypto) of
+ try crypto:start() of
ok ->
application:start(public_key),
ssl:start(),
@@ -60,8 +60,8 @@ init_per_suite(Config0) ->
Config1 = ssl_test_lib:make_dsa_cert(Config0),
Config = ssl_test_lib:cert_options(Config1),
- [{watchdog, Dog} | Config];
- _ ->
+ [{watchdog, Dog} | Config]
+ catch _:_ ->
{skip, "Crypto did not start"}
end.
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index 4ab8fe3273..64a6a9eaf8 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -50,7 +50,7 @@ init_per_suite(Config0) ->
false ->
{skip, "Openssl not found"};
_ ->
- case application:start(crypto) of
+ try crypto:start() of
ok ->
application:start(public_key),
ssl:start(),
@@ -60,8 +60,8 @@ init_per_suite(Config0) ->
test_server:format("Make certs ~p~n", [Result]),
Config1 = ssl_test_lib:make_dsa_cert(Config0),
Config = ssl_test_lib:cert_options(Config1),
- [{watchdog, Dog} | Config];
- _ ->
+ [{watchdog, Dog} | Config]
+ catch _:_ ->
{skip, "Crypto did not start"}
end
end.