summaryrefslogtreecommitdiff
path: root/scripts/IceGridAdmin.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2009-12-18 21:13:09 +0100
committerBenoit Foucher <benoit@zeroc.com>2009-12-18 21:13:09 +0100
commitaa6809bd9431b5cc3952d6a6e2abde76b2bf003c (patch)
tree0da37ff519b9a3b6effbd1583b61abbf6f132c2a /scripts/IceGridAdmin.py
parenthttp://bugzilla/bugzilla/show_bug.cgi?id=4509 - parallel build issues. (diff)
downloadice-aa6809bd9431b5cc3952d6a6e2abde76b2bf003c.tar.bz2
ice-aa6809bd9431b5cc3952d6a6e2abde76b2bf003c.tar.xz
ice-aa6809bd9431b5cc3952d6a6e2abde76b2bf003c.zip
Fixed bug 4511 - properties override doesn't handle quotes
Diffstat (limited to 'scripts/IceGridAdmin.py')
-rw-r--r--scripts/IceGridAdmin.py32
1 files changed, 22 insertions, 10 deletions
diff --git a/scripts/IceGridAdmin.py b/scripts/IceGridAdmin.py
index 49919ceb965..2d14aa89f78 100644
--- a/scripts/IceGridAdmin.py
+++ b/scripts/IceGridAdmin.py
@@ -8,7 +8,7 @@
#
# **********************************************************************
-import sys, os, TestUtil
+import sys, os, TestUtil, shlex
from threading import Thread
#
@@ -129,6 +129,26 @@ def shutdownIceGridRegistry(procs):
for p in procs:
p.waitTestSuccess()
+def iceGridNodePropertiesOverride():
+
+ #
+ # Create property overrides from command line options.
+ #
+ overrideOptions = ''
+ for opt in shlex.split(TestUtil.getCommandLineProperties("", TestUtil.DriverConfig("server"))):
+ index = opt.find("=")
+ if index == -1:
+ overrideOptions += ("%s=1 ") % opt
+ else:
+ key = opt[0:index]
+ value = opt[index + 1:]
+ if(value.find(' ') == -1):
+ overrideOptions += ("%s=%s ") % (key, value)
+ else:
+ overrideOptions += ("%s=\\\"%s\\\" ") % (key, value)
+
+ return overrideOptions
+
def startIceGridNode(testdir):
iceGrid = ""
@@ -143,15 +163,7 @@ def startIceGridNode(testdir):
else:
cleanDbDir(dataDir)
- #
- # Create property overrides from command line options.
- #
- overrideOptions = '"'
- for opt in TestUtil.getCommandLine("", TestUtil.DriverConfig("server")).split():
- opt = opt.replace("--", "")
- if opt.find("=") == -1:
- opt += "=1"
- overrideOptions += opt + " "
+ overrideOptions = '" ' + iceGridNodePropertiesOverride()
overrideOptions += ' Ice.ServerIdleTime=0 Ice.PrintProcessId=0 Ice.PrintAdapterReady=0"'
print "starting icegrid node...",