diff options
author | Matthew Newhook <matthew@zeroc.com> | 2009-03-12 02:01:55 +0800 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2009-03-12 02:01:55 +0800 |
commit | c35697fb275246428b0896af0d995519ec20c476 (patch) | |
tree | 80fc1b158fb8a79dadf2618ff4bb3b9ba2637847 /scripts/TestUtil.py | |
parent | backout bogus change from 3822 (diff) | |
download | ice-c35697fb275246428b0896af0d995519ec20c476.tar.bz2 ice-c35697fb275246428b0896af0d995519ec20c476.tar.xz ice-c35697fb275246428b0896af0d995519ec20c476.zip |
http://bugzilla/bugzilla/show_bug.cgi?id=3808 - odd output in IceGrid/activation test.
Squashed commit of the following:
commit 201ba9220339ff3a1a828b16782bf78d39949ed7
Author: Matthew Newhook <matthew@centosvm4.matthew.zeroc.com>
Date: Thu Mar 12 01:51:20 2009 +0800
Delay the start of the reading thread until "ok" has been printed.
commit a5eadfe584720f93502fffcd08ef40acab5416c6
Author: Matthew Newhook <matthew@centosvm4.matthew.zeroc.com>
Date: Thu Mar 12 00:52:17 2009 +0800
added missing flush.
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-x | scripts/TestUtil.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py index 309499d6a65..a69d9b6b7e9 100755 --- a/scripts/TestUtil.py +++ b/scripts/TestUtil.py @@ -763,13 +763,13 @@ def isDebug(): return debug import Expect -def spawn(cmd, env = None, cwd = None): +def spawn(cmd, env = None, cwd = None, startReader = True): if debug: print "(%s)" % cmd, - return Expect.Expect(cmd, env = env, logfile=tracefile, cwd = cwd) + return Expect.Expect(cmd, startReader = startReader, env = env, logfile=tracefile, cwd = cwd) -def spawnClient(cmd, env = None, cwd = None, echo = True): - client = spawn(cmd, env, cwd) +def spawnClient(cmd, env = None, cwd = None, echo = True, startReader = True): + client = spawn(cmd, env, cwd, startReader = startReader) if echo: client.trace() return client @@ -868,8 +868,9 @@ def clientServerTest(additionalServerOptions = "", additionalClientOptions = "", else: print "starting %s %s ..." % (clientLang, clientDesc), client = getCommandLine(client, clientCfg) + " " + additionalClientOptions - clientProc = spawnClient(client, env = clientenv) + clientProc = spawnClient(client, env = clientenv, startReader = False) print "ok" + clientProc.startReader() clientProc.waitTestSuccess() serverProc.waitTestSuccess() @@ -889,15 +890,16 @@ def collocatedTest(additionalOptions = ""): print "starting collocated...", collocated = getCommandLine(collocated, DriverConfig("colloc")) + ' ' + additionalOptions - collocatedProc = spawnClient(collocated, env = env) + collocatedProc = spawnClient(collocated, env = env, startReader = False) print "ok" + collocatedProc.startReader() collocatedProc.waitTestSuccess() def cleanDbDir(path): for filename in [ os.path.join(path, f) for f in os.listdir(path) if f != ".gitignore" and f != "DB_CONFIG" ]: os.remove(filename) -def startClient(exe, args = "", config=None, env=None, echo = True): +def startClient(exe, args = "", config=None, env=None, echo = True, startReader = True): if config == None: config = DriverConfig("client") if env == None: @@ -905,7 +907,7 @@ def startClient(exe, args = "", config=None, env=None, echo = True): cmd = getCommandLine(exe, config) + ' ' + args if config.lang == "php": writePhpIni("php.ini", "tmp.ini") - return spawnClient(cmd, env = env, echo = echo) + return spawnClient(cmd, env = env, echo = echo, startReader = startReader) def startServer(exe, args = "", config=None, env=None, adapter = None, count = 1, echo = True): if config == None: @@ -926,8 +928,9 @@ def startColloc(exe, args, config=None, env=None): def simpleTest(exe, options = ""): print "starting client...", command = exe + ' ' + options - client = spawnClient(command) + client = spawnClient(command, startReader = False) print "ok" + client.startReader() client.waitTestSuccess() def getCppBinDir(): |