RUBY-259 Enable ci_reporter

This commit is contained in:
Kyle Banker 2011-04-01 16:35:18 -04:00
parent bdb87c25ad
commit 9c031b00e6
1 changed files with 24 additions and 19 deletions

View File

@ -5,10 +5,6 @@ require 'fileutils'
require 'rake' require 'rake'
require 'rake/testtask' require 'rake/testtask'
require 'rake/gempackagetask' require 'rake/gempackagetask'
begin
require 'rake/contrib/rubyforgepublisher'
rescue LoadError
end
require 'rbconfig' require 'rbconfig'
include Config include Config
ENV['TEST_MODE'] = 'TRUE' ENV['TEST_MODE'] = 'TRUE'
@ -150,12 +146,20 @@ task :ydoc do
end end
namespace :bamboo do namespace :bamboo do
task :ci_reporter do
begin
require 'ci/reporter/rake/test_unit'
rescue LoadError
warn "Warning: Unable to load ci_reporter gem."
end
end
namespace :test do namespace :test do
task :ruby do task :ruby => [:ci_reporter, "ci:setup:testunit"] do
Rake::Task['test:ruby'].invoke Rake::Task['test:ruby'].invoke
end end
task :c do task :c => [:ci_reporter, "ci:setup:testunit"] do
Rake::Task['gem:install_extensions'].invoke Rake::Task['gem:install_extensions'].invoke
Rake::Task['test:c'].invoke Rake::Task['test:c'].invoke
end end
@ -166,29 +170,30 @@ namespace :gem do
desc "Install the gem locally" desc "Install the gem locally"
task :install do task :install do
sh "gem build bson.gemspec" `gem build bson.gemspec`
sh "gem install --no-rdoc --no-ri bson-*.gem" `gem install --no-rdoc --no-ri bson-*.gem`
sh "gem build mongo.gemspec" `gem build mongo.gemspec`
sh "gem install --no-rdoc --no-ri mongo-*.gem" `gem install --no-rdoc --no-ri mongo-*.gem`
sh "rm mongo-*.gem" `rm mongo-*.gem`
sh "rm bson-*.gem" `rm bson-*.gem`
end end
desc "Install the optional c extensions" desc "Install the optional c extensions"
task :install_extensions do task :install_extensions do
sh "gem build bson_ext.gemspec" `gem uninstall bson_ext`
sh "gem install --no-rdoc --no-ri bson_ext-*.gem" `gem build bson_ext.gemspec`
sh "rm bson_ext-*.gem" `gem install --no-rdoc --no-ri bson_ext-*.gem`
`rm bson_ext-*.gem`
end end
desc "Build all gems" desc "Build all gems"
task :build_all do task :build_all do
sh "gem build mongo.gemspec" `gem build mongo.gemspec`
sh "gem build bson.gemspec" `gem build bson.gemspec`
sh "gem build bson.java.gemspec" `gem build bson.java.gemspec`
sh "gem build bson_ext.gemspec" `gem build bson_ext.gemspec`
end end
end end