[pkg-php-pear] Bug#795950: twig: Non-determistically FTBFS due to unreliable timing in tests

Chris Lamb lamby at debian.org
Tue Aug 18 09:38:18 UTC 2015


Source: twig
Version: 1.18.1-1
Severity: serious
Justification: fails to build from source
User: reproducible-builds at lists.alioth.debian.org
Usertags: ftbfs
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Dear Maintainer,

twig's testsuite appears to use method timing/benchmarking in such
a way that it will non-deterministically FTBFS:

  [..]
  2) Twig_Tests_Profiler_Dumper_TextTest::testDump
  Failed asserting that format description matches text.
  --- Expected
  +++ Actual
  @@ @@
     └ index.twig::macro(foo)
  -  └ embedded.twig
  +  └ embedded.twig 6.90ms/46%
       └ included.twig
  
  /tmp/buildd/twig-1.18.1/test/Twig/Tests/Profiler/Dumper/TextTest.php:28
  
  FAILURES!
  Tests: 1115, Assertions: 2943, Failures: 2.
  debian/rules:45: recipe for target 'override_dh_auto_test-indep'
  failed
  make[1]: *** [override_dh_auto_test-indep] Error 1
  make[1]: Leaving directory '/tmp/buildd/twig-1.18.1'
  debian/rules:7: recipe for target 'build' failed
  make: *** [build] Error 2
  dpkg-buildpackage: error: debian/rules build gave error exit status 2

  [..]

This is caused by conditionally emitting a different output if, for
example, a method appears to have run "slowly", which is
non-determinstic:

  lib/Twig/Profiler/Dumper/Text.php:

        if ($profile->getDuration() * 1000 < 1) {
            $str = $start."\n";
        } else {
            $str = sprintf("%s %s\n", $start,
            $this->formatTime($profile, $percent));
        }

  lib/Twig/Profiler/Dumper/Html.php:

        return sprintf('<span style="color: %s">%.2fms/%.0f%%</span>',
        $percent > 20 ? self::$colors['big'] : 'auto',
        $profile->getDuration() * 1000, $percent);

(etc.)

The full build log is attached or can be viewed here:

  https://reproducible.debian.net/logs/unstable/amd64/twig_1.18.1-1.build2.log.gz


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: twig.1.18.1-1.unstable.amd64.log.txt
URL: <http://lists.alioth.debian.org/pipermail/pkg-php-pear/attachments/20150818/c73e0f40/attachment-0001.txt>


More information about the pkg-php-pear mailing list