summaryrefslogtreecommitdiff
path: root/scripts/TestUtil.py
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-11-05 12:21:24 -0330
committerDwayne Boone <dwayne@zeroc.com>2008-11-05 12:21:24 -0330
commite67bc9d134e2727e1da51729665c672904daf6c0 (patch)
tree784284319746e5e4a807c469c50ed5c8b671193d /scripts/TestUtil.py
parentMerge branch 'R3_3_branch' (diff)
parentBug 3386 - slice errors with wrong line numbers (diff)
downloadice-e67bc9d134e2727e1da51729665c672904daf6c0.tar.bz2
ice-e67bc9d134e2727e1da51729665c672904daf6c0.tar.xz
ice-e67bc9d134e2727e1da51729665c672904daf6c0.zip
Merge branch 'R3_3_branch'
Diffstat (limited to 'scripts/TestUtil.py')
-rwxr-xr-xscripts/TestUtil.py28
1 files changed, 22 insertions, 6 deletions
diff --git a/scripts/TestUtil.py b/scripts/TestUtil.py
index c343fb55faa..05f62dbb11d 100755
--- a/scripts/TestUtil.py
+++ b/scripts/TestUtil.py
@@ -19,8 +19,9 @@ debug = False # Set to True to enable test suite debugging.
mono = False # Set to True when not on Windows
keepGoing = False # Set to True to have the tests continue on failure.
ipv6 = False # Default to use IPv4 only
-iceHome = None # Binary distribution to use (None to use binaries from source distribution)
+iceHome = None # Binary distribution to use (None to use binaries from source distribution)
x64 = False # Binary distribution is 64-bit
+java2 = False # Use Java 2 jar file from binary distribution
javaCmd = "java" # Default java loader
valgrind = False # Set to True to use valgrind for C++ executables.
tracefile = None
@@ -125,7 +126,10 @@ def configurePaths():
#
if iceHome == "/usr":
javaDir = os.path.join("/", "usr", "share", "java")
- addClasspath(os.path.join(javaDir, "Ice.jar"))
+ if java2:
+ addClasspath(os.path.join(javaDir, "Ice-java2.jar"))
+ else:
+ addClasspath(os.path.join(javaDir, "Ice.jar"))
return # That's it, we're done!
if isWin32():
@@ -149,7 +153,11 @@ def configurePaths():
addClasspath(os.path.join(javaDir, "IceE.jar"))
os.environ["CLASSPATH"] = os.path.join(javaDir, "IceE.jar") + os.pathsep + os.getenv("CLASSPATH", "")
else:
- javaDir = os.path.join(getIceDir("java"), "lib")
+ javaDir = os.path.join(getIceDir("java"), "lib")
+ if iceHome and java2:
+ addClasspath(os.path.join(javaDir, "java2", "Ice.jar"))
+ else:
+ javaDir = os.path.join(getIceDir("java"), "lib")
addClasspath(os.path.join(javaDir, "Ice.jar"))
addClasspath(os.path.join(javaDir))
@@ -235,6 +243,7 @@ def run(tests, root = False):
--ipv6 Use IPv6 addresses.
--ice-home=<path> Use the binary distribution from the given path.
--x64 Binary distribution is 64-bit.
+ --java2 Use Java 2 jar file.
--cross=lang Run cross language test.
--script Generate a script to run the tests.
"""
@@ -244,7 +253,7 @@ def run(tests, root = False):
opts, args = getopt.getopt(sys.argv[1:], "lr:R:",
["start=", "start-after=", "filter=", "rfilter=", "all", "all-cross", "loop",
"debug", "protocol=", "compress", "valgrind", "host=", "serialize", "continue",
- "ipv6", "ice-home=", "cross=", "x64", "script"])
+ "ipv6", "ice-home=", "cross=", "x64", "script", "java2"])
except getopt.GetoptError:
usage()
@@ -293,7 +302,7 @@ def run(tests, root = False):
sys.exit(1)
if o in ( "--cross", "--protocol", "--host", "--debug", "--compress", "--valgrind", "--serialize", "--ipv6", \
- "--ice-home", "--x64"):
+ "--ice-home", "--x64", "--java2"):
arg += " " + o
if len(a) > 0:
arg += " " + a
@@ -583,6 +592,7 @@ class DriverConfig:
overrides = None
ipv6 = False
x64 = False
+ java2 = False
def __init__(self, type = None):
global protocol
@@ -593,6 +603,7 @@ class DriverConfig:
global valgrind
global ipv6
global x64
+ global java2
self.lang = getDefaultMapping()
self.protocol = protocol
self.compress = compress
@@ -603,6 +614,7 @@ class DriverConfig:
self.type = type
self.ipv6 = ipv6
self.x64 = x64
+ self.java2 = java2
def argsToDict(argumentString, results):
"""Converts an argument string to dictionary"""
@@ -972,6 +984,7 @@ def processCmdLine():
--ipv6 Use IPv6 addresses.
--ice-home=<path> Use the binary distribution from the given path.
--x64 Binary distribution is 64-bit.
+ --java2 Use Java 2 jar file.
--cross=lang Run cross language test.
"""
sys.exit(2)
@@ -979,7 +992,7 @@ def processCmdLine():
try:
opts, args = getopt.getopt(
sys.argv[1:], "", ["debug", "trace=", "protocol=", "compress", "valgrind", "host=", "serialize", "ipv6", \
- "ice-home=", "x64", "cross="])
+ "ice-home=", "x64", "cross=", "java2"])
except getopt.GetoptError:
usage()
@@ -1011,6 +1024,9 @@ def processCmdLine():
elif o == "--x64":
global x64
x64 = True
+ elif o == "--java2":
+ global java2
+ java2 = True
elif o == "--compress":
global compress
compress = True