Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 547326 - dev-ruby/text-hyphen-1.4.1-r1 - src_test(): /usr/lib/ruby/1.9.1/test/unit.rb:328:in `autorun': uninitialized class variable @@installed_at_exit in Test::Unit::Runner (NameError)
Summary: dev-ruby/text-hyphen-1.4.1-r1 - src_test(): /usr/lib/ruby/1.9.1/test/unit.rb:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks: 546968
  Show dependency tree
 
Reported: 2015-04-21 19:20 UTC by Jeroen Roovers (RETIRED)
Modified: 2015-04-25 08:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
dev-ruby:text-hyphen-1.4.1-r1:20150421-183024.log (20150421-183024.log,85.43 KB, text/plain)
2015-04-21 19:20 UTC, Jeroen Roovers (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2015-04-21 19:20:34 UTC
Created attachment 401760 [details]
dev-ruby:text-hyphen-1.4.1-r1:20150421-183024.log

>>> Source compiled.
>>> Test phase: dev-ruby/text-hyphen-1.4.1-r1
 * Running test phase for ruby19 ...
Defaulting gemspec to MIT license.
Call license in hoe spec to change.
/usr/bin/ruby19 -w -Ilib:bin:test:. -e 'require "rubygems"; require "minitest/autorun"; require "test/test_bugs.rb"; require "test/test_text_hyphen.rb"' --
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
From:
  /usr/lib/ruby/1.9.1/minitest/autorun.rb:14:in `<top (required)>'
  -e:1:in `<main>'
/usr/lib/ruby/gems/1.9.1/gems/minitest-5.3.3/lib/minitest.rb:46: warning: (...) interpreted as grouped expression
MiniTest::Unit.autorun is now Minitest.autorun. From /usr/lib/ruby/1.9.1/minitest/autorun.rb:18:in `<top (required)>'
MiniTest::Unit::TestCase is now Minitest::Test. From /usr/lib/ruby/1.9.1/test/unit/testcase.rb:8:in `<module:Unit>'
/usr/lib/ruby/1.9.1/test/unit.rb:328:in `autorun': uninitialized class variable @@installed_at_exit in Test::Unit::Runner (NameError)
        from /usr/lib/ruby/1.9.1/test/unit.rb:640:in `<top (required)>'
        from /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /dev/shm/portage/dev-ruby/text-hyphen-1.4.1-r1/work/ruby19/text-hyphen-1.4.1/test/test_bugs.rb:2:in `<top (required)>'
        from /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require'
        from -e:1:in `<main>'
rake aborted!
Command failed with status (1): [/usr/bin/ruby19 -w -Ilib:bin:test:. -e 're...]

Tasks: TOP => test
(See full trace by running task with --trace)
 * ERROR: dev-ruby/text-hyphen-1.4.1-r1::gentoo failed (test phase):
 *   tests failed

[ebuild   R   ~] dev-ruby/text-hyphen-1.4.1-r1::gentoo  USE="doc {test}" RUBY_TARGETS="ruby19 ruby20" 0 KiB
Comment 1 Hans de Graaff gentoo-dev Security 2015-04-24 07:13:59 UTC
That is due to older test-unit versions no longer being compatible with newer tools. Fixed in place by requiring a more modern test-unit.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2015-04-25 07:54:04 UTC
I'm not sure that's the correct fix. At the time of the test failure, both dev-ruby/test-unit-2.5.5-r1 and dev-ruby/test-unit-1.2.3-r1 were installed. Merely having the former in place apparently doesn't make dev-ruby/text-hyphen's test suite ignore the latter.
Comment 3 Hans de Graaff gentoo-dev Security 2015-04-25 08:18:53 UTC
all_ruby_prepare() {
	sed -i -e '2igem "test-unit", ">= 2.0"' test/test_*.rb || die
}