diff options
Diffstat (limited to 'java/test/Ice/slicing/exceptions/run.py')
-rwxr-xr-x | java/test/Ice/slicing/exceptions/run.py | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/java/test/Ice/slicing/exceptions/run.py b/java/test/Ice/slicing/exceptions/run.py index 237610d7a45..2e73cdacd63 100755 --- a/java/test/Ice/slicing/exceptions/run.py +++ b/java/test/Ice/slicing/exceptions/run.py @@ -10,26 +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(toplevel, "config")) -import TestUtil -TestUtil.processCmdLine() - -name = os.path.join("Ice", "slicing", "exceptions") -testdir = os.path.dirname(os.path.abspath(__file__)) -nameAMD = os.path.join("Ice", "slicing", "exceptionsAMD") -testdirAMD = testdir + "AMD" +sys.path.append(os.path.join(path[0])) +from scripts import * print "tests with regular server." -TestUtil.clientServerTestWithClasspath(name, os.path.join(testdir, "sclasses"), os.path.join(testdir, "cclasses")) +import copy +serverenv = copy.deepcopy(os.environ) +TestUtil.addClasspath(os.path.join(os.getcwd(), "sclasses"), serverenv) +TestUtil.clientServerTest(serverenv = serverenv) print "tests with AMD server." -TestUtil.clientServerTestWithClasspath(name, os.path.join(testdirAMD, "classes"), os.path.join(testdir, "cclasses")) - -sys.exit(0) +import copy +amdenv = copy.deepcopy(os.environ) +TestUtil.addClasspath(os.path.join(os.getcwd(), "..", "exceptionsAMD", "classes"), amdenv) +TestUtil.clientServerTest(serverenv = amdenv) |