Package: src:ruby-pygments.rb Version: 1.2.0-3 Severity: serious Tags: ftbfs patch
Dear maintainer: After fixing #923986 we have now the opposite problem: There is a test which expects a timeout! This is how it fails now in some of my autobuilders: -------------------------------------------------------------------------------- [...] debian/rules build-indep dh build-indep --buildsystem=ruby --with ruby dh_update_autotools_config -i -O--buildsystem=ruby dh_autoreconf -i -O--buildsystem=ruby dh_auto_configure -i -O--buildsystem=ruby dh_ruby --configure debian/rules override_dh_auto_build make[1]: Entering directory '/<<PKGBUILDDIR>>' dh_auto_build dh_ruby --build dh_ruby --build # build documention rdoc lib Parsing sources... 20% [ 1/ 5] lib/pygments.rb 40% [ 2/ 5] lib/pygments/lexer.rb 60% [ 3/ 5] lib/pygments/mentos.py 80% [ 4/ 5] lib/pygments/popen.rb 100% [ 5/ 5] lib/pygments/version.rb Generating Darkfish format into /<<PKGBUILDDIR>>/doc... Files: 5 Classes: 3 (2 undocumented) Modules: 1 (0 undocumented) Constants: 1 (1 undocumented) Attributes: 0 (0 undocumented) Methods: 27 (5 undocumented) Total: 32 (8 undocumented) 75.00% documented Elapsed: 0.1s make[1]: Leaving directory '/<<PKGBUILDDIR>>' dh_auto_test -i -O--buildsystem=ruby dh_ruby --test create-stamp debian/debhelper-build-stamp fakeroot debian/rules binary-indep dh binary-indep --buildsystem=ruby --with ruby dh_testroot -i -O--buildsystem=ruby dh_prep -i -O--buildsystem=ruby debian/rules override_dh_auto_install make[1]: Entering directory '/<<PKGBUILDDIR>>' dh_auto_install dh_ruby --install /<<PKGBUILDDIR>>/debian/ruby-pygments.rb dh_ruby --install ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ â Install files â ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ install -d /<<PKGBUILDDIR>>/debian/ruby-pygments.rb/usr/lib/ruby/vendor_ruby install -D -m644 /<<PKGBUILDDIR>>/lib/pygments.rb /<<PKGBUILDDIR>>/debian/ruby-pygments.rb/usr/lib/ruby/vendor_ruby/pygments.rb install -D -m644 /<<PKGBUILDDIR>>/lib/pygments/version.rb /<<PKGBUILDDIR>>/debian/ruby-pygments.rb/usr/lib/ruby/vendor_ruby/pygments/version.rb install -D -m644 /<<PKGBUILDDIR>>/lib/pygments/mentos.py /<<PKGBUILDDIR>>/debian/ruby-pygments.rb/usr/lib/ruby/vendor_ruby/pygments/mentos.py install -D -m644 /<<PKGBUILDDIR>>/lib/pygments/lexer.rb /<<PKGBUILDDIR>>/debian/ruby-pygments.rb/usr/lib/ruby/vendor_ruby/pygments/lexer.rb install -D -m644 /<<PKGBUILDDIR>>/lib/pygments/popen.rb /<<PKGBUILDDIR>>/debian/ruby-pygments.rb/usr/lib/ruby/vendor_ruby/pygments/popen.rb dh_installchangelogs -pruby-pygments.rb /<<PKGBUILDDIR>>/CHANGELOG.md upstream ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ â Install Rubygems integration metadata â ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ generating gemspec at /<<PKGBUILDDIR>>/debian/ruby-pygments.rb/usr/share/rubygems-integration/all/specifications/pygments.rb-1.2.0.gemspec /usr/bin/ruby2.5 /usr/bin/gem2deb-test-runner ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ â Checking Rubygems dependency resolution on ruby2.5 â ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ GEM_PATH=debian/ruby-pygments.rb/usr/share/rubygems-integration/all:/var/lib/gems/2.5.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0:/usr/share/rubygems-integration/2.5.0:/usr/share/rubygems-integration/all ruby2.5 -e gem\ \"pygments.rb\" ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ â Run tests for ruby2.5 from debian/ruby-tests.rb â ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ RUBYLIB=/<<PKGBUILDDIR>>/debian/ruby-pygments.rb/usr/lib/ruby/vendor_ruby:. GEM_PATH=debian/ruby-pygments.rb/usr/share/rubygems-integration/all:/var/lib/gems/2.5.0:/usr/lib/x86_64-linux-gnu/rubygems-integration/2.5.0:/usr/share/rubygems-integration/2.5.0:/usr/share/rubygems-integration/all ruby2.5 debian/ruby-tests.rb Loaded suite /usr/lib/ruby/vendor_ruby/rake/rake_test_loader Started ../<<PKGBUILDDIR>>/lib/pygments/popen.rb:156: warning: File.exists? is a deprecated name, use File.exist? instead ...........................F =============================================================================== Failure: test_returns_nil_on_timeout(PygmentsHighlightTest) /<<PKGBUILDDIR>>/test/test_pygments.rb:44:in `test_returns_nil_on_timeout' 41: def test_returns_nil_on_timeout 42: large_code = REDIS_CODE * 300 43: code = P.highlight(large_code) # a 30 mb highlight request will timeout => 44: assert_equal nil, code 45: end 46: 47: def test_highlight_works_with_null_bytes <nil> expected but was <"<div class=\"highlight\"><pre><span></span><span class=\"cm\">/*</span>\n" + "<span class=\"cm\"> * Copyright (c) 2009-2010, Salvatore Sanfilippo <antirez at gmail dot com></span>\n" + "<span class=\"cm\"> * All rights reserved.</span>\n" + "<span class=\"cm\"> *</span>\n" + "<span class=\"cm\"> * Redistribution and use in source and binary forms, with or without</span>\n" + "<span class=\"cm\"> * modification, are permitted provided that the following conditions are met:</span>\n" + [...] " <span class=\"nf\">aeMain</span><span class=\"p\">(</span><span class=\"s s-Atom\">server</span><span class=\"p\">.</span><span class=\"s s-Atom\">el</span><span class=\"p\">);</span>\n" + " <span class=\"nf\">aeDeleteEventLoop</span><span class=\"p\">(</span><span class=\"s s-Atom\">server</span><span class=\"p\">.</span><span class=\"s s-Atom\">el</span><span class=\"p\">);</span>\n" + " <span class=\"s s-Atom\">return</span> <span class=\"mi\">0</span><span class=\"p\">;</span>\n" + "<span class=\"p\">}</span>\n" + "\n" + "<span class=\"cm\">/* The End */</span>\n" + "</pre></div>"> ===============================================================================/<<PKGBUILDDIR>>/lib/pygments/popen.rb:156: warning: File.exists? is a deprecated name, use File.exist? instead ................... Finished in 93.134140353 seconds. ------------------------------------------------------------------------------- 49 tests, 95 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 97.9592% passed ------------------------------------------------------------------------------- 0.53 tests/s, 1.02 assertions/s rake aborted! Command failed with status (1) Tasks: TOP => default => test (See full trace by running task with --trace) ERROR: Test "ruby2.5" failed. Exiting. dh_auto_install: dh_ruby --install /<<PKGBUILDDIR>>/debian/ruby-pygments.rb returned exit code 1 make[1]: *** [debian/rules:22: override_dh_auto_install] Error 1 make[1]: Leaving directory '/<<PKGBUILDDIR>>' make: *** [debian/rules:10: binary-indep] Error 2 dpkg-buildpackage: error: fakeroot debian/rules binary-indep subprocess returned exit status 2 -------------------------------------------------------------------------------- I've put a bunch of failed build logs here: https://people.debian.org/~sanvila/build-logs/ruby-pygments.rb/ We increased the timeout in debian/rules so that the unit test that failed before did not timeout anymore, but if we also had to make this new test to timeout deliberately, we would end up targeting a specific CPU speed to build the package, which is precisely what we don't want to do and the reason we increased the timeout in the first place. I would just disable the test expecting a timeout, as in the patch below. Sorry for not noticing this before. Thanks. --- a/test/test_pygments.rb +++ b/test/test_pygments.rb @@ -38,12 +38,6 @@ class PygmentsHighlightTest < Test::Unit::TestCase assert_equal 458511, code.bytesize.to_i end - def test_returns_nil_on_timeout - large_code = REDIS_CODE * 300 - code = P.highlight(large_code) # a 30 mb highlight request will timeout - assert_equal nil, code - end - def test_highlight_works_with_null_bytes code = P.highlight("\0hello", :lexer => 'rb') assert_match "hello", code