From 2cbb5d191fd8f94c113cbf61c243999388f65c3b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 5 Oct 2010 17:58:16 +0200 Subject: Update all fin_per_testcase to end_per_testcase. --- lib/crypto/test/crypto_SUITE.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 19e10081d8..cc6db9a460 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -23,7 +23,7 @@ -export([all/1, init_per_testcase/2, - fin_per_testcase/2, + end_per_testcase/2, info/1, link_test/1, md5/1, @@ -103,8 +103,8 @@ init_per_testcase(_Name,Config) -> ?line crypto:start(), Config. -fin_per_testcase(_Name,Config) -> - io:format("fin_per_testcase\n"), +end_per_testcase(_Name,Config) -> + io:format("end_per_testcase\n"), ?line crypto:stop(), Config. -- cgit v1.2.3 From f6b19ef8603b46c64f3722ede3915dd1ac67bae8 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 12 Oct 2010 10:59:21 +0200 Subject: Update crypto tests to conform with common_test standard --- lib/crypto/test/blowfish_SUITE.erl | 23 +++++++------- lib/crypto/test/crypto.spec | 3 +- lib/crypto/test/crypto_SUITE.erl | 61 ++++++++++++++------------------------ 3 files changed, 36 insertions(+), 51 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index d117e7cc3d..ae7712479f 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -23,7 +23,7 @@ %% Note: This directive should only be used in test suites. -compile(export_all). --include("test_server.hrl"). +-include_lib("test_server/include/test_server.hrl"). -include("test_server_line.hrl"). -define(TIMEOUT, 120000). % 2 min @@ -100,15 +100,18 @@ end_per_testcase(_TestCase, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -all(doc) -> - ["Test Blowfish functionality"]; - -all(suite) -> - [ecb, - cbc, - cfb64, - ofb64 - ]. +all() -> +[ecb, cbc, cfb64, ofb64]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + %% Test cases start here. %%-------------------------------------------------------------------- diff --git a/lib/crypto/test/crypto.spec b/lib/crypto/test/crypto.spec index 7ba5696189..52fb4c1c98 100644 --- a/lib/crypto/test/crypto.spec +++ b/lib/crypto/test/crypto.spec @@ -1,2 +1 @@ -{topcase, {dir, "../crypto_test"}}. - +{suites,"crypto_test",all}. diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index cc6db9a460..7df0d662f4 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -18,10 +18,9 @@ %% -module(crypto_SUITE). --include("test_server.hrl"). --include("test_server_line.hrl"). +-include_lib("test_server/include/test_server.hrl"). --export([all/1, +-export([all/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2, info/1, @@ -44,7 +43,7 @@ aes_cfb/1, aes_cbc/1, aes_cbc_iter/1, - aes_ctr/1, + aes_ctr/1, mod_exp_test/1, rand_uniform_test/1, rsa_verify_test/1, @@ -62,41 +61,25 @@ -export([hexstr2bin/1]). -all(suite) -> - [link_test, - {conf,info,[md5, - md5_update, - md4, - md4_update, - md5_mac, - md5_mac_io, - sha, - sha_update, -%% sha256, -%% sha256_update, -%% sha512, -%% sha512_update, - des_cbc, - aes_cfb, - aes_cbc, - aes_cbc_iter, - aes_ctr, - des_cbc_iter, - des_ecb, - rand_uniform_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], - cleanup}]. +all() -> + [link_test, md5, md5_update, md4, md4_update, md5_mac, + md5_mac_io, sha, sha_update, + %% sha256, sha256_update, sha512,sha512_update, + des_cbc, aes_cfb, aes_cbc, + aes_cbc_iter, aes_ctr, des_cbc_iter, des_ecb, rand_uniform_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() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. init_per_testcase(_Name,Config) -> io:format("init_per_testcase\n"), -- cgit v1.2.3 From 83f932257470f5ae01fc61130e997fdea0562653 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 6 Dec 2010 16:48:31 +0100 Subject: Add ts_install_scb to suite/0 --- lib/crypto/test/blowfish_SUITE.erl | 2 ++ lib/crypto/test/crypto_SUITE.erl | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index ae7712479f..4ebcb2c7a0 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -100,6 +100,8 @@ end_per_testcase(_TestCase, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> [ecb, cbc, cfb64, ofb64]. diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index 7df0d662f4..b27994fc48 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -20,7 +20,7 @@ -include_lib("test_server/include/test_server.hrl"). --export([all/0,groups/0,init_per_group/2,end_per_group/2, +-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2, info/1, @@ -61,6 +61,8 @@ -export([hexstr2bin/1]). +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> [link_test, md5, md5_update, md4, md4_update, md5_mac, md5_mac_io, sha, sha_update, -- cgit v1.2.3 From 8fd1f31f3074bc9444a0769418506b1ccc2041d3 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 7 Dec 2010 11:35:13 +0100 Subject: Add init_per_suite and end_per_suite --- lib/crypto/test/crypto_SUITE.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index b27994fc48..e145d61654 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -20,7 +20,7 @@ -include_lib("test_server/include/test_server.hrl"). --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, +-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, init_per_testcase/2, end_per_testcase/2, info/1, @@ -77,6 +77,12 @@ all() -> groups() -> []. +init_per_suite(Config) -> + Config. + +end_per_suite(_Config) -> + ok. + init_per_group(_GroupName, Config) -> Config. -- cgit v1.2.3 From 5fef403779c4894189abf6fd18e6c8e5d54064c5 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 7 Dec 2010 17:52:12 +0100 Subject: Update all test specs --- lib/crypto/test/crypto.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/crypto.spec b/lib/crypto/test/crypto.spec index 52fb4c1c98..cc09970cb3 100644 --- a/lib/crypto/test/crypto.spec +++ b/lib/crypto/test/crypto.spec @@ -1 +1 @@ -{suites,"crypto_test",all}. +{suites,"../crypto_test",all}. -- cgit v1.2.3 From cfa01c9bd748df38750dc4841030e6520610538a Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 12 Jan 2011 14:56:23 +0100 Subject: Update and add cover spec files to work with common_test --- lib/crypto/test/Makefile | 2 +- lib/crypto/test/crypto.cover | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 lib/crypto/test/crypto.cover (limited to 'lib/crypto') diff --git a/lib/crypto/test/Makefile b/lib/crypto/test/Makefile index e728875027..f4689a23df 100644 --- a/lib/crypto/test/Makefile +++ b/lib/crypto/test/Makefile @@ -76,7 +76,7 @@ release_spec: release_tests_spec: $(TEST_TARGET) $(INSTALL_DIR) $(RELSYSDIR) - $(INSTALL_DATA) crypto.spec $(RELTEST_FILES) $(RELSYSDIR) + $(INSTALL_DATA) crypto.spec crypto.cover $(RELTEST_FILES) $(RELSYSDIR) chmod -f -R u+w $(RELSYSDIR) release_docs_spec: diff --git a/lib/crypto/test/crypto.cover b/lib/crypto/test/crypto.cover new file mode 100644 index 0000000000..61ee372ec5 --- /dev/null +++ b/lib/crypto/test/crypto.cover @@ -0,0 +1,2 @@ +{incl_app,crypto,details}. + -- cgit v1.2.3 From 3d3251d2f371499e7af7b77335b4392f4ffaa465 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 24 Jan 2011 14:01:06 +0100 Subject: Update init_per_suite to skip all tests if crypto does not exist --- lib/crypto/test/blowfish_SUITE.erl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index 4ebcb2c7a0..36fbc59f00 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -45,8 +45,12 @@ %% variable, but should NOT alter/remove any existing entries. %%-------------------------------------------------------------------- init_per_suite(Config) -> - crypto:start(), - Config. + case catch crypto:start() of + ok -> + Config; + _Else -> + {skip,"Could not start crypto!"} + end. %%-------------------------------------------------------------------- %% Function: end_per_suite(Config) -> _ -- cgit v1.2.3 From 308d6638450f5ffc7f432302367e84bcd92ea683 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 9 Feb 2011 19:10:44 +0100 Subject: Rename Suite Callback to Common Test Hook --- lib/crypto/test/blowfish_SUITE.erl | 2 +- lib/crypto/test/crypto_SUITE.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/crypto') diff --git a/lib/crypto/test/blowfish_SUITE.erl b/lib/crypto/test/blowfish_SUITE.erl index 36fbc59f00..735433cd47 100644 --- a/lib/crypto/test/blowfish_SUITE.erl +++ b/lib/crypto/test/blowfish_SUITE.erl @@ -104,7 +104,7 @@ end_per_testcase(_TestCase, Config) -> %% Name of a test case. %% Description: Returns a list of all test cases in this test suite %%-------------------------------------------------------------------- -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [ecb, cbc, cfb64, ofb64]. diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index e145d61654..b29b067967 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -61,7 +61,7 @@ -export([hexstr2bin/1]). -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [link_test, md5, md5_update, md4, md4_update, md5_mac, -- cgit v1.2.3