Rake test error due to –trace argument

November 1, 2008 Adam Milligan

We’ve had some trouble with test task errors causing failing builds on our continuous integration boxes ever since the release of the version 0.8.3 rake gem. Sound familiar? Read on!

As it turns out, we run all of our continuous integration tasks with the –trace option, so we can see what went wrong in the (extremely rare, of course) eventuality of some kind of error.

This is the output we started seeing with the new gem:

** Invoke selenium:local (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute selenium:local
running selenium tests locally...
invalid option: --trace
Test::Unit automatic runner.
Usage: /usr/bin/rake [options] [-- untouched arguments]
<snip valid command line options>

After some investigation we uncovered changes in how rake 0.8.3 parses command line arguments. In particular, it doesn’t remove rake-specific arguments, like –trace, from the ARGV. So, when test tasks invoke the Test::Unit::AutoRunner class, it receives these arguments, fails to recognize them, and complains. Messily.

Unfortunately, we don’t have an immediate fix for you. We submitted a patch to the project, and Jim Weirich has already filed a bug report, so version 0.8.4 should resolve the problem.

Comments welcome.

About the Author

Biography

Previous
Tracker API Released
Tracker API Released

We've released the first version of the Tracker API. It's a RESTful HTTP XML interface, uses a simple, toke...

Next
Hacking a subselect in ActiveRecord
Hacking a subselect in ActiveRecord

This week, Damon and I were doing a performance optimization for some slow queries. The most performant so...

×

Subscribe to our Newsletter

!
Thank you!
Error - something went wrong!