Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

LABS
Rake test error due to –trace argument

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.

Comments
  1. Brian Takita says:

    One project that is appealing is [Thor](http://github.com/wycats/thor/tree/master). Its implementation is simpler than Rake and its easier to test because Thor tasks are simply methods on a class.

  2. jack dempsey says:

    To second Brian’s comment, Thor’s definitely worth a look if you haven’t seen it already. We use it for a variety of functions in Merb.

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *