diff options
Diffstat (limited to 'java/test/Ice/servantLocator/run.py')
-rwxr-xr-x | java/test/Ice/servantLocator/run.py | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/java/test/Ice/servantLocator/run.py b/java/test/Ice/servantLocator/run.py index a337928b7e3..693b0efe6fd 100755 --- a/java/test/Ice/servantLocator/run.py +++ b/java/test/Ice/servantLocator/run.py @@ -10,38 +10,24 @@ import os, sys -for toplevel in [".", "..", "../..", "../../..", "../../../..", "../../../../.."]: - toplevel = os.path.normpath(toplevel) - if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): - break -else: +path = [ ".", "..", "../..", "../../..", "../../../.." ] +head = os.path.dirname(sys.argv[0]) +if len(head) > 0: + path = [os.path.join(head, p) for p in path] +path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ] +if len(path) == 0: raise "can't find toplevel directory!" +sys.path.append(os.path.join(path[0])) +from scripts import * -sys.path.append(os.path.join(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "servantLocator") -nameAMD = os.path.join("Ice", "servantLocatorAMD") -testdir = os.path.dirname(os.path.abspath(__file__)) -testdirAMD = testdir + "AMD" -os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + os.pathsep + os.getenv("CLASSPATH", "") - -# -# We need to use mixedClientServerTest so that, when using SSL, the -# server-side SSL configuration properties are defined. This is -# necessary because the client creates object adapters. -# print "tests with regular server." -classpath = os.getenv("CLASSPATH", "") -TestUtil.mixedClientServerTest(name) +TestUtil.clientServerTest() print "tests with AMD server." -TestUtil.clientServerTestWithClasspath(name, \ - os.path.join(testdirAMD, "classes") + os.pathsep + classpath,\ - os.path.join(testdir, "classes") + os.pathsep + classpath) +import copy +amdenv = copy.deepcopy(os.environ) +TestUtil.addClasspath(os.path.join(os.getcwd(), "..", "servantLocatorAMD", "classes"), amdenv) +TestUtil.clientServerTest(serverenv = amdenv) print "tests with collocated server." -TestUtil.collocatedTest(name) - -sys.exit(0) +TestUtil.collocatedTest() |