Rcov for JRuby Update

19 03 2008

It works well in simple cases. Running from Rake doesn’t work. Running rcov from rspec doesn’t work yet, either.

There are 13 unit tests that fail (12 failures and 1 error). The failures are mostly minor differences in output between MRI and JRuby. The big old up now is the one error. It appears to be a bug in the reset code. Once data collection starts, calling reset clears the callected data (desirable) and prevents new data from being collection (less desirable). I think that’s why running rcov from rspec fails.




7 responses

9 04 2008


Thanks for the update. I wish I could spend sometime to help on the pending errors or failures now.


19 06 2008

Somehow i missed the point. Probably lost in translation 🙂 Anyway … nice blog to visit.

cheers, Disaffect.

8 07 2008

So I am trying to get this woring. Got rcov without the extension installed. Got the rcov4jr code and compiled. The problem I am getting is that the rcov4jr extension exceptions when any variables or methods are called on it. rcov tries to get the ABI, and this fails, and it is due to exception. Error “/rcov.rb:648:in `const_missing’: uninitialized constant Rcov::RCOV__ (NameError)”. I’m using jruby 1.1.2. Any help would be appreciated, as I would like to help debug the port so far…but I need the extension to work.

8 07 2008

Try using a trunk build of JRuby, You’re probably going to need that anyway because the tracing is borked in 1.1.2. Also, how are you running the tests?

9 07 2008

So I have switched to using trunk, makes no difference. I am running the tests in the rcov4jr dir using ‘jruby -S rake’. If seems if it tries to load the extension, but can’t find any of the annotations. So if I open jirb, do require ‘rcovrt’, then puts ABI, I get const missing error. I am on win XP, using jdk1.6.0_06.

10 07 2008

So it seems that my setup may not be correct. My compiled rcovrt.jar file is bad somehow, using on compiled on a mac it loads just fine on windows. Just need to figure out why is compiles differently.

10 07 2008

Found the problem….seems the jar creation on windows…at least my machine, doesn’t work right. I had to change the dir, vs using the jar -C option.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: