From b0fc970c36bca30fb590b32589c7951f0ca7a04b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Thu, 1 Dec 2011 16:00:52 +0100 Subject: crypto_SUITE: Reinstate what was "lost in translation" When crypto_SUITE was migrated to the common_test format in commit f6b19ef8603b46c64f3722ede3915dd1ac67bae8, some things were lost in translation. Reinstate the previous behaviour: 1) Run the info/1 test case. This test case will cause a skip if the test is run on a non-commercial platform and the entire crypto application is missing. If the crypto application exists, but does not work properly, the test case will fail. 2) If info/1 is skipped or fails, don't run any other test cases in crypto_SUITE. (That is, if there is a basic problem, ONE failed test case is sufficient indication.) --- lib/crypto/test/crypto_SUITE.erl | 46 ++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 25 deletions(-) (limited to 'lib/crypto/test') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 86acdc27df..627c966dfb 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -68,30 +68,29 @@ rc4_test/1, rc4_stream_test/1, blowfish_cfb64/1, - smp/1, - cleanup/1]). + smp/1]). -export([hexstr2bin/1]). suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> - [link_test, md5, md5_update, md4, md4_update, md5_mac, - md5_mac_io, sha, sha_update, - hmac_update_sha, hmac_update_sha_n, hmac_update_md5_n, hmac_update_md5_io, hmac_update_md5, - %% sha256, sha256_update, sha512,sha512_update, - des_cbc, des_cfb, des3_cbc, des3_cfb, rc2_cbc, aes_cfb, aes_cbc, - aes_cbc_iter, aes_ctr, aes_ctr_stream, des_cbc_iter, des_cfb_iter, des_ecb, - des_cbc, rc2_cbc, aes_cfb, aes_cbc, - aes_cbc_iter, aes_ctr, aes_ctr_stream, des_cbc_iter, des_ecb, - rand_uniform_test, strong_rand_test, - rsa_verify_test, dsa_verify_test, rsa_sign_test, - dsa_sign_test, rsa_encrypt_decrypt, dh, exor_test, - rc4_test, rc4_stream_test, mod_exp_test, blowfish_cfb64, - smp]. - -groups() -> - []. + [link_test, {group, info}]. + +groups() -> + [{info, [sequence],[info, {group, rest}]}, + {rest, [], + [md5, md5_update, md4, md4_update, md5_mac, + md5_mac_io, sha, sha_update, + hmac_update_sha, hmac_update_sha_n, hmac_update_md5_n, + hmac_update_md5_io, hmac_update_md5, + des_cbc, aes_cfb, aes_cbc, + aes_cbc_iter, aes_ctr, aes_ctr_stream, des_cbc_iter, des_ecb, + rand_uniform_test, strong_rand_test, + rsa_verify_test, dsa_verify_test, rsa_sign_test, + dsa_sign_test, rsa_encrypt_decrypt, dh, exor_test, + rc4_test, rc4_stream_test, mod_exp_test, blowfish_cfb64, + smp]}]. init_per_suite(Config) -> Config. @@ -105,11 +104,15 @@ init_per_group(_GroupName, Config) -> end_per_group(_GroupName, Config) -> Config. +init_per_testcase(info, Config) -> + Config; init_per_testcase(_Name,Config) -> io:format("init_per_testcase\n"), ?line crypto:start(), Config. +end_per_testcase(info, Config) -> + Config; end_per_testcase(_Name,Config) -> io:format("end_per_testcase\n"), ?line crypto:stop(), @@ -197,13 +200,6 @@ info(Config) when is_list(Config) -> ?line crypto:stop() end. -cleanup(doc) -> - ["Cleanup (dummy)."]; -cleanup(suite) -> - []; -cleanup(Config) when is_list(Config) -> - Config. - %% %% md5(doc) -> -- cgit v1.2.3