diff options
author | Matthew Newhook <matthew@zeroc.com> | 2008-05-13 15:37:10 +0800 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2008-05-13 15:37:10 +0800 |
commit | d5e09ee82e1d235bd24ed7a303de58b767565215 (patch) | |
tree | 9da8e92fd78e2b98ca50ea6bc80eb016850f83d2 /demoscript/Util.py | |
parent | Some minor cleanup to TestUtil.py. (diff) | |
download | ice-d5e09ee82e1d235bd24ed7a303de58b767565215.tar.bz2 ice-d5e09ee82e1d235bd24ed7a303de58b767565215.tar.xz ice-d5e09ee82e1d235bd24ed7a303de58b767565215.zip |
http://bugzilla/bugzilla/show_bug.cgi?id=3160 - solaris 10 & java 64 bit issue with demo suite.
Diffstat (limited to 'demoscript/Util.py')
-rwxr-xr-x | demoscript/Util.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/demoscript/Util.py b/demoscript/Util.py index 75dfea6c9b7..871a857a117 100755 --- a/demoscript/Util.py +++ b/demoscript/Util.py @@ -17,6 +17,7 @@ if sys.platform == "win32": # Timeout after the initial spawn. # initialTimeout = 10 + # # Default timeout on subsequent expect calls. # @@ -41,16 +42,17 @@ import getopt, os, signal import demoscript.pexpect as pexpect def usage(): - print "usage: " + sys.argv[0] + " --fast --trace --debug --host host --mode=[debug|release] --python=<path>" + print "usage: " + sys.argv[0] + " --x64 --fast --trace --debug --host host --mode=[debug|release] --python=<path>" sys.exit(2) try: - opts, args = getopt.getopt(sys.argv[1:], "", ["fast", "trace", "debug", "host=", "mode=", "python="]) + opts, args = getopt.getopt(sys.argv[1:], "", ["x64", "fast", "trace", "debug", "host=", "mode=", "python="]) except getopt.GetoptError: usage() fast = False trace = False mode = 'release' +x64 = False pythonhome = "/cygdrive/c/python25" for o, a in opts: if o == "--debug": @@ -61,6 +63,8 @@ for o, a in opts: host = a if o == "--fast": fast = True + if o == "--x64": + x64 = True if o == "--python": pythonhome = a if o == "--mode": @@ -84,6 +88,9 @@ def isDarwin(): def isMono(): return not isCygwin() +def isSolaris(): + return sys.platform == "sunos5" + def python(): if isCygwin(): return "%s/python -u " % pythonhome @@ -114,8 +121,6 @@ class spawn(pexpect.spawn): def __init__(self, command, language = None): if defaultHost: command = '%s %s' % (command, defaultHost) - if debug: - print '(%s)' % (command) if not language: self.language = defaultLanguage else: @@ -135,6 +140,11 @@ class spawn(pexpect.spawn): command = python() + command if self.language == "VB": command = "./" + command + if self.language == "Java": + if isSolaris() and x64: + command = command.replace("java", "java -d64") + if debug: + print '(%s)' % (command) pexpect.spawn.__init__(self, command, logfile = logfile) def expect(self, pattern, timeout = defaultTimeout, searchwindowsize=None): |