diff --git a/rakefile b/rakefile index 8f49668506..0c1ead929c 100644 --- a/rakefile +++ b/rakefile @@ -74,13 +74,13 @@ end Dir["common/lib/*"].each do |lib| task_name = "test_#{lib}" - report_dir = File.join(REPORT_DIR, task_name) + report_dir = File.join(REPORT_DIR, task_name.gsub('/', '_')) directory report_dir desc "Run tests for common lib #{lib}" - task task_name do + task task_name => report_dir do ENV['NOSE_XUNIT_FILE'] = File.join(report_dir, "nosetests.xml") - sh("nosetests #{lib}") + sh("nosetests #{lib} --cover-erase --with-xunit --with-xcoverage --cover-html --cover-inclusive --cover-package #{File.basename(lib)}") end task :test => task_name end