aboutsummaryrefslogtreecommitdiffstats
path: root/lib/cosFileTransfer/test/fileTransfer_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/cosFileTransfer/test/fileTransfer_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/cosFileTransfer/test/fileTransfer_SUITE.erl')
-rw-r--r--lib/cosFileTransfer/test/fileTransfer_SUITE.erl59
1 files changed, 32 insertions, 27 deletions
diff --git a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
index 3e27d7b83b..63eeb517bf 100644
--- a/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
+++ b/lib/cosFileTransfer/test/fileTransfer_SUITE.erl
@@ -131,33 +131,38 @@ end_per_testcase(_Case, Config) ->
ok.
init_per_suite(Config) ->
- orber:jump_start(),
- cosProperty:install(),
- cosProperty:start(),
- Dir = filename:join([code:lib_dir(ssl), "examples", "certs", "etc"]),
- %% Client
- cosFileTransferApp:configure(ssl_client_certfile,
- filename:join([Dir, "client", "cert.pem"])),
- cosFileTransferApp:configure(ssl_client_cacertfile,
- filename:join([Dir, "client", "cacerts.pem"])),
- cosFileTransferApp:configure(ssl_client_verify, 1),
- cosFileTransferApp:configure(ssl_client_depth, 0),
- %% Server
- cosFileTransferApp:configure(ssl_server_certfile,
- filename:join([Dir, "server", "cert.pem"])),
- cosFileTransferApp:configure(ssl_server_cacertfile,
- filename:join([Dir, "server", "cacerts.pem"])),
- cosFileTransferApp:configure(ssl_server_verify, 1),
- cosFileTransferApp:configure(ssl_server_depth, 0),
- crypto:start(),
- ssl:start(),
- cosFileTransferApp:install(),
- cosFileTransferApp:start(),
- if
- is_list(Config) ->
- Config;
- true ->
- exit("Config not a list")
+ case code:which(crypto) of
+ Res when is_atom(Res) ->
+ {skip,"Could not start crypto!"};
+ _Else ->
+ orber:jump_start(),
+ cosProperty:install(),
+ cosProperty:start(),
+ Dir = filename:join([code:lib_dir(ssl), "examples", "certs", "etc"]),
+ %% Client
+ cosFileTransferApp:configure(ssl_client_certfile,
+ filename:join([Dir, "client", "cert.pem"])),
+ cosFileTransferApp:configure(ssl_client_cacertfile,
+ filename:join([Dir, "client", "cacerts.pem"])),
+ cosFileTransferApp:configure(ssl_client_verify, 1),
+ cosFileTransferApp:configure(ssl_client_depth, 0),
+ %% Server
+ cosFileTransferApp:configure(ssl_server_certfile,
+ filename:join([Dir, "server", "cert.pem"])),
+ cosFileTransferApp:configure(ssl_server_cacertfile,
+ filename:join([Dir, "server", "cacerts.pem"])),
+ cosFileTransferApp:configure(ssl_server_verify, 1),
+ cosFileTransferApp:configure(ssl_server_depth, 0),
+ crypto:start(),
+ ssl:start(),
+ cosFileTransferApp:install(),
+ cosFileTransferApp:start(),
+ if
+ is_list(Config) ->
+ Config;
+ true ->
+ exit("Config not a list")
+ end
end.
end_per_suite(Config) ->