#262 open
Esteban Manchado Velázquez

Patch for adding generic test result parsers

Reported by Esteban Manchado Velázquez | July 16th, 2009 @ 06:47 AM

CC.rb only supports extracting test failures and errors from the Ruby unit test module. This patch adds generic parser support and parsers for Perl tests, Perl Test::Unit module and Python nosetests, apart from the Ruby unit test. It includes unit tests for each parser to make sure that they work as expected.

There is one change that I think you don't want to put there, but I wasn't sure how to solve otherwise. The change is in the Projects.load_project method, and calls Project.read with load_config = true.

I made the patch long ago (for 1.3.0), so chances are it won't apply cleanly anymore. I'm not even sure that the patch is complete anymore, but I've done my best. Just contact me with any problems you may have, or if you have suggestions for improvements.

Comments and changes to this ticket

  • Esteban Manchado Velázquez

    Esteban Manchado Velázquez December 17th, 2009 @ 06:13 AM

    I just gave CC.rb 1.4.0 a try, and the first simplistic tests seem to indicate that the code in my original patch works fine with this version too. I had to adapt the patch though, so here is the updated version that applies cleanly to 1.4.0.

  • Chad Woolley

    Chad Woolley December 17th, 2009 @ 10:21 PM

    • State changed from “new” to “open”

    Hi Esteban,

    Your patch doesn't apply cleanly to the master branch in git:

    $ git apply ~/data/patches/ccrb-140-test_result_collectors.patch 
    /Users/woolley/data/patches/ccrb-140-test_result_collectors.patch:356: trailing whitespace.
                # ...but don't "create" errors only with blank 
    /Users/woolley/data/patches/ccrb-140-test_result_collectors.patch:518: trailing whitespace.
              test_name = content.match(TEST_NAME_REGEX).to_s      
    /Users/woolley/data/patches/ccrb-140-test_result_collectors.patch:525: trailing whitespace.
            end      
    /Users/woolley/data/patches/ccrb-140-test_result_collectors.patch:536: trailing whitespace.
          end    
    /Users/woolley/data/patches/ccrb-140-test_result_collectors.patch:1323: trailing whitespace.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
    error: patch failed: app/models/project.rb:23
    error: app/models/project.rb: patch does not apply
    error: app/models/projects.rb: No such file or directory
    error: app/views/builds/show.rhtml: No such file or directory
    error: public/stylesheets/site.css: already exists in working directory
    
  • Esteban Manchado Velázquez

    Esteban Manchado Velázquez December 18th, 2009 @ 03:46 AM

    Hmm... I cloned the Git repo to reapply and adapt the patch, but I can't seem to be able to start master:

    ./cruise start --port 3334

    => Booting Mongrel => Rails 2.3.2 application starting on http://0.0.0.0:3334 cruise data root = '/root/.cruise'
    /usr/src/cruisecontrol.git/vendor/rails/activesupport/lib/active_support/dependencies.rb:440:in load_missing_constant': uninitialized constant ActionController::AbstractRequest (NameError)

    Any clues? I'm using Ruby 1.8.7, if that helps.

  • Chad Woolley

    Chad Woolley December 18th, 2009 @ 08:27 AM

    Your start command works fine for me under ruby 1.8.7. Can you try with a clean checkout of master branch in a new directory?

  • Esteban Manchado Velázquez

    Esteban Manchado Velázquez January 5th, 2010 @ 03:46 AM

    Nope, no dice. Still the same problem. Is this the correct URL? git://github.com/thoughtworks/cruisecontrol.rb.git
    I'm using Debian Lenny and Rubygems 1.2.0. Could that be the problem? I remember having problems with outdated rubygems before...

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Pages