2 # **********************************************************************
4 # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
6 # This copy of Ice is licensed to you under the terms described in the
7 # ICE_LICENSE file included in this distribution.
9 # **********************************************************************
11 import os
, sys
, traceback
14 slice_dir
= Ice
.getSliceDir()
16 print sys
.argv
[0] + ': Slice directory not found.'
19 Ice
.loadSlice("'-I" + slice_dir
+ "' Test.ice")
22 def run(args
, communicator
):
23 communicator
.getProperties().setProperty("TestAdapter.Endpoints", "default -p 12010:udp")
24 adapter
= communicator
.createObjectAdapter("TestAdapter")
25 adapter
.add(TestI
.MyDerivedClassI(), communicator
.stringToIdentity("test"))
27 communicator
.waitForShutdown()
31 initData
= Ice
.InitializationData()
32 initData
.properties
= Ice
.createProperties(sys
.argv
)
33 communicator
= Ice
.initialize(sys
.argv
, initData
)
34 status
= run(sys
.argv
, communicator
)
41 communicator
.destroy()