diff options
author | Bernard Normier <bernard@zeroc.com> | 2009-01-23 17:07:21 -0500 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2009-01-23 17:07:21 -0500 |
commit | 2380e089401d048490da23bc6d71e5687bafbe47 (patch) | |
tree | 6d97052d1f93bc2bafcd7fd1a9ebe103544b6cad /cpp/test/IceGrid/session/run.py | |
parent | Fixed permissions (diff) | |
parent | 3.3.1 third-party updates (diff) | |
download | ice-2380e089401d048490da23bc6d71e5687bafbe47.tar.bz2 ice-2380e089401d048490da23bc6d71e5687bafbe47.tar.xz ice-2380e089401d048490da23bc6d71e5687bafbe47.zip |
Merge branch 'R3_3_branch' of cvs:/home/git/ice into R3_3_branch
Conflicts:
java/resources/IceGridAdmin/icegridadmin_content_dyn.html
java/resources/IceGridAdmin/icegridadmin_content_static.html
Diffstat (limited to 'cpp/test/IceGrid/session/run.py')
-rwxr-xr-x | cpp/test/IceGrid/session/run.py | 38 |
1 files changed, 15 insertions, 23 deletions
diff --git a/cpp/test/IceGrid/session/run.py b/cpp/test/IceGrid/session/run.py index 540c86f7294..4d02eec4fe0 100755 --- a/cpp/test/IceGrid/session/run.py +++ b/cpp/test/IceGrid/session/run.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # ********************************************************************** # -# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved. +# Copyright (c) 2003-2009 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. @@ -10,17 +10,15 @@ 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() -import IceGridAdmin +sys.path.append(os.path.join(path[0])) +from scripts import * if not TestUtil.isWin32() and os.getuid() == 0: print @@ -29,18 +27,15 @@ if not TestUtil.isWin32() and os.getuid() == 0: sys.exit(0) name = os.path.join("IceGrid", "session") -testdir = os.path.dirname(os.path.abspath(__file__)) -node1Dir = os.path.join(testdir, "db", "node-1") +node1Dir = os.path.join(os.getcwd(), "db", "node-1") if not os.path.exists(node1Dir): os.mkdir(node1Dir) else: IceGridAdmin.cleanDbDir(node1Dir) print "starting admin permissions verifier...", -verifierPipe = TestUtil.startServer(os.path.join(testdir, "verifier"), " 2>&1", TestUtil.DriverConfig("server")) -TestUtil.getServerPid(verifierPipe) -TestUtil.getAdapterReady(verifierPipe) +verifierProc = TestUtil.startServer(os.path.join(os.getcwd(), "verifier"), config=TestUtil.DriverConfig("server")) print "ok" IceGridAdmin.registryOptions += \ @@ -51,11 +46,8 @@ IceGridAdmin.registryOptions += \ r' --IceGrid.Registry.AdminPermissionsVerifier="AdminPermissionsVerifier:tcp -p 12002"'+ \ r' --IceGrid.Registry.SSLPermissionsVerifier="SSLPermissionsVerifier"' -IceGridAdmin.iceGridTest(testdir, name, "application.xml", \ - "--IceBinDir=\"" + TestUtil.getCppBinDir() + "\" --TestDir=\"" + testdir + "\"", \ - '\\"properties-override=' + \ - TestUtil.getCommandLine("", TestUtil.DriverConfig("server")).replace("--", "") + '\\"') - -status = TestUtil.closePipe(verifierPipe) +IceGridAdmin.iceGridTest("application.xml", + '--IceBinDir="%s" --TestDir="%s"' % (TestUtil.getCppBinDir(), os.getcwd()), + '\\"properties-override=%s\\"' % TestUtil.getCommandLine("", TestUtil.DriverConfig("server")).replace("--", "")) -sys.exit(0) +verifierProc.waitTestSuccess() |