relevance/rcov — Issue #85: rcov and rake 0.9.2
Author: leifg
Created: 2011-12-05 15:36:37+00:00
State: open

I have several problem using rcov with rake 0.9.2.2 (and rails via the rails plugin, as mentioned here: https://wiki.jenkins-ci.org/display/JENKINS/Configuring+a+Rails+build).

I was able to get everything working correctly with rake 0.8.7, so I assume the problem is due to changes in rake.

Anyhow here is what's wrong:

rake test:units:rcov --trace
rcov -o "/home/leifg/code/project/coverage/units" -T -x "rubygems/*,rcov*" --rails -I"lib:test" -I"/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib" "/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb" "test/unit/**/*_test.rb"
"/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb"
"test/unit/**/*_test.rb"
+------------------------------------------------------+-------+-------+--------+
| File | Lines | LOC | COV |
+------------------------------------------------------+-------+-------+--------+
|...e-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake.rb | 69 | 33 | 100.0% |
|...d@project/gems/rake-0.9.2.2/lib/rake/alt_system.rb | 109 | 65 | 29.2% |
|...@project/gems/rake-0.9.2.2/lib/rake/application.rb | 595 | 476 | 13.0% |
|...ad@project/gems/rake-0.9.2.2/lib/rake/cloneable.rb | 25 | 19 | 21.1% |
|...web/gems/rake-0.9.2.2/lib/rake/default_loader.rb | 10 | 7 | 42.9% |
|...web/gems/rake-0.9.2.2/lib/rake/dsl_definition.rb | 176 | 70 | 42.9% |
|...d@project/gems/rake-0.9.2.2/lib/rake/early_time.rb | 18 | 13 | 61.5% |
|...ead@project/gems/rake-0.9.2.2/lib/rake/ext/core.rb | 27 | 9 | 88.9% |
|...d@project/gems/rake-0.9.2.2/lib/rake/ext/module.rb | 39 | 27 | 33.3% |
|...d@project/gems/rake-0.9.2.2/lib/rake/ext/string.rb | 167 | 86 | 14.0% |
|...ead@project/gems/rake-0.9.2.2/lib/rake/ext/time.rb | 14 | 10 | 30.0% |
|...gems/rake-0.9.2.2/lib/rake/file_creation_task.rb | 24 | 12 | 50.0% |
|...ad@project/gems/rake-0.9.2.2/lib/rake/file_list.rb | 403 | 233 | 33.9% |
|...ad@project/gems/rake-0.9.2.2/lib/rake/file_task.rb | 47 | 25 | 40.0% |
|...d@project/gems/rake-0.9.2.2/lib/rake/file_utils.rb | 114 | 71 | 28.2% |
|...web/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb | 145 | 81 | 46.9% |
|...b/gems/rake-0.9.2.2/lib/rake/invocation_chain.rb | 51 | 39 | 41.0% |
|...e-0.9.2.2/lib/rake/invocation_exception_mixin.rb | 16 | 10 | 40.0% |
|...d@project/gems/rake-0.9.2.2/lib/rake/multi_task.rb | 16 | 11 | 36.4% |
|...d@project/gems/rake-0.9.2.2/lib/rake/name_space.rb | 25 | 14 | 35.7% |
|...head@project/gems/rake-0.9.2.2/lib/rake/pathmap.rb | 1 | 1 | 100.0% |
|...fweb/gems/rake-0.9.2.2/lib/rake/pseudo_status.rb | 24 | 20 | 40.0% |
|...@project/gems/rake-0.9.2.2/lib/rake/rake_module.rb | 29 | 17 | 41.2% |
|...b/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb | 22 | 16 | 18.8% |
|....9.2.2/lib/rake/rule_recursion_overflow_error.rb | 20 | 14 | 35.7% |
|....7-head@project/gems/rake-0.9.2.2/lib/rake/task.rb | 327 | 210 | 25.2% |
|...ems/rake-0.9.2.2/lib/rake/task_argument_error.rb | 7 | 4 | 100.0% |
|...web/gems/rake-0.9.2.2/lib/rake/task_arguments.rb | 78 | 51 | 43.1% |
|...project/gems/rake-0.9.2.2/lib/rake/task_manager.rb | 307 | 226 | 17.3% |
|...head@project/gems/rake-0.9.2.2/lib/rake/version.rb | 8 | 7 | 100.0% |
|...7-head@project/gems/rake-0.9.2.2/lib/rake/win32.rb | 55 | 29 | 41.4% |
+------------------------------------------------------+-------+-------+--------+
|Total | 2968 | 1906 | 28.0% |
+------------------------------------------------------+-------+-------+--------+
28.0% 31 file(s) 2968 Lines 1906 LOC
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rcov-0.9.11/bin/rcov:517:in `load': no such file to load -- test/unit/**/*_test.rb (LoadError)
from /home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rcov-0.9.11/bin/rcov:517
from /home/leifg/.rvm/gems/ree-1.8.7-head@project/bin/rcov:19:in `load'
from /home/leifg/.rvm/gems/ree-1.8.7-head@project/bin/rcov:19
rake aborted!
Command failed with status (1): [rcov -o "/home/leifg/code/project/coverage/u...]

Tasks: TOP => test:units
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [/home/leifg/.rvm/rubies/ree-1.8.7-head/bin...]
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/file_utils.rb:53:in `create_shell_runner'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `call'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/file_utils.rb:45:in `sh'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `sh'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/file_utils.rb:82:in `ruby'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/file_utils_ext.rb:39:in `ruby'
/home/leifg/code/project/vendor/plugins/rails_rcov/tasks/rails_rcov.rake:83:in `new_rcov_task'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/task.rb:203:in `call'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/task.rb:203:in `execute'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/home/leifg/.rvm/rubies/ree-1.8.7-head/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `top_level'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `run'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/gems/rake-0.9.2.2/bin/rake:33
/home/leifg/.rvm/gems/ree-1.8.7-head@project/bin/rake:19:in `load'
/home/leifg/.rvm/gems/ree-1.8.7-head@project/bin/rake:19
Tasks: TOP => test:units:rcov

The problem here is, that rcov tries to find the file "test/unit/**/*_test.rb" (see "`load': no such file to load -- test/unit/**/*_test.rb (LoadError)") when it really should resolve it to multiple files test/unit/my_custom_test.rb etc...)