From ef692b0461b263a2025d289c31d8f491b53311e5 Mon Sep 17 00:00:00 2001 From: Micael Karlberg Date: Mon, 28 Nov 2011 19:45:26 +0100 Subject: Add ssl (and crypto and public_key) ensure tests. That is, for test cases that depend of a running ssl app, added tests that ssl is actually running (actually the key app here is crypto, since the simplest way to test if ssl works is by testing if crypto does...). --- lib/inets/test/inets_app_test.erl | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'lib/inets/test/inets_app_test.erl') diff --git a/lib/inets/test/inets_app_test.erl b/lib/inets/test/inets_app_test.erl index 9d7202e087..db2218f3b6 100644 --- a/lib/inets/test/inets_app_test.erl +++ b/lib/inets/test/inets_app_test.erl @@ -45,8 +45,7 @@ end_per_testcase(_Case, Config) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% all() -> - [fields, modules, exportall, app_depend, - undef_funcs]. + [fields, modules, exportall, app_depend, undef_funcs]. groups() -> []. @@ -243,18 +242,11 @@ undef_funcs(doc) -> undef_funcs(Config) when is_list(Config) -> %% We need to check if there is a point to run this test. %% On some platforms, crypto will not build, which in turn - %% causes ssl to not to not build (at this time, this will + %% causes ssl to not build (at this time, this will %% change in the future). %% So, we first check if we can start crypto, and if not, %% we skip this test case! - case (catch crypto:start()) of - ok -> - ok; - {error, {already_started, crypto}} -> - ok; - _ -> - ?SKIP(crypto_start_check_failed) - end, + ?ENSURE_STARTED(crypto), App = inets, AppFile = key1search(app_file, Config), Mods = key1search(modules, AppFile), @@ -266,7 +258,7 @@ undef_funcs(Config) when is_list(Config) -> ok = xref:set_default(XRef, [{verbose,false},{warnings,false}]), XRefName = undef_funcs_make_name(App, xref_name), - {ok, XRefName} = xref:add_release(XRef, Root, {name,XRefName}), + {ok, XRefName} = xref:add_release(XRef, Root, {name, XRefName}), {ok, App} = xref:replace_application(XRef, App, EbinDir), {ok, Undefs} = xref:analyze(XRef, undefined_function_calls), xref:stop(XRef), -- cgit v1.2.3