summaryrefslogtreecommitdiff
path: root/py/test/Ice/operations/Client.py
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2008-01-22 16:47:38 -0330
committerDwayne Boone <dwayne@zeroc.com>2008-01-22 16:47:38 -0330
commit51f7d974b85e827ee891fbe76876e7d0e7e021a2 (patch)
tree24da34026edfd2d7371ecf4426dd824b71e31e88 /py/test/Ice/operations/Client.py
parentUpdated mcpp instructions (diff)
downloadice-51f7d974b85e827ee891fbe76876e7d0e7e021a2.tar.bz2
ice-51f7d974b85e827ee891fbe76876e7d0e7e021a2.tar.xz
ice-51f7d974b85e827ee891fbe76876e7d0e7e021a2.zip
Change python tests to detect slice dir in repository
Diffstat (limited to 'py/test/Ice/operations/Client.py')
-rw-r--r--py/test/Ice/operations/Client.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/py/test/Ice/operations/Client.py b/py/test/Ice/operations/Client.py
index 5886e2466cc..8c0c50bb3b1 100644
--- a/py/test/Ice/operations/Client.py
+++ b/py/test/Ice/operations/Client.py
@@ -23,15 +23,18 @@ sys.path.insert(0, os.path.join(toplevel, "lib"))
#
# Find Slice directory.
#
-slice_dir = os.getenv('ICEPY_HOME', '')
-if len(slice_dir) == 0 or not os.path.exists(os.path.join(slice_dir, "slice")):
- slice_dir = os.getenv('ICE_HOME', '')
-if len(slice_dir) == 0 or not os.path.exists(os.path.join(slice_dir, "slice")):
- print sys.argv[0] + ': Slice directory not found. Define ICEPY_HOME or ICE_HOME.'
- sys.exit(1)
+slice_dir = os.path.join(os.path.join(toplevel, "..", "slice"))
+if not os.path.exists(slice_dir):
+ home_dir = os.getenv('ICEPY_HOME', '')
+ if len(home_dir) == 0 or not os.path.exists(os.path.join(home_dir, "slice")):
+ home_dir = os.getenv('ICE_HOME', '')
+ if len(home_dir) == 0 or not os.path.exists(os.path.join(home_dir, "slice")):
+ print sys.argv[0] + ': Slice directory not found. Define ICEPY_HOME or ICE_HOME.'
+ sys.exit(1)
+ slice_dir = os.path.join(home_dir, "slice")
import Ice
-Ice.loadSlice('-I' + slice_dir + '/slice Test.ice')
+Ice.loadSlice('-I' + slice_dir + ' Test.ice')
import AllTests
def test(b):