NIHVIVO-76 output_summary_formatter should list the names of failing tests to the console, so they can be seen in the build log. output_manager should return an error code on failure status, so it counts as a broken build.

This commit is contained in:
jeb228 2010-03-17 14:03:15 +00:00
parent f442a48d8b
commit ee44d76e9b
2 changed files with 10 additions and 1 deletions

View file

@ -211,6 +211,11 @@ class OutputManager
end end
log("INFO ", "Summary complete") log("INFO ", "Summary complete")
if @osp.overall_status == Status::BAD
log("ERROR", "Tests failed.")
raise("Tests failed.")
end
end end
end end
@ -235,5 +240,5 @@ if File.expand_path($0) == File.expand_path(__FILE__)
properties = PropertyFileReader.read(ARGV[0]) properties = PropertyFileReader.read(ARGV[0])
om = OutputManager.new(properties) om = OutputManager.new(properties)
om.summarize() success = om.summarize()
end end

View file

@ -127,6 +127,8 @@ END_STATS
# Write a table of failed tests to the summary file, with links # Write a table of failed tests to the summary file, with links
# to the detailed output for each test. # to the detailed output for each test.
# #
# While we're at it, write the list of failed tests to the console.
#
# f -- a file, already open for output. # f -- a file, already open for output.
# #
def write_summary_failure_section(f) def write_summary_failure_section(f)
@ -148,6 +150,8 @@ END_STATS
f.print " <td>#{t.suite_name}</td>\n" f.print " <td>#{t.suite_name}</td>\n"
f.print " <td><a href=\"#{t.output_link}\">#{t.test_name}</a></td>\n" f.print " <td><a href=\"#{t.output_link}\">#{t.test_name}</a></td>\n"
f.print " </tr>\n" f.print " </tr>\n"
puts "Test failed: #{t.suite_name}, #{t.test_name}"
end end
end end