diff options
author | Mark Spruiell <mes@zeroc.com> | 2004-10-21 13:59:26 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2004-10-21 13:59:26 +0000 |
commit | 2ec73e6e0477e29a57f2722115b4ca5e2dc099f9 (patch) | |
tree | cfcb8e2778965ebc49d9065fe6774fbbd2473983 /py/test/Ice/operations/Server.py | |
parent | adding destroy() to streams (diff) | |
download | ice-2ec73e6e0477e29a57f2722115b4ca5e2dc099f9.tar.bz2 ice-2ec73e6e0477e29a57f2722115b4ca5e2dc099f9.tar.xz ice-2ec73e6e0477e29a57f2722115b4ca5e2dc099f9.zip |
test for presence of slice directory
Diffstat (limited to 'py/test/Ice/operations/Server.py')
-rw-r--r-- | py/test/Ice/operations/Server.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/py/test/Ice/operations/Server.py b/py/test/Ice/operations/Server.py index 3c6c7d1455c..2a9ba9d88b9 100644 --- a/py/test/Ice/operations/Server.py +++ b/py/test/Ice/operations/Server.py @@ -9,11 +9,17 @@ import sys, os, traceback, Ice -if not os.environ.has_key('ICE_HOME'): - print sys.argv[0] + ': ICE_HOME is not defined' +# +# 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) -Ice.loadSlice('-I' + os.environ['ICE_HOME'] + '/slice Test.ice') +Ice.loadSlice('-I' + slice_dir + '/slice Test.ice') import Test def test(b): |