From 16b55b7b89ef76dca3bdc81e0f9aff14cf2ec518 Mon Sep 17 00:00:00 2001 From: Ted Ross Date: Mon, 21 Sep 2009 19:06:04 +0000 Subject: Properly report test failures in Ruby tests git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@817375 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/bindings/qmf/tests/test_base.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp') diff --git a/cpp/bindings/qmf/tests/test_base.rb b/cpp/bindings/qmf/tests/test_base.rb index 18bf4c2649..8bf433611e 100644 --- a/cpp/bindings/qmf/tests/test_base.rb +++ b/cpp/bindings/qmf/tests/test_base.rb @@ -39,6 +39,8 @@ class ConsoleTestBase < Qmf::ConsoleHandler tests << name if name[0..4] == "test_" end + failures = 0 + tests.sort.each do |t| begin print "#{t}..." @@ -47,10 +49,12 @@ class ConsoleTestBase < Qmf::ConsoleHandler puts " Pass" rescue puts " Fail: #{$!}" + failures += 1 end end @qmfc.del_connection(@broker) + exit(1) if failures > 0 end def assert_equal(left, right, in_text=nil) -- cgit v1.2.1