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