From 0cf46f7636ce0d06386db82b53654a0540ae0ecd Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 8 Nov 2012 10:12:32 -0500 Subject: [PATCH] Namespace the coverage html and xml report generation tasks --- jenkins/test_edge.sh | 2 +- jenkins/test_lms.sh | 2 +- rakefile | 20 ++++++++++++-------- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/jenkins/test_edge.sh b/jenkins/test_edge.sh index e33cef94fd..7b58b481f6 100755 --- a/jenkins/test_edge.sh +++ b/jenkins/test_edge.sh @@ -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 \ No newline at end of file diff --git a/jenkins/test_lms.sh b/jenkins/test_lms.sh index b44e6b6f70..98640c2b5b 100755 --- a/jenkins/test_lms.sh +++ b/jenkins/test_lms.sh @@ -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 \ No newline at end of file diff --git a/rakefile b/rakefile index af22f5d7d4..ad494d5ece 100644 --- a/rakefile +++ b/rakefile @@ -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