aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssl/test/old_ssl_misc_SUITE.erl
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2011-01-24 14:01:06 +0100
committerLukas Larsson <[email protected]>2011-02-17 17:42:39 +0100
commit3d3251d2f371499e7af7b77335b4392f4ffaa465 (patch)
tree8cf2ce27df8b95e92246c3c36ee96dd84a9ae513 /lib/ssl/test/old_ssl_misc_SUITE.erl
parentede974119a7642cf3b85dc370090e80862191dd7 (diff)
downloadotp-3d3251d2f371499e7af7b77335b4392f4ffaa465.tar.gz
otp-3d3251d2f371499e7af7b77335b4392f4ffaa465.tar.bz2
otp-3d3251d2f371499e7af7b77335b4392f4ffaa465.zip
Update init_per_suite to skip all tests if crypto does not exist
Diffstat (limited to 'lib/ssl/test/old_ssl_misc_SUITE.erl')
-rw-r--r--lib/ssl/test/old_ssl_misc_SUITE.erl21
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/ssl/test/old_ssl_misc_SUITE.erl b/lib/ssl/test/old_ssl_misc_SUITE.erl
index 039f766d96..04760008c5 100644
--- a/lib/ssl/test/old_ssl_misc_SUITE.erl
+++ b/lib/ssl/test/old_ssl_misc_SUITE.erl
@@ -66,20 +66,25 @@ init_per_suite(Config) ->
io:format("Config: ~p~n", [Config]),
%% Check if SSL exists. If this case fails, all other cases are skipped
- crypto:start(),
- application:start(public_key),
- case ssl:start() of
- ok -> ssl:stop();
- {error, {already_started, _}} -> ssl:stop();
- Error -> ?t:fail({failed_starting_ssl,Error})
- end,
- Config.
+ case catch crypto:start() of
+ ok ->
+ application:start(public_key),
+ case ssl:start() of
+ ok -> ssl:stop();
+ {error, {already_started, _}} -> ssl:stop();
+ Error -> ?t:fail({failed_starting_ssl,Error})
+ end,
+ Config;
+ _Else ->
+ {skip,"Could not start crypto!"}
+ end.
end_per_suite(doc) ->
"This test case has no mission other than closing the conf case";
end_per_suite(suite) ->
[];
end_per_suite(Config) ->
+ crypto:stop(),
Config.
seed(doc) ->