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/jinterface/test/Makefile | 2 +- lib/jinterface/test/jinterface.dynspec | 32 -------------------------------- lib/jinterface/test/jinterface.spec | 20 ++++++++++++++++++++ lib/jinterface/test/jinterface_SUITE.erl | 9 ++++++++- lib/jinterface/test/nc_SUITE.erl | 13 ++++++++----- 5 files changed, 37 insertions(+), 39 deletions(-) delete mode 100644 lib/jinterface/test/jinterface.dynspec create mode 100644 lib/jinterface/test/jinterface.spec (limited to 'lib/jinterface') diff --git a/lib/jinterface/test/Makefile b/lib/jinterface/test/Makefile index 36955d1e91..b2ddffea42 100644 --- a/lib/jinterface/test/Makefile +++ b/lib/jinterface/test/Makefile @@ -32,7 +32,7 @@ RELSYSDIR = $(RELEASE_PATH)/jinterface_test # ---------------------------------------------------- # Target Specs # ---------------------------------------------------- -TEST_SPEC_FILE = jinterface.dynspec +TEST_SPEC_FILE = jinterface.spec MODULES = nc_SUITE \ jinterface_SUITE diff --git a/lib/jinterface/test/jinterface.dynspec b/lib/jinterface/test/jinterface.dynspec deleted file mode 100644 index 44712521df..0000000000 --- a/lib/jinterface/test/jinterface.dynspec +++ /dev/null @@ -1,32 +0,0 @@ -%% -*- erlang -*- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2006-2010. All Rights Reserved. -%% -%% The contents of this file are subject to the Erlang Public License, -%% Version 1.1, (the "License"); you may not use this file except in -%% compliance with the License. You should have received a copy of the -%% Erlang Public License along with this software. If not, it can be -%% retrieved online at http://www.erlang.org/. -%% -%% Software distributed under the License is distributed on an "AS IS" -%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See -%% the License for the specific language governing rights and limitations -%% under the License. -%% -%% %CopyrightEnd% -%% -%% You can test this file using this command. -%% file:script("jinterface.dynspec", [{'Os',"Unix"}]). - -case case code:priv_dir(jinterface) of - {error,bad_name} -> false; - P -> filelib:is_dir(P) end of - true -> - []; - false -> - NoApp = "No jinterface application", - [{skip,{nc_SUITE,NoApp}}, - {skip,{jinterface_SUITE,NoApp}}] -end. diff --git a/lib/jinterface/test/jinterface.spec b/lib/jinterface/test/jinterface.spec new file mode 100644 index 0000000000..99bc0f4005 --- /dev/null +++ b/lib/jinterface/test/jinterface.spec @@ -0,0 +1,20 @@ +%% -*- erlang -*- +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2006-2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +{suites,"../jinterface_test",all}. diff --git a/lib/jinterface/test/jinterface_SUITE.erl b/lib/jinterface/test/jinterface_SUITE.erl index db33059af5..b42101908e 100644 --- a/lib/jinterface/test/jinterface_SUITE.erl +++ b/lib/jinterface/test/jinterface_SUITE.erl @@ -163,7 +163,14 @@ status_handler() -> init_per_suite(Config) when is_list(Config) -> - jitu:init_all(Config). + case case code:priv_dir(jinterface) of + {error,bad_name} -> false; + P -> filelib:is_dir(P) end of + true -> + jitu:init_all(Config); + false -> + {skip,"No jinterface application"} + end. end_per_suite(Config) when is_list(Config) -> jitu:finish_all(Config). diff --git a/lib/jinterface/test/nc_SUITE.erl b/lib/jinterface/test/nc_SUITE.erl index fde2fd5071..f9a588f32c 100644 --- a/lib/jinterface/test/nc_SUITE.erl +++ b/lib/jinterface/test/nc_SUITE.erl @@ -69,12 +69,15 @@ init_per_group(_GroupName, Config) -> end_per_group(_GroupName, Config) -> Config. - - - - init_per_suite(Config) when is_list(Config) -> - jitu:init_all(Config). + case case code:priv_dir(jinterface) of + {error,bad_name} -> false; + P -> filelib:is_dir(P) end of + true -> + jitu:init_all(Config); + false -> + {skip,"No jinterface application"} + end. end_per_suite(Config) -> jitu:finish_all(Config). -- cgit v1.2.3