Browse files

add a specs:ci_report task just like the ci task, but with junit output

  • Loading branch information...
1 parent d79c1d5 commit 240d3dec8b4d54f714a22945ad63fcf5e587f170 @timfel timfel committed Oct 27, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 rakelib/spec.rake
View
9 rakelib/spec.rake
@@ -18,6 +18,15 @@ namespace :spec do
sh "#{PSPEC} -V -G fails"
end
+ desc "Run ci specs, generating a rubyspec_report.xml with JUnit output."
+ task :ci_report do
+ rm_f "rubyspec_temp/*"
+ sh "#{PSPEC} -f j -V -G fails 2>&1 | tee rubyspec_report.out"
+ sh 'csplit rubyspec_report.out "%<?xml%" "/</testsuites/+1"'
+ sh "mv xx00 rubyspec_report.xml"
+ sh "rm xx01 rubyspec_report.out"
+ end
+
desc "Retag the ci files (works only with hacked mspec-tag.rb)"
task :retag do
sh "#{PSPEC} tag -G fails"

0 comments on commit 240d3de

Please sign in to comment.