Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Commit

Permalink
Update build system for CI
Browse files Browse the repository at this point in the history
Add ci_reporter for Jenkins CI.
Use simplecov but it might not work fine at this moment.
  • Loading branch information
Hiroshi Nakamura committed Jan 4, 2012
1 parent 5ffce47 commit 929824b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
11 changes: 9 additions & 2 deletions Gemfile
Expand Up @@ -4,7 +4,14 @@ platform :jruby do
gem 'jruby-openssl'
end

gem 'rake'
gem 'rdoc'
group :development do
gem 'rake'
gem 'rdoc'
gem 'simplecov'
# For Jenkins
gem 'test-unit'
gem 'ci_reporter'
gem 'simplecov-rcov'
end

gemspec
13 changes: 4 additions & 9 deletions Rakefile
Expand Up @@ -2,22 +2,17 @@ require 'rake'
require 'rake/testtask'
require 'rdoc/task'
require 'rubygems/package_task'
require 'ci/reporter/rake/test_unit'

task :default => :test

require 'bundler'
Bundler::GemHelper.install_tasks

begin
require 'rcov/rcovtask'
Rcov::RcovTask.new("coverage") do |rcov|
rcov.libs << 'lib'
rcov.pattern = 'test/test_*.rb'
end
rescue LoadError
end
ENV['CI_REPORTS'] = File.expand_path('./reports', File.dirname(__FILE__))
task :test => ['ci:setup:testunit', 'test-run']

Rake::TestTask.new("test") do |test|
Rake::TestTask.new('test-run') do |test|
test.libs << 'lib'
test.verbose = true
test.test_files = Dir.glob('test/test_*.rb')
Expand Down
5 changes: 5 additions & 0 deletions test/helper.rb
@@ -1,5 +1,10 @@
# -*- encoding: utf-8 -*-
require 'test/unit'
require 'simplecov'
require 'simplecov-rcov'
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
SimpleCov.start

require 'httpclient'
require 'webrick'
require 'webrick/httpproxy.rb'
Expand Down

0 comments on commit 929824b

Please sign in to comment.