aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2016-06-07 15:39:44 +0200
committerHans Nilsson <[email protected]>2016-06-09 09:47:08 +0200
commit8619d3d6cf22ad267a5d902be0ddc768280c92fc (patch)
tree4b87ee504f5c5a411d2712df71221371971d3b9f /lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl
parent92457b67f824e569bba84eb62a5eec69140d81e4 (diff)
downloadotp-8619d3d6cf22ad267a5d902be0ddc768280c92fc.tar.gz
otp-8619d3d6cf22ad267a5d902be0ddc768280c92fc.tar.bz2
otp-8619d3d6cf22ad267a5d902be0ddc768280c92fc.zip
ssh: skip test suites if no crypto lib is installed
Diffstat (limited to 'lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl')
-rw-r--r--lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl26
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl b/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl
index 75b5090c2b..56a33d6349 100644
--- a/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl
+++ b/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl
@@ -26,6 +26,7 @@
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/include/file.hrl").
+-include("ssh_test_lib.hrl").
-define(USER, "Alladin").
-define(PASSWD, "Sesame").
@@ -53,17 +54,20 @@ groups() ->
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- catch ssh:stop(),
- DataDir = proplists:get_value(data_dir, Config),
- PrivDir = proplists:get_value(priv_dir, Config),
- FileAlt = filename:join(DataDir, "ssh_sftpd_file_alt.erl"),
- c:c(FileAlt),
- FileName = filename:join(DataDir, "test.txt"),
- {ok, FileInfo} = file:read_file_info(FileName),
- ok = file:write_file_info(FileName,
- FileInfo#file_info{mode = 8#400}),
- ssh_test_lib:setup_dsa(DataDir, PrivDir),
- Config.
+ ?CHECK_CRYPTO(
+ begin
+ catch ssh:stop(),
+ DataDir = proplists:get_value(data_dir, Config),
+ PrivDir = proplists:get_value(priv_dir, Config),
+ FileAlt = filename:join(DataDir, "ssh_sftpd_file_alt.erl"),
+ c:c(FileAlt),
+ FileName = filename:join(DataDir, "test.txt"),
+ {ok, FileInfo} = file:read_file_info(FileName),
+ ok = file:write_file_info(FileName,
+ FileInfo#file_info{mode = 8#400}),
+ ssh_test_lib:setup_dsa(DataDir, PrivDir),
+ Config
+ end).
end_per_suite(Config) ->
UserDir = filename:join(proplists:get_value(priv_dir, Config), nopubkey),