diff options
Diffstat (limited to 'java/test/IceBox/configuration/run.py')
-rwxr-xr-x | java/test/IceBox/configuration/run.py | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/java/test/IceBox/configuration/run.py b/java/test/IceBox/configuration/run.py index 5b921e2ba2b..7b8f169b98e 100755 --- a/java/test/IceBox/configuration/run.py +++ b/java/test/IceBox/configuration/run.py @@ -10,30 +10,17 @@ 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() -import IceGridAdmin - -name = os.path.join("IceBox", "configuration") -testdir = os.path.dirname(os.path.abspath(__file__)) -icebox = TestUtil.getIceBox(testdir); - -cwd = os.getcwd() -os.chdir(testdir) - -os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + os.pathsep + os.getenv("CLASSPATH", "") - -TestUtil.clientServerTestWithOptionsAndNames(name, "--Ice.Config=config.icebox", "", icebox, "Client") -TestUtil.clientServerTestWithOptionsAndNames(name, "--Ice.Config=config.icebox2", "", icebox, "Client") - -os.chdir(cwd) - -sys.exit(0) +TestUtil.clientServerTest(additionalServerOptions="--Ice.Config=%s" % os.path.join(os.getcwd(), "config.icebox"), + server=TestUtil.getIceBox()) +TestUtil.clientServerTest(additionalServerOptions="--Ice.Config=%s" % os.path.join(os.getcwd(), "config.icebox2"), + server=TestUtil.getIceBox()) |