diff options
Diffstat (limited to 'java/test/IceUtil/inputUtil/run.py')
-rwxr-xr-x | java/test/IceUtil/inputUtil/run.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/java/test/IceUtil/inputUtil/run.py b/java/test/IceUtil/inputUtil/run.py new file mode 100755 index 00000000000..a7154db7fb8 --- /dev/null +++ b/java/test/IceUtil/inputUtil/run.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2005 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("IceUtil", "inputUtil") +testdir = os.path.join(toplevel, "test", name) +os.environ["CLASSPATH"] = os.path.join(testdir, "classes") + TestUtil.sep + os.getenv("CLASSPATH", "") + +print "starting client...", +clientPipe = os.popen("java -ea Client 2>&1") +print "ok" + +TestUtil.printOutputFromPipe(clientPipe); + +clientStatus = clientPipe.close() + +if clientStatus: + sys.exit(1) + +sys.exit(0) |