diff options
Diffstat (limited to 'py/test/Ice/servantLocator/Client.py')
-rw-r--r-- | py/test/Ice/servantLocator/Client.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/py/test/Ice/servantLocator/Client.py b/py/test/Ice/servantLocator/Client.py new file mode 100644 index 00000000000..47c7f18f241 --- /dev/null +++ b/py/test/Ice/servantLocator/Client.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2006 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, "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, AllTests + +class TestClient(Ice.Application): + def run(self, args): + obj = AllTests.allTests(self.communicator(), False) + obj.shutdown() + return 0 + +app = TestClient() +sys.exit(app.main(sys.argv)) |