summaryrefslogtreecommitdiff
path: root/py/test/Ice/operations/Server.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-10-21 13:59:26 +0000
committerMark Spruiell <mes@zeroc.com>2004-10-21 13:59:26 +0000
commit2ec73e6e0477e29a57f2722115b4ca5e2dc099f9 (patch)
treecfcb8e2778965ebc49d9065fe6774fbbd2473983 /py/test/Ice/operations/Server.py
parentadding destroy() to streams (diff)
downloadice-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.py12
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):