Skip to content

Commit

Permalink
make sure surefire report exists to prevent error
Browse files Browse the repository at this point in the history
  • Loading branch information
cpjolicoeur committed Mar 10, 2009
1 parent c799a7e commit ad5aca3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/cerberus/builder/maven2.rb
Expand Up @@ -31,9 +31,10 @@ def add_error_information
$` =~ /^(.|\n)*Running (.*)$/
failed_class = $2
@output << $` << $& << ' <<< FAILURE!'
@output << "\n" << IO.readlines("#{@config[:application_root]}/target/surefire-reports/#{failed_class}.txt")[4..-1].join.lstrip #map{|str| ' ' + str}..gsub(' <<< FAILURE!','')
surefire_report_filename = "#{@config[:application_root]}/target/surefire-reports/#{failed_class}.txt"
@output << "\n" << IO.readlines(surefire_report_filename)[4..-1].join.lstrip if test(?e, surefire_report_filename)
str = s
end
@output << str
end
end
end

0 comments on commit ad5aca3

Please sign in to comment.