Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 827934 - dev-ruby/hpricot-0.8.6-r6: fails test_abs_xpath, test_predicates and test_predicates with ruby30
Summary: dev-ruby/hpricot-0.8.6-r6: fails test_abs_xpath, test_predicates and test_pre...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords: TESTFAILURE
Depends on:
Blocks:
 
Reported: 2021-12-01 10:58 UTC by Alex Fan
Modified: 2021-12-04 09:22 UTC (History)
0 users

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


Attachments
build log (hpricot-0.8.6-r6:20211201-184910.log,240.47 KB, text/plain)
2021-12-01 10:59 UTC, Alex Fan
Details
emerge --info (emerge.info,6.00 KB, text/plain)
2021-12-01 11:00 UTC, Alex Fan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Fan archtester 2021-12-01 10:58:54 UTC
only fails on ruby30. passed all tests on ruby26 and ruby27

===============================================================================
Failure: test_abs_xpath(TestParser)
/var/tmp/portage/dev-ruby/hpricot-0.8.6-r6/work/ruby30/hpricot-0.8.6/test/test_parser.rb:165:in `test_abs_xpath'
     162:     assert_equal 60, @boingboing.search("/*/body//p[@class='posted']").length
     163:     assert_equal 18, @boingboing.search("//script").length
     164:     divs = @boingboing.search("//script/../div")
  => 165:     assert_equal 2,  divs.length
     166:     imgs = @boingboing.search('//div/p/a/img')
     167:     assert_equal 16, imgs.length
     168:     assert_equal 16, @boingboing.search('//div').search('p/a/img').length
<2> expected but was
<1>
===============================================================================
........................F
===============================================================================
Failure: test_many_paths(TestParser)
/var/tmp/portage/dev-ruby/hpricot-0.8.6-r6/work/ruby30/hpricot-0.8.6/test/test_parser.rb:222:in `test_many_paths'
     219:   def test_many_paths
     220:     @boingboing = Hpricot.parse(TestFiles::BOINGBOING)
     221:     assert_equal 62, @boingboing.search('p.posted, link[@rel="alternate"]').length
  => 222:     assert_equal 18, @boingboing.search('//div/p[a/img]|//link[@rel="alternate"]').length
     223:   end
     224: 
     225:   def test_stacked_search
<18> expected but was
<26>
===============================================================================
......../var/tmp/portage/dev-ruby/hpricot-0.8.6-r6/work/ruby30/hpricot-0.8.6/lib/hpricot/elements.rb:68: warning: constant ::Fixnum is deprecated
....F
===============================================================================
Failure: test_predicates(TestParser)
/var/tmp/portage/dev-ruby/hpricot-0.8.6-r6/work/ruby30/hpricot-0.8.6/test/test_parser.rb:179:in `test_predicates'
     176:     assert_equal 16, p_imgs.length
     177:     assert p_imgs.all? { |x| x.name == 'p' }
     178:     p_imgs = @boingboing.search('//div/p[a/img]')
  => 179:     assert_equal 16, p_imgs.length
     180:     assert p_imgs.all? { |x| x.name == 'p' }
     181:     assert_equal 1, @boingboing.search('//input[@checked]').length
     182:   end
<16> expected but was
<24>
===============================================================================

Reproducible: Always
Comment 1 Alex Fan archtester 2021-12-01 10:59:52 UTC
Created attachment 757123 [details]
build log
Comment 2 Alex Fan archtester 2021-12-01 11:00:11 UTC
Created attachment 757124 [details]
emerge --info
Comment 3 Hans de Graaff gentoo-dev 2021-12-03 07:27:02 UTC
I can reproduce this, but this must have gotten broken between adding ruby30 and now.
Comment 4 Hans de Graaff gentoo-dev 2021-12-04 09:22:09 UTC
(In reply to Hans de Graaff from comment #3)
> I can reproduce this, but this must have gotten broken between adding ruby30
> and now.

Ah, these failures are intermittent and don't always happen. Given a fixed test order that seems fairly fishy.