summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/IceGrid/activation/AllTests.cpp6
-rwxr-xr-xcpp/test/IceGrid/activation/run.py55
-rwxr-xr-xcpp/test/IceGrid/allocation/run.py46
-rw-r--r--cpp/test/IceGrid/deployer/AllTests.cpp2
-rw-r--r--cpp/test/IceGrid/deployer/application.xml2
-rwxr-xr-xcpp/test/IceGrid/deployer/run.py81
-rw-r--r--cpp/test/IceGrid/replication/AllTests.cpp4
-rw-r--r--cpp/test/IceGrid/replication/application.xml2
-rwxr-xr-xcpp/test/IceGrid/replication/icegridreplicationSvc.dsp6
-rwxr-xr-xcpp/test/IceGrid/replication/run.py42
-rw-r--r--cpp/test/IceGrid/session/AllTests.cpp2
-rwxr-xr-xcpp/test/IceGrid/session/run.py54
-rwxr-xr-xcpp/test/IceGrid/simple/run.py69
-rwxr-xr-xcpp/test/IceGrid/update/run.py48
14 files changed, 74 insertions, 345 deletions
diff --git a/cpp/test/IceGrid/activation/AllTests.cpp b/cpp/test/IceGrid/activation/AllTests.cpp
index a98b94dd836..949a18e2e5c 100644
--- a/cpp/test/IceGrid/activation/AllTests.cpp
+++ b/cpp/test/IceGrid/activation/AllTests.cpp
@@ -86,6 +86,9 @@ allTests(const Ice::CommunicatorPtr& communicator)
IceGrid::AdminPrx admin = IceGrid::AdminPrx::checkedCast(communicator->stringToProxy("IceGrid/Admin"));
IceGrid::RegistryPrx registry = IceGrid::RegistryPrx::checkedCast(communicator->stringToProxy("IceGrid/Registry"));
+ admin->startServer("node-1");
+ admin->startServer("node-2");
+
cout << "testing on-demand activation... " << flush;
try
{
@@ -531,5 +534,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(false);
}
cout << "ok" << endl;
+
+ admin->stopServer("node-1");
+ admin->stopServer("node-2");
}
diff --git a/cpp/test/IceGrid/activation/run.py b/cpp/test/IceGrid/activation/run.py
index 6a798035464..c2f76f66645 100755
--- a/cpp/test/IceGrid/activation/run.py
+++ b/cpp/test/IceGrid/activation/run.py
@@ -22,56 +22,7 @@ import TestUtil
import IceGridAdmin
name = os.path.join("IceGrid", "activation")
-testdir = os.path.join(toplevel, "test", name)
-#
-# Add locator options for the client and server. Since the server
-# invokes on the locator it's also considered to be a client.
-#
-additionalOptions = " --Ice.Default.Locator=\"IceGrid/Locator:default -p 12010\""
-
-IceGridAdmin.cleanDbDir(os.path.join(testdir, "db"))
-
-#
-# Start IceGrid registry and a node.
-#
-iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12010", testdir, 0)
-iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
-
-#
-# Test client/server with on demand activation.
-#
-server = os.path.join(testdir, "server")
-client = os.path.join(testdir, "client")
-
-print "registering server with icegrid...",
-IceGridAdmin.addApplication(os.path.join(testdir, "application.xml"),
- "test.dir=" + testdir + " ice.dir=" + toplevel + \
- " \\\"properties-override=" + TestUtil.clientServerOptions.replace("--", "") + "\\\"")
-IceGridAdmin.startServer("node-1")
-IceGridAdmin.startServer("node-2")
-print "ok"
-
-print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientOptions + additionalOptions + " --with-deploy" + " 2>&1")
-print "ok"
-
-TestUtil.printOutputFromPipe(clientPipe)
-
-clientStatus = TestUtil.closePipe(clientPipe)
-
-print "unregister server with icegrid...",
-IceGridAdmin.stopServer("node-1")
-IceGridAdmin.stopServer("node-2")
-IceGridAdmin.removeApplication("Test")
-print "ok"
-
-IceGridAdmin.shutdownIceGridNode()
-iceGridNodeThread.join()
-IceGridAdmin.shutdownIceGridRegistry()
-iceGridRegistryThread.join()
-
-if clientStatus:
- sys.exit(1)
-else:
- sys.exit(0)
+IceGridAdmin.iceGridTest(name, "application.xml", "", \
+ ' \\"properties-override=' + TestUtil.clientServerOptions.replace("--", "") + '\\"')
+sys.exit(0)
diff --git a/cpp/test/IceGrid/allocation/run.py b/cpp/test/IceGrid/allocation/run.py
index 34900817a5c..963388aaf35 100755
--- a/cpp/test/IceGrid/allocation/run.py
+++ b/cpp/test/IceGrid/allocation/run.py
@@ -22,48 +22,6 @@ import TestUtil
import IceGridAdmin
name = os.path.join("IceGrid", "allocation")
-testdir = os.path.join(toplevel, "test", name)
-client = os.path.join(testdir, "client")
-#
-# Add locator options for the client and server. Since the server
-# invokes on the locator it's also considered to be a client.
-#
-additionalOptions = " --Ice.Default.Locator=\"IceGrid/Locator:default -p 12010\" " + \
- "--Ice.PrintAdapterReady=0 --Ice.PrintProcessId=0 --IceDir=\"" + toplevel + "\" --TestDir=\"" + testdir + "\""
-
-IceGridAdmin.cleanDbDir(os.path.join(testdir, "db"))
-iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12010", testdir, 0)
-iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
-
-#
-# Deploy the application, run the client and remove the application.
-#
-print "deploying application...",
-IceGridAdmin.addApplication(os.path.join(testdir, "application.xml"), "ice.dir=" + toplevel + " test.dir=" + testdir)
-print "ok"
-
-print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientServerOptions + additionalOptions + " 2>&1")
-print "ok"
-
-try:
- TestUtil.printOutputFromPipe(clientPipe)
-except:
- pass
-
-clientStatus = TestUtil.closePipe(clientPipe)
-
-print "removing application...",
-IceGridAdmin.removeApplication("Test")
-print "ok"
-
-IceGridAdmin.shutdownIceGridNode()
-iceGridNodeThread.join()
-IceGridAdmin.shutdownIceGridRegistry()
-iceGridRegistryThread.join()
-
-if clientStatus:
- sys.exit(1)
-else:
- sys.exit(0)
+IceGridAdmin.iceGridTest(name, "application.xml")
+sys.exit(0)
diff --git a/cpp/test/IceGrid/deployer/AllTests.cpp b/cpp/test/IceGrid/deployer/AllTests.cpp
index a14210d6f81..a8036ab2a58 100644
--- a/cpp/test/IceGrid/deployer/AllTests.cpp
+++ b/cpp/test/IceGrid/deployer/AllTests.cpp
@@ -184,7 +184,7 @@ allTests(const Ice::CommunicatorPtr& comm)
{
test((*p)->getProperty("AppVarProp") == "AppVar");
test((*p)->getProperty("NodeVarProp") == "NodeVar");
- test((*p)->getProperty("RecursiveAppVarProp") == "test");
+ test((*p)->getProperty("RecursiveAppVarProp") == "Test");
test((*p)->getProperty("AppVarOverridedProp") == "OverridedInNode");
test((*p)->getProperty("AppVarDefinedInNodeProp") == "localnode");
test((*p)->getProperty("EscapedAppVarProp") == "${escaped}");
diff --git a/cpp/test/IceGrid/deployer/application.xml b/cpp/test/IceGrid/deployer/application.xml
index efdbddb5e84..6ddf2a66c9f 100644
--- a/cpp/test/IceGrid/deployer/application.xml
+++ b/cpp/test/IceGrid/deployer/application.xml
@@ -1,6 +1,6 @@
<icegrid>
- <application name="test" import-default-templates="true">
+ <application name="Test" import-default-templates="true">
<description>APP ${AppVar}</description>
diff --git a/cpp/test/IceGrid/deployer/run.py b/cpp/test/IceGrid/deployer/run.py
index 891911c447e..866d6e928f8 100755
--- a/cpp/test/IceGrid/deployer/run.py
+++ b/cpp/test/IceGrid/deployer/run.py
@@ -34,80 +34,11 @@ else:
iceBox = TestUtil.getIceBox(testdir)
-#
-# Start the client.
-#
-def startClient(options):
-
- global testdir
-
- fullClientOptions = TestUtil.clientOptions + \
- " --Ice.Default.Locator=\"IceGrid/Locator:default -p 12010\" " + \
- options
-
- print "starting client...",
- clientPipe = os.popen(os.path.join(testdir, "client") + fullClientOptions + " 2>&1")
- print "ok"
-
- TestUtil.printOutputFromPipe(clientPipe)
-
- clientStatus = TestUtil.closePipe(clientPipe)
- return clientStatus
-
-#
-# Start IceGrid.
-#
-IceGridAdmin.cleanDbDir(os.path.join(testdir, "db"))
-iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12010", testdir, 0)
-iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
-
-#
-# Deploy the application, run the client and remove the application.
-#
-print "deploying application...",
-IceGridAdmin.addApplication(os.path.join(testdir, "application.xml"), \
- "ice.dir=" + toplevel + " test.dir=" + testdir + " icebox.exe=" + iceBox)
-print "ok"
+IceGridAdmin.iceGridTest(name, "application.xml", "", '"icebox.exe=' + TestUtil.getIceBox(testdir) + '"')
-status = startClient("")
+# Tests with targets
+IceGridAdmin.iceGridTest(name, "application.xml", "-t", \
+ "icebox.exe=" + TestUtil.getIceBox(testdir) + \
+ " moreservers moreservices moreproperties")
-print "removing application...",
-IceGridAdmin.removeApplication("test")
-print "ok"
-
-if status:
- IceGridAdmin.shutdownIceGridNode()
- iceGridNodeThread.join()
- IceGridAdmin.shutdownIceGridRegistry()
- iceGridRegistryThread.join()
- sys.exit(1)
-
-
-#
-# Deploy the application with some targets to test targets, run the
-# client to test targets (-t options) and remove the application.
-#
-print "deploying application with target...",
-IceGridAdmin.addApplication(os.path.join(testdir, "application.xml"), \
- "moreservers moreservices moreproperties ice.dir=" + toplevel + " test.dir=" + testdir + \
- " icebox.exe=" + iceBox)
-print "ok"
-
-status = startClient("-t")
-
-print "removing application...",
-IceGridAdmin.removeApplication("test")
-print "ok"
-
-#
-# Shutdown IceGrid.
-#
-IceGridAdmin.shutdownIceGridNode()
-iceGridNodeThread.join()
-IceGridAdmin.shutdownIceGridRegistry()
-iceGridRegistryThread.join()
-
-if status:
- sys.exit(1)
-else:
- sys.exit(0)
+sys.exit(0)
diff --git a/cpp/test/IceGrid/replication/AllTests.cpp b/cpp/test/IceGrid/replication/AllTests.cpp
index 0008b57fa98..0e9765e28b7 100644
--- a/cpp/test/IceGrid/replication/AllTests.cpp
+++ b/cpp/test/IceGrid/replication/AllTests.cpp
@@ -29,7 +29,7 @@ instantiateServer(const AdminPrx& admin, const string& templ, const map<string,
nodeUpdate.name = "localnode";
nodeUpdate.serverInstances.push_back(desc);
ApplicationUpdateDescriptor update;
- update.name = "test";
+ update.name = "Test";
update.nodes.push_back(nodeUpdate);
try
{
@@ -62,7 +62,7 @@ removeServer(const AdminPrx& admin, const string& id)
nodeUpdate.name = "localnode";
nodeUpdate.removeServers.push_back(id);
ApplicationUpdateDescriptor update;
- update.name = "test";
+ update.name = "Test";
update.nodes.push_back(nodeUpdate);
try
{
diff --git a/cpp/test/IceGrid/replication/application.xml b/cpp/test/IceGrid/replication/application.xml
index a027f447019..6cfe4daa356 100644
--- a/cpp/test/IceGrid/replication/application.xml
+++ b/cpp/test/IceGrid/replication/application.xml
@@ -1,6 +1,6 @@
<icegrid>
- <application name="test">
+ <application name="Test">
<replica-group id="Default">
<object identity="Default" type="::Test::TestIntf"/>
diff --git a/cpp/test/IceGrid/replication/icegridreplicationSvc.dsp b/cpp/test/IceGrid/replication/icegridreplicationSvc.dsp
index c43df03fd40..7cc1afa9f76 100755
--- a/cpp/test/IceGrid/replication/icegridreplicationSvc.dsp
+++ b/cpp/test/IceGrid/replication/icegridreplicationSvc.dsp
@@ -44,7 +44,7 @@ RSC=rc.exe
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBRARY_EXPORTS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /WX /GR /GX /O2 /I "." /I "../../../include" /D "_USRDLL" /D "NDEBUG" /D "_CONSOLE" /FD /c
-# SUBTRACT CPP /Z<none> /Fr /YX
+# SUBTRACT CPP /Fr /YX
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
@@ -59,7 +59,7 @@ LINK32=link.exe
# Begin Special Build Tool
OutDir=.\Release
SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\testservice.* .
+PostBuild_Cmds=copy $(OutDir)\testservice.* . echo release > build.txt
# End Special Build Tool
!ELSEIF "$(CFG)" == "icegridreplicationSvc - Win32 Debug"
@@ -92,7 +92,7 @@ LINK32=link.exe
# Begin Special Build Tool
OutDir=.\Debug
SOURCE="$(InputPath)"
-PostBuild_Cmds=copy $(OutDir)\testserviced.* .
+PostBuild_Cmds=copy $(OutDir)\testserviced.* . echo debug > build.txt
# End Special Build Tool
!ENDIF
diff --git a/cpp/test/IceGrid/replication/run.py b/cpp/test/IceGrid/replication/run.py
index 02c2bf1e3b7..e6b53250a08 100755
--- a/cpp/test/IceGrid/replication/run.py
+++ b/cpp/test/IceGrid/replication/run.py
@@ -23,7 +23,6 @@ import IceGridAdmin
name = os.path.join("IceGrid", "replication")
testdir = os.path.join(toplevel, "test", name)
-client = os.path.join(testdir, "client")
if TestUtil.isWin32():
os.environ["PATH"] = testdir + ";" + os.getenv("PATH", "")
@@ -33,11 +32,6 @@ else:
os.environ["LD_LIBRARY_PATH"] = testdir + ":" + os.getenv("LD_LIBRARY_PATH", "")
os.environ["LD_LIBRARY_PATH_64"] = testdir + ":" + os.getenv("LD_LIBRARY_PATH_64", "")
-if TestUtil.isWin32() and os.path.exists(os.path.join(toplevel, "bin", "iceboxd.exe")):
- iceBox = os.path.join(toplevel, "bin", "iceboxd")
-else:
- iceBox = os.path.join(toplevel, "bin", "icebox")
-
#
# Add locator options for the client and server. Since the server
# invokes on the locator it's also considered to be a client.
@@ -51,36 +45,6 @@ else:
additionalOptions = " --Ice.Default.Locator=\"IceGrid/Locator:default -p 12010\"" + \
" --Ice.PrintAdapterReady=0 --Ice.PrintProcessId=0 --Ice.RetryIntervals=\"0 50 100 250\""
-IceGridAdmin.cleanDbDir(os.path.join(testdir, "db"))
-iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12010", testdir, 0)
-iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
-
-print "registering application with icegrid...",
-IceGridAdmin.addApplication(os.path.join(testdir, "application.xml"),
- "ice.dir=" + toplevel + " " + "test.dir=" + testdir + " icebox.exe=" + iceBox)
-print "ok"
-
-print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientServerOptions + additionalOptions + " 2>&1")
-print "ok"
-
-try:
- TestUtil.printOutputFromPipe(clientPipe)
-except:
- pass
-
-clientStatus = TestUtil.closePipe(clientPipe)
-
-print "unregister application with icegrid...",
-IceGridAdmin.removeApplication("test")
-print "ok"
-
-IceGridAdmin.shutdownIceGridNode()
-iceGridNodeThread.join()
-IceGridAdmin.shutdownIceGridRegistry()
-iceGridRegistryThread.join()
-
-if clientStatus:
- sys.exit(1)
-else:
- sys.exit(0)
+IceGridAdmin.iceGridTest(name, "application.xml", "--Ice.RetryIntervals=\"0 50 100 250\"", \
+ "icebox.exe=" + TestUtil.getIceBox(testdir))
+sys.exit(0)
diff --git a/cpp/test/IceGrid/session/AllTests.cpp b/cpp/test/IceGrid/session/AllTests.cpp
index 2e4fc659ded..bbecb409710 100644
--- a/cpp/test/IceGrid/session/AllTests.cpp
+++ b/cpp/test/IceGrid/session/AllTests.cpp
@@ -263,6 +263,7 @@ public:
if(!timedWait(IceUtil::Time::seconds(10)))
{
cerr << "timeout: " << file << ":" << line << endl;
+ ObserverStackTracer::printStack();
test(false); // Timeout
}
}
@@ -453,6 +454,7 @@ public:
if(!timedWait(IceUtil::Time::seconds(10)))
{
cerr << "timeout: " << file << ":" << line << endl;
+ ObserverStackTracer::printStack();
test(false); // Timeout
}
}
diff --git a/cpp/test/IceGrid/session/run.py b/cpp/test/IceGrid/session/run.py
index 481e56b66f0..6d35360c54e 100755
--- a/cpp/test/IceGrid/session/run.py
+++ b/cpp/test/IceGrid/session/run.py
@@ -23,55 +23,21 @@ import IceGridAdmin
name = os.path.join("IceGrid", "session")
testdir = os.path.join(toplevel, "test", name)
-client = os.path.join(testdir, "client")
-#
-# Add locator options for the client and server. Since the server
-# invokes on the locator it's also considered to be a client.
-#
-additionalOptions = " --Ice.Default.Locator=\"IceGrid/Locator:default -p 12010\" " + \
- "--Ice.PrintAdapterReady=0 --Ice.PrintProcessId=0 --IceDir=\"" + toplevel + "\" --TestDir=\"" + testdir + "\""
+node1Dir = os.path.join(testdir, "db", "node-1")
+if not os.path.exists(node1Dir):
+ os.mkdir(node1Dir)
+else:
+ IceGridAdmin.cleanDbDir(node1Dir)
IceGridAdmin.registryOptions += \
+ r' --IceGrid.Registry.DynamicRegistration' + \
r' --IceGrid.Registry.PermissionsVerifier="ClientPermissionsVerifier"' + \
r' --IceGrid.Registry.AdminPermissionsVerifier="AdminPermissionsVerifier"' + \
r' --IceGrid.Registry.SSLPermissionsVerifier="SSLPermissionsVerifier"' + \
r' --IceGrid.Registry.AdminSSLPermissionsVerifier="SSLPermissionsVerifier"'
-IceGridAdmin.cleanDbDir(os.path.join(testdir, "db"))
-iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12010", testdir, 1)
-iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
-
-node1Dir = os.path.join(testdir, "db", "node-1")
-os.mkdir(node1Dir)
-
-print "deploying application...",
-IceGridAdmin.addApplication(os.path.join(testdir, "application.xml"),
- "ice.dir=" + toplevel + " test.dir=" + testdir + \
- " \\\"properties-override=" + TestUtil.clientServerOptions.replace("--", "") + "\\\"")
-print "ok"
-
-print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientServerOptions + additionalOptions + " 2>&1")
-print "ok"
-
-try:
- TestUtil.printOutputFromPipe(clientPipe)
-except:
- pass
-
-clientStatus = TestUtil.closePipe(clientPipe)
-
-print "removing application...",
-IceGridAdmin.removeApplication("Test")
-print "ok"
-
-IceGridAdmin.shutdownIceGridNode()
-iceGridNodeThread.join()
-IceGridAdmin.shutdownIceGridRegistry()
-iceGridRegistryThread.join()
-
-if clientStatus:
- sys.exit(1)
-else:
- sys.exit(0)
+IceGridAdmin.iceGridTest(name, "application.xml", \
+ "--IceDir=\"" + toplevel + "\" --TestDir=\"" + testdir + "\"", \
+ '\\"properties-override=' + TestUtil.clientServerOptions.replace("--", "") + '\\"')
+sys.exit(0)
diff --git a/cpp/test/IceGrid/simple/run.py b/cpp/test/IceGrid/simple/run.py
index 0c0e85162aa..2137048f0c0 100755
--- a/cpp/test/IceGrid/simple/run.py
+++ b/cpp/test/IceGrid/simple/run.py
@@ -23,68 +23,41 @@ import IceGridAdmin
name = os.path.join("IceGrid", "simple")
testdir = os.path.join(toplevel, "test", name)
+server = os.path.join(testdir, "server")
+client = os.path.join(testdir, "client")
-#
-# Add locator options for the client and server. Since the server
-# invokes on the locator it's also considered to be a client.
-#
additionalOptions = " --Ice.Default.Locator=\"IceGrid/Locator:default -p 12010\""
-
-IceGridAdmin.cleanDbDir(os.path.join(testdir, "db"))
-
-#
-# Start IceGrid registry.
-#
-iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12010", testdir, 1)
-
-#
-# Test client/server without on demand activation.
-#
additionalServerOptions=" --TestAdapter.Endpoints=default --TestAdapter.AdapterId=TestAdapter " + additionalOptions
-TestUtil.mixedClientServerTestWithOptions(name, additionalServerOptions, additionalOptions)
-#
-# Shutdown the registry.
-#
-IceGridAdmin.shutdownIceGridRegistry()
-iceGridRegistryThread.join()
-
-IceGridAdmin.cleanDbDir(os.path.join(testdir, "db"))
-
-#
-# Start IceGrid registry and a node.
-#
-iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12010", testdir, 0)
-iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
+iceGridRegistryPipe = IceGridAdmin.startIceGridRegistry(testdir, 1)
#
-# Test client/server with on demand activation.
+# Test client/server without on demand activation.
#
-server = os.path.join(testdir, "server")
-client = os.path.join(testdir, "client")
-
-print "registering server with icegrid...",
-IceGridAdmin.addApplication(os.path.join(testdir, "simple_server.xml"), "test.dir=" + testdir)
+print "starting sever...",
+serverPipe = os.popen(server + TestUtil.serverOptions + additionalServerOptions + " 2>&1")
+TestUtil.getServerPid(serverPipe)
+TestUtil.getAdapterReady(serverPipe)
print "ok"
-
+
print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientOptions + additionalOptions + " --with-deploy" + " 2>&1")
+clientPipe = os.popen(client + TestUtil.clientOptions + additionalOptions + " 2>&1")
print "ok"
TestUtil.printOutputFromPipe(clientPipe)
-
+
clientStatus = TestUtil.closePipe(clientPipe)
-
-print "unregister server with icegrid...",
-IceGridAdmin.removeApplication("Test")
-print "ok"
+if clientStatus:
+ killServers()
-IceGridAdmin.shutdownIceGridNode()
-iceGridNodeThread.join()
IceGridAdmin.shutdownIceGridRegistry()
-iceGridRegistryThread.join()
+TestUtil.joinServers()
-if clientStatus:
+if clientStatus or TestUtil.serverStatus():
sys.exit(1)
-else:
- sys.exit(0)
+
+#
+# Test client/server with on demand activation.
+#
+IceGridAdmin.iceGridTest(name, "simple_server.xml", "--with-deploy")
+sys.exit(0)
diff --git a/cpp/test/IceGrid/update/run.py b/cpp/test/IceGrid/update/run.py
index cb2cb079ddd..1e78f2859cd 100755
--- a/cpp/test/IceGrid/update/run.py
+++ b/cpp/test/IceGrid/update/run.py
@@ -23,45 +23,23 @@ import IceGridAdmin
name = os.path.join("IceGrid", "update")
testdir = os.path.join(toplevel, "test", name)
-client = os.path.join(testdir, "client")
-
-#
-# Add locator options for the client and server. Since the server
-# invokes on the locator it's also considered to be a client.
-#
-additionalOptions = " --Ice.Default.Locator=\"IceGrid/Locator:default -p 12010\" " + \
- "--Ice.PrintAdapterReady=0 --Ice.PrintProcessId=0 --IceDir=\"" + toplevel + "\" --TestDir=\"" + testdir + "\""
-
-IceGridAdmin.cleanDbDir(os.path.join(testdir, "db"))
-iceGridRegistryThread = IceGridAdmin.startIceGridRegistry("12010", testdir, 0)
-iceGridNodeThread = IceGridAdmin.startIceGridNode(testdir)
node1Dir = os.path.join(testdir, "db", "node-1")
-os.mkdir(node1Dir)
+if not os.path.exists(node1Dir):
+ os.mkdir(node1Dir)
+else:
+ IceGridAdmin.cleanDbDir(node1Dir)
node2Dir = os.path.join(testdir, "db", "node-2")
-os.mkdir(node2Dir)
+if not os.path.exists(node2Dir):
+ os.mkdir(node2Dir)
+else:
+ IceGridAdmin.cleanDbDir(node2Dir)
-nodeOverrideOptions = ' --NodePropertiesOverride="' + TestUtil.clientServerOptions.replace("--", "") + \
+nodeOverrideOptions = "--IceDir=\"" + toplevel + "\" --TestDir=\"" + testdir + "\"" + \
+ ' --NodePropertiesOverride="' + \
+ TestUtil.clientServerOptions.replace("--", "") + \
' Ice.ServerIdleTime=0 Ice.PrintProcessId=0 Ice.PrintAdapterReady=0' + '"'
-print "starting client...",
-clientPipe = os.popen(client + TestUtil.clientServerOptions + additionalOptions + nodeOverrideOptions + " 2>&1")
-print "ok"
-
-try:
- TestUtil.printOutputFromPipe(clientPipe)
-except:
- pass
-
-clientStatus = TestUtil.closePipe(clientPipe)
-
-IceGridAdmin.shutdownIceGridNode()
-iceGridNodeThread.join()
-IceGridAdmin.shutdownIceGridRegistry()
-iceGridRegistryThread.join()
-
-if clientStatus:
- sys.exit(1)
-else:
- sys.exit(0)
+IceGridAdmin.iceGridTest(name, "", nodeOverrideOptions)
+sys.exit(0)