diff options
author | Mark Spruiell <mes@zeroc.com> | 2017-10-24 13:59:59 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2017-10-24 13:59:59 -0700 |
commit | a2d0c97dffa640c7359bf7f5fb824ee84bf4020a (patch) | |
tree | 42d682fc761c514523c9b5e77f39bf1b3b22632e /python/test/Ice/packagemd/Client.py | |
parent | Fixed generated code warnings showing up with Objective-C and Xcode 9.0 (ICE-... (diff) | |
download | ice-a2d0c97dffa640c7359bf7f5fb824ee84bf4020a.tar.bz2 ice-a2d0c97dffa640c7359bf7f5fb824ee84bf4020a.tar.xz ice-a2d0c97dffa640c7359bf7f5fb824ee84bf4020a.zip |
ICE-8545 - add test for python package metadata
Diffstat (limited to 'python/test/Ice/packagemd/Client.py')
-rwxr-xr-x | python/test/Ice/packagemd/Client.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/python/test/Ice/packagemd/Client.py b/python/test/Ice/packagemd/Client.py new file mode 100755 index 00000000000..d2593933874 --- /dev/null +++ b/python/test/Ice/packagemd/Client.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python +# ********************************************************************** +# +# Copyright (c) 2003-2017 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, traceback +import Ice + +import Ice + +Ice.loadSlice("--all -I. Test.ice") +import AllTests + +def test(b): + if not b: + raise RuntimeError('test assertion failed') + +def run(args, communicator): + initial = AllTests.allTests(communicator) + initial.shutdown() + return True + +try: + initData = Ice.InitializationData() + initData.properties = Ice.createProperties(sys.argv) + initData.properties.setProperty('Ice.Warn.Dispatch', '0') + with Ice.initialize(sys.argv, initData) as communicator: + status = run(sys.argv, communicator) +except: + traceback.print_exc() + status = False + +sys.exit(not status) |