~ubuntu-branches/ubuntu/quantal/zeroc-ice/quantal

« back to all changes in this revision

Viewing changes to rb/test/Ice/info/Client.rb

  • Committer: Bazaar Package Importer
  • Author(s): Cleto Martin Angelina
  • Date: 2011-04-25 18:44:24 UTC
  • mfrom: (6.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110425184424-sep9i9euu434vq4c
Tags: 3.4.1-7
* Bug fix: "libdb5.1-java.jar was renamed to db.jar", thanks to Ondřej
  Surý (Closes: #623555).
* Bug fix: "causes noise in php5", thanks to Jayen Ashar (Closes:
  #623533).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env ruby
 
2
# **********************************************************************
 
3
#
 
4
# Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
 
5
#
 
6
# This copy of Ice is licensed to you under the terms described in the
 
7
# ICE_LICENSE file included in this distribution.
 
8
#
 
9
# **********************************************************************
 
10
 
 
11
require 'pathname'
 
12
require 'Ice'
 
13
slice_dir = Ice.getSliceDir
 
14
if slice_dir.empty?
 
15
    fail "Slice directory not found"
 
16
end
 
17
 
 
18
Ice::loadSlice("'-I" + slice_dir + "' Test.ice")
 
19
require 'AllTests'
 
20
 
 
21
def test(b)
 
22
    if !b
 
23
        raise RuntimeError, 'test assertion failed'
 
24
    end
 
25
end
 
26
 
 
27
def run(args, communicator)
 
28
    allTests(communicator)
 
29
    return true
 
30
end
 
31
 
 
32
begin
 
33
    initData = Ice::InitializationData.new
 
34
    initData.properties = Ice.createProperties(ARGV)
 
35
    communicator = Ice.initialize(ARGV, initData)
 
36
    status = run(ARGV, communicator)
 
37
rescue => ex
 
38
    puts $!
 
39
    print ex.backtrace.join("\n")
 
40
    status = false
 
41
end
 
42
 
 
43
if communicator
 
44
    begin
 
45
        communicator.destroy()
 
46
    rescue => ex
 
47
        puts $!
 
48
        print ex.backtrace.join("\n")
 
49
        status = false
 
50
    end
 
51
end
 
52
 
 
53
exit(status ? 0 : 1)