summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/crypto/test/crypto_SUITE.erl12
-rw-r--r--lib/crypto/test/crypto_property_test_SUITE.erl1
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index ed67ecd0b3..df830b32f6 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -332,7 +332,7 @@ init_per_suite(Config) ->
{ok, _} = zip:unzip("cmactestvectors.zip"),
{ok, _} = zip:unzip("gcmtestvectors.zip"),
- try crypto:start() of
+ try is_ok(crypto:start()) of
ok ->
catch ct:comment("~s",[element(3,hd(crypto:info_lib()))]),
catch ct:log("crypto:info_lib() -> ~p~n"
@@ -355,10 +355,18 @@ init_per_suite(Config) ->
crypto:rand_seed(<< <<Bin/binary>> || _ <- lists:seq(1,16) >>),
Config
end
- catch _:_ ->
+
+ catch C:E:S ->
+ ct:log("~p ~p~n~p", [C,E,S]),
{fail, "Crypto did not start"}
end.
+is_ok(ok) -> ok;
+is_ok({error, already_started}) -> ok;
+is_ok({error,{already_started,crypto}}) -> ok.
+
+
+
end_per_suite(_Config) ->
application:stop(crypto).
diff --git a/lib/crypto/test/crypto_property_test_SUITE.erl b/lib/crypto/test/crypto_property_test_SUITE.erl
index bf137363e8..9c958007c7 100644
--- a/lib/crypto/test/crypto_property_test_SUITE.erl
+++ b/lib/crypto/test/crypto_property_test_SUITE.erl
@@ -35,6 +35,7 @@ init_per_suite(Config) ->
try crypto:start() of
ok -> true;
{error, already_started} -> true;
+ {error,{already_started,crypto}} -> true;
_ -> false
catch
_:_ -> false