diff options
Diffstat (limited to 'cpp/test/Slice/keyword/run.py')
-rwxr-xr-x | cpp/test/Slice/keyword/run.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/cpp/test/Slice/keyword/run.py b/cpp/test/Slice/keyword/run.py new file mode 100755 index 00000000000..e033a8e4d1a --- /dev/null +++ b/cpp/test/Slice/keyword/run.py @@ -0,0 +1,42 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2007 ZeroC, Inc. All rights reserved. +# +# This copy of Ice is licensed to you under the terms described in the +# ICE_LICENSE file included in this distribution. +# +# ********************************************************************** + +import os, sys + +for toplevel in [".", "..", "../..", "../../..", "../../../.."]: + toplevel = os.path.normpath(toplevel) + if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")): + break +else: + raise "can't find toplevel directory!" + +sys.path.append(os.path.join(toplevel, "config")) +import TestUtil + +name = os.path.join("Slice", "keyword") +testdir = os.path.join(toplevel, "test", name) + +cwd = os.getcwd() +os.chdir(testdir) + +client = os.path.join(testdir, "client") + +print "starting client...", +clientPipe = os.popen(client + " 2>&1") +print "ok" + +TestUtil.printOutputFromPipe(clientPipe); + +clientStatus = TestUtil.closePipe(clientPipe) + +if clientStatus: + sys.exit(1) + +sys.exit(0) |