diff options
Diffstat (limited to 'java/test/IcePack/deployer/run.py')
-rwxr-xr-x | java/test/IcePack/deployer/run.py | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/java/test/IcePack/deployer/run.py b/java/test/IcePack/deployer/run.py index cf523418df2..6ced6e9840a 100755 --- a/java/test/IcePack/deployer/run.py +++ b/java/test/IcePack/deployer/run.py @@ -26,33 +26,22 @@ sys.path.append(os.path.join(toplevel, "config")) import TestUtil import IcePackAdmin -if not os.environ.has_key('ICE_HOME'): - print "ICE_HOME is not defined." - sys.exit(0) - -ice_home = os.environ['ICE_HOME'] - -testdir = os.path.join(toplevel, "test", "IcePack", "deployer") - - -os.environ['CLASSPATH'] = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + \ - TestUtil.sep + os.environ['CLASSPATH'] +name = os.path.join("IcePack", "deployer") +testdir = os.path.join(toplevel, "test", name) +os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.environ["CLASSPATH"] # # Start the client. # def startClient(options): - updatedClientOptions = TestUtil.clientOptions.replace("TOPLEVELDIR", toplevel) + \ - " --Ice.Default.Locator=\"IcePack/Locator:default -p 12346\" " + \ - options + fullClientOptions = TestUtil.clientOptions + \ + " --Ice.Default.Locator=\"IcePack/Locator:default -p 12346\" " + \ + options print "starting client...", - classpath = os.path.join(toplevel, "lib") + TestUtil.sep + os.path.join(testdir, "classes") + TestUtil.sep + \ - os.getenv("CLASSPATH", "") - - clientPipe = os.popen("java -ea -classpath \"" + classpath + "\" Client " + updatedClientOptions) + clientPipe = os.popen("java -ea Client " + fullClientOptions) print "ok" for output in clientPipe.xreadlines(): @@ -62,30 +51,25 @@ def startClient(options): if clientStatus: print "failed" -if TestUtil.protocol == "ssl": - targets = "ssl" -else: - targets = "" - # # Start IcePack. # IcePackAdmin.cleanDbDir(os.path.join(testdir, "db")) -icePackRegistryPipe = IcePackAdmin.startIcePackRegistry(ice_home, "12346", testdir) -icePackNodePipe = IcePackAdmin.startIcePackNode(ice_home, testdir) +icePackRegistryPipe = IcePackAdmin.startIcePackRegistry("12346", testdir) +icePackNodePipe = IcePackAdmin.startIcePackNode(testdir) # # Deploy the application, run the client and remove the application. # print "deploying application...", -IcePackAdmin.addApplication(ice_home, os.path.join(testdir, "application.xml"), targets); +IcePackAdmin.addApplication(os.path.join(testdir, "application.xml"), ""); print "ok" startClient("") print "removing application...", -IcePackAdmin.removeApplication(ice_home, os.path.join(testdir, "application.xml")); +IcePackAdmin.removeApplication(os.path.join(testdir, "application.xml")); print "ok" # @@ -93,20 +77,19 @@ print "ok" # client to test targets (-t options) and remove the application. # print "deploying application with target...", -IcePackAdmin.addApplication(ice_home, os.path.join(testdir, "application.xml"), - targets + " debug localnode.Server1.manual"); +IcePackAdmin.addApplication(os.path.join(testdir, "application.xml"), "debug localnode.Server1.manual") print "ok" startClient("-t") print "removing application...", -IcePackAdmin.removeApplication(ice_home, os.path.join(testdir, "application.xml")); +IcePackAdmin.removeApplication(os.path.join(testdir, "application.xml")); print "ok" # # Shutdown IcePack. # -IcePackAdmin.shutdownIcePackNode(ice_home, icePackNodePipe) -IcePackAdmin.shutdownIcePackRegistry(ice_home, icePackRegistryPipe) +IcePackAdmin.shutdownIcePackNode(icePackNodePipe) +IcePackAdmin.shutdownIcePackRegistry(icePackRegistryPipe) sys.exit(0) |