summaryrefslogtreecommitdiff
path: root/cpp/config/TestUtil.py
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2006-01-26 15:20:42 +0000
committerBenoit Foucher <benoit@zeroc.com>2006-01-26 15:20:42 +0000
commit4b7a28bf34f8a0a0e7740cf12c54999a15a71640 (patch)
tree427d210d5824dcb518ac54024aa105dfb9dc8b36 /cpp/config/TestUtil.py
parentFixed bug 829 (diff)
downloadice-4b7a28bf34f8a0a0e7740cf12c54999a15a71640.tar.bz2
ice-4b7a28bf34f8a0a0e7740cf12c54999a15a71640.tar.xz
ice-4b7a28bf34f8a0a0e7740cf12c54999a15a71640.zip
Fixed test scripts to use the icebox executable matching the build
configuration of the test (debug vs. release).
Diffstat (limited to 'cpp/config/TestUtil.py')
-rw-r--r--cpp/config/TestUtil.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/cpp/config/TestUtil.py b/cpp/config/TestUtil.py
index c6e47b7eadb..dfcd35e66bd 100644
--- a/cpp/config/TestUtil.py
+++ b/cpp/config/TestUtil.py
@@ -158,6 +158,34 @@ def getAdapterReady(serverPipe):
killServers()
sys.exit(1)
+def getIceBox(testdir):
+
+ #
+ # Get and return the path of the IceBox executable
+ #
+
+ iceBox = ""
+ if isWin32():
+ #
+ # Read the build.txt file from the test directory to figure out
+ # how the IceBox service was built ("debug" vs. "release") and
+ # decide which icebox executable to use.
+ #
+ build = open(os.path.join(testdir, "build.txt"), "r")
+ type = build.read().strip()
+ if type == "debug":
+ iceBox = os.path.join(toplevel, "bin", "iceboxd.exe")
+ elif type == "release":
+ iceBox = os.path.join(toplevel, "bin", "icebox.exe")
+ else:
+ iceBox = os.path.join(toplevel, "bin", "icebox")
+
+ if iceBox == "" or not os.path.exists(iceBox):
+ print "couldn't find icebox executable to run the test"
+ sys.exit(0)
+
+ return iceBox;
+
def waitServiceReady(pipe, token):
while 1: