Namespace the coverage html and xml report generation tasks

This commit is contained in:
Calen Pennington
2012-11-08 10:12:32 -05:00
parent 17570c4c06
commit 0cf46f7636
3 changed files with 14 additions and 10 deletions

View File

@@ -23,7 +23,7 @@ rake test_common/lib/capa || TESTS_FAILED=1
rake test_common/lib/xmodule || TESTS_FAILED=1
rake phantomjs_jasmine_lms || true
rake phantomjs_jasmine_cms || true
rake xml html
rake coverage:xml coverage:html
[ $TESTS_FAILED == '0' ]
rake autodeploy_properties

View File

@@ -21,7 +21,7 @@ rake test_lms[false] || TESTS_FAILED=1
rake test_common/lib/capa || TESTS_FAILED=1
rake test_common/lib/xmodule || TESTS_FAILED=1
rake phantomjs_jasmine_lms || true
rake xml html
rake coverage:xml coverage:html
[ $TESTS_FAILED == '0' ]
rake autodeploy_properties

View File

@@ -184,16 +184,20 @@ task :test do
end
end
task :html do
TEST_TASK_DIRS.each do |dir|
sh("coverage html --rcfile=#{dir}/.coveragerc")
namespace :coverage do
desc "Build the html coverage reports"
task :html do
TEST_TASK_DIRS.each do |dir|
sh("coverage html --rcfile=#{dir}/.coveragerc")
end
end
end
task :xml 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")
desc "Build the xml coverage reports"
task :xml 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")
end
end
end