Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Restored types to error elements, added TEST to filenames

Trying to be consistent with other ci integration tools
  • Loading branch information...
commit 22ddb909cbd69d1c9e3917ab48d9d2581d7d498c 1 parent 5e582b3
@bensomers bensomers authored
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/minitest/reporters/junit_reporter.rb
View
10 lib/minitest/reporters/junit_reporter.rb
@@ -51,13 +51,13 @@ def xml.trunc!(txt)
case test_runner.result
when :skip
- xml.skipped
+ xml.skipped(:type => test)
when :error
- xml.error(:message => xml.trunc!(e.message)) do
+ xml.error(:type => test, :message => xml.trunc!(e.message)) do
xml.text!(message_for(test_runner))
end
when :failure
- xml.failure(:message => xml.trunc!(e.message)) do
+ xml.failure(:type => test, :message => xml.trunc!(e.message)) do
xml.text!(message_for(test_runner))
end
end
@@ -100,10 +100,10 @@ def analyze_suite(suite, tests)
def filename_for(suite)
file_counter = 0
- filename = "#{suite.to_s[0..245]}.xml" #restrict max filename length, to be kind to filesystems
+ filename = "TEST-#{suite.to_s[0..240]}.xml" #restrict max filename length, to be kind to filesystems
while File.exists?(filename) # restrict number of tries, to avoid infinite loops
file_counter += 1
- filename = "#{suite}-#{file_counter}.xml"
+ filename = "TEST-#{suite}-#{file_counter}.xml"
p "Too many duplicate files, overwriting earlier report #{filename}" and break if file_counter >= 99
end
File.join(@reports_path, filename)
Please sign in to comment.
Something went wrong with that request. Please try again.