diff options
author | Hans Nilsson <hans@erlang.org> | 2020-05-18 11:58:33 +0200 |
---|---|---|
committer | Hans Nilsson <hans@erlang.org> | 2020-05-20 17:12:40 +0200 |
commit | c5036f3e29dab086b2dd5c75b4cc42e0d5ec837e (patch) | |
tree | 7fbec3f147a11685c8f834a6e45a486dbd5cb2c9 | |
parent | 6bc08d2dd7fd224088f538297ae657113c2a575d (diff) | |
download | erlang-c5036f3e29dab086b2dd5c75b4cc42e0d5ec837e.tar.gz |
crypto/test: Update check for crypto started
-rw-r--r-- | lib/crypto/test/crypto_SUITE.erl | 12 | ||||
-rw-r--r-- | lib/crypto/test/crypto_property_test_SUITE.erl | 1 |
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 |