Package: diffoscope

The GHC tests are too tightly bound to a very specific ghc version (in
this case ghc 7.1.0.3) and the test will fail if the HI-version
mismatche (hi magic in this case is 33214052).
In such case the diffoscope internal will select a fallback
FilesystemComperator instead of the HiFile one.

Introduced in commit 867ecde1

This is particularly a problem for future packaging of a version outside
of debian (foreign distro) as this tests will always fail leading to an
un-packagable state.

Additionally I don't think that this is very practical in its nature
because of the way haskell compiled .hi files work. They contain hashes
of the used modules (like in this case System.Posix.Time and
System.Posix.Process).
If those values change, the test will fail again (where maybe even the
matching ghc 7.1.0.3 is indeed installed).
Maybe it should be considered to do this diffoscope unit tests in a
different way (or drop it).

======================================================================================
FAILURES
=======================================================================================
_________________________________________________________________________________
test_identification
_________________________________________________________________________________

haskell1 = <<class 'diffoscope.comparators.binary.FilesystemFile'>
/home/anthraxx/Projects/external/diffoscope/tests/data/test1.hi>

    @skip_unless_tools_exist('ghc')
    def test_identification(haskell1):
>       assert isinstance(haskell1, HiFile)
E       assert isinstance(<<class
'diffoscope.comparators.binary.FilesystemFile'>
/home/anthraxx/Projects/external/diffoscope/tests/data/test1.hi>, HiFile)

tests/comparators/test_haskell.py:31: AssertionError
______________________________________________________________________________________
test_diff
______________________________________________________________________________________

differences = []

    @skip_unless_tools_exist('ghc')
    def test_diff(differences):
        with open(data('haskell_expected_diff')) as f:
            expected_diff = f.read()
>       assert differences[0].unified_diff == expected_diff
E       IndexError: list index out of range

tests/comparators/test_haskell.py:44: IndexError


cheers,
Levente

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to