ci-reporter / ci_reporter

CI::Reporter is an add-on to popular test frameworks that allows you to generate XML reports
MIT License
343 stars 110 forks source link

ci_reporter 1.6.7 fails on ruby 1.9 in rspec-using projects #47

Closed rsutphin closed 12 years ago

rsutphin commented 12 years ago

I have a bunch of libraries with multiplatform CI builds. They run nightly to fetch new gem versions to verify compatibility. Last night, all of them that use ci_reporter updated to 1.6.7 and then failed on ruby 1.9.x with an exception like this:

/var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/test_unit.rb:7:in `require': cannot load such file -- test/unit/ui/console/testrunner (LoadError)
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/test_unit.rb:7:in `<top (required)>'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/test_suite.rb:8:in `require'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/test_suite.rb:8:in `<top (required)>'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/core.rb:5:in `require'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/core.rb:5:in `<top (required)>'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/rspec.rb:5:in `require'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/rspec.rb:5:in `<top (required)>'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/rake/rspec_loader.rb:6:in `require'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/bundler/gems/ci_reporter-00a62bfeadc4/lib/ci/reporter/rake/rspec_loader.rb:6:in `<top (required)>'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:256:in `require'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:256:in `block in requires='
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:256:in `map'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/configuration.rb:256:in `requires='
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/configuration_options.rb:19:in `block in configure'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/configuration_options.rb:18:in `each'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/configuration_options.rb:18:in `configure'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/command_line.rb:17:in `run'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:80:in `run_in_process'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:69:in `run'
    from /var/lib/hudson/runner-home/.rvm/gems/ruby-1.9.3-p0@ncs_mdes_warehouse/gems/rspec-core-2.7.1/lib/rspec/core/runner.rb:10:in `block in autorun'

Unfortunately, I have not had time to trace into this to produce a minimal test case. The problem is not present on ruby 1.8.7, but I did see it on both 1.9.2-p290 and 1.9.3-p0. All of the affected projects are using ci_reporter with rspec; none use test_unit. Locking to ci_reporter 1.6.6 prevents this error.

weidenfreak commented 12 years ago

to me it looks like it's failing because of this commit: https://github.com/nicksieger/ci_reporter/commit/6902ef5d0d844e5821a952920a5ea561fbdc9f29

test_unit is being required in a file that is used for rspec as well