summaryrefslogtreecommitdiff
path: root/py/test/Ice/facets/Server.py
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-10-23 13:48:08 +0000
committerMark Spruiell <mes@zeroc.com>2004-10-23 13:48:08 +0000
commit870f0d174af2f10f64fb58c9a89f87b44a5e002d (patch)
treed1db94eb74b7858290eff9f9e4d85b430c46cc1b /py/test/Ice/facets/Server.py
parentfixing the directive names in an INI file (diff)
downloadice-870f0d174af2f10f64fb58c9a89f87b44a5e002d.tar.bz2
ice-870f0d174af2f10f64fb58c9a89f87b44a5e002d.tar.xz
ice-870f0d174af2f10f64fb58c9a89f87b44a5e002d.zip
eliminate need to set PYTHONPATH in tests
Diffstat (limited to 'py/test/Ice/facets/Server.py')
-rw-r--r--py/test/Ice/facets/Server.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/py/test/Ice/facets/Server.py b/py/test/Ice/facets/Server.py
index 7716ecac576..3c41d617b60 100644
--- a/py/test/Ice/facets/Server.py
+++ b/py/test/Ice/facets/Server.py
@@ -7,8 +7,19 @@
#
# **********************************************************************
-import sys, traceback, Ice
+import os, sys, traceback
+for toplevel in [".", "..", "../..", "../../..", "../../../.."]:
+ toplevel = os.path.normpath(toplevel)
+ if os.path.exists(os.path.join(toplevel, "python", "Ice.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.insert(0, os.path.join(toplevel, "python"))
+sys.path.insert(0, os.path.join(toplevel, "lib"))
+
+import Ice
Ice.loadSlice('Test.ice')
import Test