From 2cbb5d191fd8f94c113cbf61c243999388f65c3b Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 5 Oct 2010 17:58:16 +0200 Subject: Update all fin_per_testcase to end_per_testcase. --- lib/inviso/test/inviso_tool_SUITE.erl | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'lib/inviso') diff --git a/lib/inviso/test/inviso_tool_SUITE.erl b/lib/inviso/test/inviso_tool_SUITE.erl index 206e117c86..29d1c8f539 100644 --- a/lib/inviso/test/inviso_tool_SUITE.erl +++ b/lib/inviso/test/inviso_tool_SUITE.erl @@ -1,19 +1,21 @@ -% ``The contents of this file are subject to the Erlang Public License, +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 1997-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 via the world wide web at http://www.erlang.org/. -%% +%% 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. -%% -%% The Initial Developer of the Original Code is Ericsson Utvecklings AB. -%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings -%% AB. All Rights Reserved.'' -%% -%% $Id$ +%% +%% %CopyrightEnd% +%% %% %% Description: %% Test suite for the inviso_tool. It is here assumed that inviso works @@ -89,7 +91,7 @@ init_per_testcase(_Case,Config) -> insert_timetraphandle_config(TH,NewConfig2). %% ----------------------------------------------------------------------------- -fin_per_testcase(_Case,Config) -> +end_per_testcase(_Case,Config) -> ?l test_server:stop_node(get_remotenode_config(inviso1,Config)), ?l test_server:stop_node(get_remotenode_config(inviso2,Config)), ?l test_server:timetrap_cancel(get_timetraphandle_config(Config)), -- cgit v1.2.3 From 261a5886d168b451a169f6b30e29fefad38fb332 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 12 Oct 2010 11:00:39 +0200 Subject: Update inviso tests to conform with common_test standard --- lib/inviso/test/inviso.spec | 2 +- lib/inviso/test/inviso_tool_SUITE.erl | 37 +++++++++++++++++++++++++---------- 2 files changed, 28 insertions(+), 11 deletions(-) (limited to 'lib/inviso') diff --git a/lib/inviso/test/inviso.spec b/lib/inviso/test/inviso.spec index d655771d64..49b3f67096 100644 --- a/lib/inviso/test/inviso.spec +++ b/lib/inviso/test/inviso.spec @@ -1 +1 @@ -{topcase, {dir, "../inviso_test"}}. +{suites,"inviso_test",all}. diff --git a/lib/inviso/test/inviso_tool_SUITE.erl b/lib/inviso/test/inviso_tool_SUITE.erl index 29d1c8f539..839cd0dd26 100644 --- a/lib/inviso/test/inviso_tool_SUITE.erl +++ b/lib/inviso/test/inviso_tool_SUITE.erl @@ -28,20 +28,25 @@ -module(inviso_tool_SUITE). -compile(export_all). --include("test_server.hrl"). +-include_lib("common_test/include/ct.hrl"). -include_lib("kernel/include/file.hrl"). -define(l,?line). -all(suite) -> - [ - dist_basic_1, - dist_rtc, - dist_reconnect, - dist_adopt, - dist_history, - dist_start_session_special - ]. +all() -> +[dist_basic_1, dist_rtc, dist_reconnect, dist_adopt, + dist_history, dist_start_session_special]. + +groups() -> + []. + +init_per_group(_GroupName, Config) -> + Config. + +end_per_group(_GroupName, Config) -> + Config. + + %% ----------------------------------------------------------------------------- init_per_suite(Config) -> @@ -222,6 +227,10 @@ dist_basic_1(Config) when list(Config) -> Nodes), %% Start a test process at every node with a runtime component. ?l lists:foreach(fun(N)->spawn(N,?MODULE,test_proc_init,[]) end,Nodes), + + %% Let the processes start + timer:sleep(100), + %% Find the pids of the test processes. ?l TestProcs=lists:map(fun(N)->rpc:call(N,erlang,whereis,[inviso_tool_test_proc]) end, Nodes), @@ -502,6 +511,10 @@ dist_rtc(Config) when is_list(Config) -> Nodes), %% Start a test process at every node with a runtime component. ?l lists:foreach(fun(N)->spawn(N,?MODULE,test_proc_init,[]) end,Nodes), + + %% Let the processes start + timer:sleep(100), + %% Find the pids of the test processes. ?l TestProcs=lists:map(fun(N)->rpc:call(N,erlang,whereis,[inviso_tool_test_proc]) end, Nodes), @@ -555,6 +568,10 @@ dist_reconnect(Config) when list(Config) -> ?l start_inviso_tool_session(CNode,[],1,Nodes), %% Start a test process at every node with a runtime component. ?l lists:foreach(fun(N)->spawn(N,?MODULE,test_proc_init,[]) end,Nodes), + + %% Let the processes start + timer:sleep(100), + %% Find the pids of the test processes. ?l TestProcs=lists:map(fun(N)->rpc:call(N,erlang,whereis,[inviso_tool_test_proc]) end, Nodes), -- cgit v1.2.3 From 83f932257470f5ae01fc61130e997fdea0562653 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Mon, 6 Dec 2010 16:48:31 +0100 Subject: Add ts_install_scb to suite/0 --- lib/inviso/test/inviso_tool_SUITE.erl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/inviso') diff --git a/lib/inviso/test/inviso_tool_SUITE.erl b/lib/inviso/test/inviso_tool_SUITE.erl index 839cd0dd26..df95972534 100644 --- a/lib/inviso/test/inviso_tool_SUITE.erl +++ b/lib/inviso/test/inviso_tool_SUITE.erl @@ -33,6 +33,8 @@ -define(l,?line). +suite() -> [{suite_callbacks,[ts_install_scb]}]. + all() -> [dist_basic_1, dist_rtc, dist_reconnect, dist_adopt, dist_history, dist_start_session_special]. -- cgit v1.2.3 From 1dbe670df66a89942ce544be59e6314a80332452 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Tue, 14 Dec 2010 16:00:33 +0100 Subject: Fix formatting for invision --- lib/inviso/test/inviso_tool_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/inviso') diff --git a/lib/inviso/test/inviso_tool_SUITE.erl b/lib/inviso/test/inviso_tool_SUITE.erl index df95972534..e0704c3d2b 100644 --- a/lib/inviso/test/inviso_tool_SUITE.erl +++ b/lib/inviso/test/inviso_tool_SUITE.erl @@ -36,17 +36,17 @@ suite() -> [{suite_callbacks,[ts_install_scb]}]. all() -> -[dist_basic_1, dist_rtc, dist_reconnect, dist_adopt, - dist_history, dist_start_session_special]. + [dist_basic_1, dist_rtc, dist_reconnect, dist_adopt, + dist_history, dist_start_session_special]. groups() -> []. init_per_group(_GroupName, Config) -> - Config. + Config. end_per_group(_GroupName, Config) -> - Config. + Config. %% ----------------------------------------------------------------------------- -- cgit v1.2.3 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/inviso/test/inviso.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/inviso') diff --git a/lib/inviso/test/inviso.spec b/lib/inviso/test/inviso.spec index 49b3f67096..49f9b0b460 100644 --- a/lib/inviso/test/inviso.spec +++ b/lib/inviso/test/inviso.spec @@ -1 +1 @@ -{suites,"inviso_test",all}. +{suites,"../inviso_test",all}. -- cgit v1.2.3 From cfa01c9bd748df38750dc4841030e6520610538a Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 12 Jan 2011 14:56:23 +0100 Subject: Update and add cover spec files to work with common_test --- lib/inviso/test/Makefile | 2 +- lib/inviso/test/inviso.cover | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 lib/inviso/test/inviso.cover (limited to 'lib/inviso') diff --git a/lib/inviso/test/Makefile b/lib/inviso/test/Makefile index 27fe99703a..cd372624b5 100644 --- a/lib/inviso/test/Makefile +++ b/lib/inviso/test/Makefile @@ -52,7 +52,7 @@ release_spec: opt release_tests_spec: make_emakefile $(INSTALL_DIR) $(RELSYSDIR) - $(INSTALL_DATA) inviso.spec $(ERL_FILES) $(RELSYSDIR) + $(INSTALL_DATA) inviso.spec inviso.cover $(ERL_FILES) $(RELSYSDIR) chmod -f -R u+w $(RELSYSDIR) @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -) diff --git a/lib/inviso/test/inviso.cover b/lib/inviso/test/inviso.cover new file mode 100644 index 0000000000..e23b9fa59b --- /dev/null +++ b/lib/inviso/test/inviso.cover @@ -0,0 +1,2 @@ +{incl_app,inviso,details}. + -- cgit v1.2.3 From 308d6638450f5ffc7f432302367e84bcd92ea683 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Wed, 9 Feb 2011 19:10:44 +0100 Subject: Rename Suite Callback to Common Test Hook --- lib/inviso/test/inviso_tool_SUITE.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/inviso') diff --git a/lib/inviso/test/inviso_tool_SUITE.erl b/lib/inviso/test/inviso_tool_SUITE.erl index e0704c3d2b..d59e3b5fa8 100644 --- a/lib/inviso/test/inviso_tool_SUITE.erl +++ b/lib/inviso/test/inviso_tool_SUITE.erl @@ -33,7 +33,7 @@ -define(l,?line). -suite() -> [{suite_callbacks,[ts_install_scb]}]. +suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [dist_basic_1, dist_rtc, dist_reconnect, dist_adopt, -- cgit v1.2.3