aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface/test
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jinterface/test')
-rw-r--r--lib/jinterface/test/Makefile5
-rw-r--r--lib/jinterface/test/jinterface.cover2
-rw-r--r--lib/jinterface/test/jinterface.spec (renamed from lib/jinterface/test/jinterface.dynspec)14
-rw-r--r--lib/jinterface/test/jinterface_SUITE.erl46
-rw-r--r--lib/jinterface/test/nc_SUITE.erl46
5 files changed, 64 insertions, 49 deletions
diff --git a/lib/jinterface/test/Makefile b/lib/jinterface/test/Makefile
index 36955d1e91..ac9556c2f7 100644
--- a/lib/jinterface/test/Makefile
+++ b/lib/jinterface/test/Makefile
@@ -32,7 +32,8 @@ RELSYSDIR = $(RELEASE_PATH)/jinterface_test
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-TEST_SPEC_FILE = jinterface.dynspec
+TEST_SPEC_FILE = jinterface.spec
+COVER_FILE = jinterface.cover
MODULES = nc_SUITE \
jinterface_SUITE
@@ -80,5 +81,5 @@ release_docs_spec:
release_tests_spec: tests
$(INSTALL_DIR) $(RELSYSDIR)
- $(INSTALL_DATA) $(TEST_SPEC_FILE) $(ERL_FILES) $(RELSYSDIR)
+ $(INSTALL_DATA) $(TEST_SPEC_FILE) $(COVER_FILE) $(ERL_FILES) $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
diff --git a/lib/jinterface/test/jinterface.cover b/lib/jinterface/test/jinterface.cover
new file mode 100644
index 0000000000..d4edcd99d2
--- /dev/null
+++ b/lib/jinterface/test/jinterface.cover
@@ -0,0 +1,2 @@
+{incl_app,jinterface,details}.
+
diff --git a/lib/jinterface/test/jinterface.dynspec b/lib/jinterface/test/jinterface.spec
index 44712521df..99bc0f4005 100644
--- a/lib/jinterface/test/jinterface.dynspec
+++ b/lib/jinterface/test/jinterface.spec
@@ -17,16 +17,4 @@
%%
%% %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.
+{suites,"../jinterface_test",all}.
diff --git a/lib/jinterface/test/jinterface_SUITE.erl b/lib/jinterface/test/jinterface_SUITE.erl
index ea097680dd..e608bcb093 100644
--- a/lib/jinterface/test/jinterface_SUITE.erl
+++ b/lib/jinterface/test/jinterface_SUITE.erl
@@ -18,7 +18,8 @@
%%
-module(jinterface_SUITE).
--export([all/1, init_per_suite/1, end_per_suite/1,
+-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
+ init_per_suite/1, end_per_suite/1,
init_per_testcase/2, end_per_testcase/2]).
-export([nodename/1, register_and_whereis/1, get_names/1, boolean_atom/1,
@@ -31,13 +32,14 @@
erl_link_java_exit/1, java_link_erl_exit/1,
internal_link_linking_exits/1, internal_link_linked_exits/1,
internal_unlink_linking_exits/1, internal_unlink_linked_exits/1,
- normal_exit/1, kill_mbox/1, kill_erl_proc_from_java/1,
- kill_mbox_from_erlang/1, erl_exit_with_reason_any_term/1,
+ normal_exit/1, kill_mbox/1,kill_erl_proc_from_java/1,
+ kill_mbox_from_erlang/1,
+ erl_exit_with_reason_any_term/1,
java_exit_with_reason_any_term/1,
status_handler_localStatus/1, status_handler_remoteStatus/1,
status_handler_connAttempt/1]).
--include("test_server.hrl").
+-include_lib("common_test/include/ct.hrl").
-include("test_server_line.hrl").
-define(debug,true).
@@ -80,14 +82,21 @@
%%%-----------------------------------------------------------------
%%% INIT/END
%%%-----------------------------------------------------------------
-all(suite) ->
- lists:append([
- fundamental(),
- ping(),
- send_receive(),
- link_unlink(),
- status_handler()
- ]).
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ lists:append([fundamental(), ping(), send_receive(),
+ link_unlink(), status_handler()]).
+
+groups() ->
+ [].
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
fundamental() ->
[
@@ -154,11 +163,22 @@ 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).
+init_per_testcase(Case, _Config)
+ when Case =:= kill_mbox;
+ Case =:= kill_mbox_from_erlang ->
+ {skip, "Not yet implemented"};
init_per_testcase(_Case,Config) ->
Dog = ?t:timetrap({seconds,10}),
[{watch_dog,Dog}|Config].
diff --git a/lib/jinterface/test/nc_SUITE.erl b/lib/jinterface/test/nc_SUITE.erl
index 82dd3c2535..03f6f2036c 100644
--- a/lib/jinterface/test/nc_SUITE.erl
+++ b/lib/jinterface/test/nc_SUITE.erl
@@ -19,11 +19,11 @@
-module(nc_SUITE).
--include("test_server.hrl").
+-include_lib("common_test/include/ct.hrl").
-include("test_server_line.hrl").
--export([all/1,
+-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
init_per_suite/1,
end_per_suite/1,
init_per_testcase/2,
@@ -50,30 +50,34 @@
%% Top of cases
-all(doc) -> [];
-all(suite) -> [pid_roundtrip,
- port_roundtrip,
- ref_roundtrip,
- new_float,
- old_stuff,
- binary_roundtrip,
- decompress_roundtrip,
- compress_roundtrip,
- integer_roundtrip,
- fun_roundtrip,
- lists_roundtrip,
- lists_roundtrip_2,
- lists_iterator,
- unicode,
- unicode_list_to_string,
- unicode_string_to_list,
- connect].
+suite() -> [{ct_hooks,[ts_install_cth]}].
+all() ->
+ [pid_roundtrip, port_roundtrip, ref_roundtrip,
+ new_float, old_stuff, binary_roundtrip,
+ decompress_roundtrip, compress_roundtrip,
+ integer_roundtrip, fun_roundtrip, lists_roundtrip,
+ lists_roundtrip_2, lists_iterator, unicode,
+ unicode_list_to_string, unicode_string_to_list, connect].
+groups() ->
+ [].
+init_per_group(_GroupName, Config) ->
+ 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).