Bug 1085029 - Ruby tests fail with latest Ruby
Summary: Ruby tests fail with latest Ruby
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pino Toscano
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-07 14:57 UTC by Richard W.M. Jones
Modified: 2014-04-22 17:03 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-04-22 12:36:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-04-07 14:57:36 UTC
Description of problem:

The Ruby tests fail with the latest Ruby packages in Rawhide.
(Originally I thought this bug was going to be caused by Ruby 2.1,
but this is NOT with Ruby 2.1 packages).

/builddir/build/BUILD/libguestfs-1.27.3/run --test ./run-ruby-tests
rake test TEST=t/tc_010_load.rb
Warning: you should require 'minitest/autorun' instead.
Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
From:
  /usr/share/ruby/test/unit.rb:3:in `<top (required)>'
  /builddir/build/BUILD/libguestfs-1.27.3/ruby/t/tc_010_load.rb:18:in `<top (required)>'
  /usr/share/gems/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:15:in `block in <main>'
  /usr/share/gems/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `select'
  /usr/share/gems/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `<main>'
MiniTest::Unit::TestCase is now Minitest::Test. From /usr/share/ruby/test/unit/testcase.rb:8:in `<module:Unit>'
/usr/share/ruby/test/unit.rb:670:in `<class:Runner>': undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)
	from /usr/share/ruby/test/unit.rb:255:in `<module:Unit>'
	from /usr/share/ruby/test/unit.rb:9:in `<module:Test>'
	from /usr/share/ruby/test/unit.rb:8:in `<top (required)>'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /builddir/build/BUILD/libguestfs-1.27.3/ruby/t/tc_010_load.rb:18:in `<top (required)>'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/share/gems/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:15:in `block in <main>'
	from /usr/share/gems/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `select'
	from /usr/share/gems/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `<main>'
rake aborted!
Command failed with status (1): [ruby -I"lib:ext/guestfs" -I"/usr/share/gems/gems/rake-10.0.4/lib" "/usr/share/gems/gems/rake-10.0.4/lib/rake/rake_test_loader.rb" "t/tc_010_load.rb" ]
Tasks: TOP => test
(See full trace by running task with --trace)
/builddir/build/BUILD/libguestfs-1.27.3/run: command failed with exit code 1
FAIL: run-ruby-tests

Version-Release number of selected component (if applicable):

libguestfs 1.27.3

DEBUG util.py:281:   ruby-devel                    x86_64 2.0.0.353-17.fc21             build 124 k
DEBUG util.py:281:   ruby-irb                      noarch 2.0.0.353-17.fc21             build  85 k
DEBUG util.py:281:   rubygem-minitest              noarch 5.3.1-1.fc21                  build  46 k
DEBUG util.py:281:   rubygem-rake                  noarch 10.0.4-1.fc20.1               build  59 k

How reproducible:

Unknown, at least once.

Steps to Reproduce:
1. Build & test libguestfs from git with Ruby packages from Rawhide.

Comment 1 Richard W.M. Jones 2014-04-07 19:08:57 UTC
This seems to be because rubygem-minitest version has jumped from
4.x to 5.x.

I was able to reproduce it on Rawhide by updating that package
and running 'make -C ruby check'.

Comment 2 Richard W.M. Jones 2014-04-07 19:24:04 UTC
Uninstalling rubygem-minitest and installing rubygem-unit-test
fixes the problem.  Unfortunately if you install rubygem-minitest
then the test breaks again (even if rubygem-unit-test is installed).

I have no idea what sort of horror in the Ruby language/environment
causes this nonsense.

Comment 3 Pino Toscano 2014-04-18 09:48:05 UTC
Patches posted to mailing list:
  https://www.redhat.com/archives/libguestfs/2014-April/msg00049.html
  https://www.redhat.com/archives/libguestfs/2014-April/msg00050.html

With the above, should be possible to use rubygem-minitest again.


Note You need to log in before you can comment on or make changes to this bug.