ICE 3.4.2
[php5-ice-freebsdport.git] / rb / test / Ice / binding / Client.rb
blobc6b68e46f9222c51927efe216c352c33681f4bff
1 #!/usr/bin/env ruby
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 require 'pathname'
12 require 'Ice'
14 Ice::loadSlice('Test.ice')
15 require 'AllTests'
17 def run(args, communicator)
18     allTests(communicator)
19     return true
20 end
22 begin
23     communicator = Ice::initialize(ARGV)
24     status = run(ARGV, communicator)
25 rescue => ex
26     puts $!
27     print ex.backtrace.join("\n")
28     status = false
29 end
31 if communicator
32     begin
33         communicator.destroy()
34     rescue => ex
35         puts $!
36         print ex.backtrace.join("\n")
37         status = false
38     end
39 end
41 exit(status ? 0 : 1)