aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-12-01 14:48:41 +0100
committerBjörn Gustavsson <[email protected]>2011-12-02 16:59:35 +0100
commit0f97e3c355536270848e4c6d64e72f02ff1f138a (patch)
treea5c393dee47f799e1586c5e9a05c9dd3ab9222f5 /lib
parentb6e73d9f9e01fba5573beb01e1cafff07fa33c3e (diff)
downloadotp-0f97e3c355536270848e4c6d64e72f02ff1f138a.tar.gz
otp-0f97e3c355536270848e4c6d64e72f02ff1f138a.tar.bz2
otp-0f97e3c355536270848e4c6d64e72f02ff1f138a.zip
fileTransferSUITE: Cope with missing/broken crypto application
Diffstat (limited to 'lib')
-rw-r--r--lib/cosFileTransfer/test/fileTransfer_SUITE.erl15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
index e94c307ef8..79a234bd28 100644
--- a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
+++ b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
@@ -131,10 +131,10 @@ end_per_testcase(_Case, Config) ->
ok.
init_per_suite(Config) ->
- case code:which(crypto) of
- Res when is_atom(Res) ->
+ case crypto_works() of
+ false ->
{skip,"Could not start crypto!"};
- _Else ->
+ true ->
orber:jump_start(),
cosProperty:install(),
cosProperty:start(),
@@ -165,6 +165,15 @@ init_per_suite(Config) ->
end
end.
+crypto_works() ->
+ try crypto:start() of
+ {error,{already_started,crypto}} -> true;
+ ok -> true
+ catch
+ error:_ ->
+ false
+ end.
+
end_per_suite(Config) ->
ssl:stop(),
crypto:stop(),