diff options
Diffstat (limited to 'ruby/test/Ice/checksum/Client.rb')
-rwxr-xr-x | ruby/test/Ice/checksum/Client.rb | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/ruby/test/Ice/checksum/Client.rb b/ruby/test/Ice/checksum/Client.rb index e528632fc38..33fae6b1ac1 100755 --- a/ruby/test/Ice/checksum/Client.rb +++ b/ruby/test/Ice/checksum/Client.rb @@ -8,34 +8,15 @@ # # ********************************************************************** -require 'pathname' -require 'Ice' - -slice_dir = Ice.getSliceDir -if slice_dir.empty? - fail "Slice directory not found" -end - -Ice::loadSlice("'-I" + slice_dir + "' --checksum Test.ice CTypes.ice") +require "Ice" +Ice::loadSlice("'-I#{Ice.getSliceDir}' --checksum Test.ice CTypes.ice") require './AllTests' -def run(args, communicator) - checksum = allTests(communicator) - checksum.shutdown() - return true -end - -begin - communicator = Ice.initialize(ARGV) - status = run(ARGV, communicator) -rescue => ex - puts $! - print ex.backtrace.join("\n") - status = false -end - -if communicator - communicator.destroy() +class Client < ::TestHelper + def run(args) + self.init(args:args) do |communicator| + checksum = allTests(self, communicator) + checksum.shutdown() + end + end end - -exit(status ? 0 : 1) |