Build all available coverage xml and html, even if some is missing

This commit is contained in:
Calen Pennington
2012-11-08 11:32:27 -05:00
parent 28bb4724e7
commit 686cab4545

View File

@@ -198,7 +198,7 @@ namespace :coverage do
desc "Build the html coverage reports"
task :html => :report_dirs do
TEST_TASK_DIRS.each do |dir|
sh("coverage html --rcfile=#{dir}/.coveragerc")
sh("coverage html --rcfile=#{dir}/.coveragerc || echo 'Unable to build coverage html for #{dir}'")
end
end
@@ -206,7 +206,7 @@ namespace :coverage do
task :xml => :report_dirs do
TEST_TASK_DIRS.each do |dir|
# Why doesn't the rcfile control the xml output file properly??
sh("coverage xml -o reports/#{dir}/coverage.xml --rcfile=#{dir}/.coveragerc")
sh("coverage xml -o reports/#{dir}/coverage.xml --rcfile=#{dir}/.coveragerc || echo 'Unable to build coverage xml for #{dir}'")
end
end