forked from ManageIQ/manageiq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
35 lines (27 loc) · 822 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
task :default => [:test]
task :build do
Rake::Task[:rcov].invoke
Rake::Task[:test].invoke
end
task :rcov do
begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |t|
t.libs << 'test'
t.test_files = FileList['test/ts_*.rb']
t.verbose = true
t.output_dir = File.join(ENV['CC_BUILD_ARTIFACTS'], "coverage") if ENV['CC_BUILD_ARTIFACTS'] != nil
t.rcov_opts = ['--text-report', '--exclude', 'spec,/usr/lib/ruby']
end
rescue LoadError
puts 'Rcov is not available. Proceeding without...'
end
end
task :test do
ruby "./test/ts_unittests.rb"
end