Bug#838984: diffoscope: tests fails in jessie-backports

Mattia Rizzolo mattia at debian.org
Tue Sep 27 12:44:26 UTC 2016


source: diffoscope
version: 60

If the test suite is run as-is in jessie-backports it fails, and it
really shouldn't.
I'd like to have this fixed for v61, so I can avoid doing ugly things
for backporting it like
https://anonscm.debian.org/git/reproducible/diffoscope.git/commit/?h=60_bpo8%2b1&id=8b803f7a67c1c788bc442e35d8c3ddce91ead871

Following the failing tests:


=============================================================================== FAILURES ===============================================================================
___________________________________________________________________________ test_differences ___________________________________________________________________________

differences = [<Difference test1.jar -- test2.jar [<Difference zipinfo -v {} -- zipinfo -v {} []>, <Difference com/example/MainActiv....class [<Difference javap -verbose -constants -s -l -private {} -- javap -verbose -constants -s -l -private {} []>]>]>]

    @skip_unless_tools_exist('enjarify', 'zipinfo', 'javap')
    def test_differences(differences):
        assert differences[0].source1 == 'test1.jar'
        assert differences[0].source2 == 'test2.jar'
        zipinfo = differences[0].details[0]
        classdiff = differences[0].details[1]
        assert zipinfo.source1 == 'zipinfo -v {}'
        assert zipinfo.source2 == 'zipinfo -v {}'
        assert classdiff.source1 == 'com/example/MainActivity.class'
        assert classdiff.source2 == 'com/example/MainActivity.class'
        expected_diff = open(data('dex_expected_diffs')).read()
        found_diff = zipinfo.unified_diff + classdiff.details[0].unified_diff
>       assert expected_diff == found_diff
E       assert '@@ -54,15 +5...args_size=1\n' == '@@ -54,15 +54...args_size=1\n'
E           @@ -54,15 +54,15 @@
E              version of encoding software:                   2.0
E              minimum file system compatibility required:     MS-DOS, OS/2 or NT FAT
E              minimum software version required to extract:   2.0
E              compression method:                             none (stored)
E              file security status:                           not encrypted
E              extended local header:                          no
E              file last modified on (DOS date/time):          1980 Jan 1 00:00:00
E           -  32-bit CRC value (hex):                         fc227a58
E           +  32-bit CRC value (hex):                         19c9f64e
E              compressed size:                                305 bytes
E              uncompressed size:                              305 bytes
E              length of filename:                             30 characters
E              length of extra field:                          0 bytes
E              length of file comment:                         0 characters
E              disk number on which file begins:               disk 1
E              apparent file type:                             binary
E           @@ -17,16 +17,16 @@
E         -    #12 = Methodref          #4.#11         // android/app/Activity.onCreate:(Landroid/os/Bundle;)V
E         +    #12 = Methodref          #4.#11         //  android/app/Activity.onCreate:(Landroid/os/Bundle;)V
E         ?                                              +
E              #13 = Integer            2130903040
E              #14 = Float              1.7412887E38f
E              #15 = Utf8               setContentView
E              #16 = Utf8               (I)V
E         -    #17 = NameAndType        #15:#16        // setContentView:(I)V
E         +    #17 = NameAndType        #15:#16        //  setContentView:(I)V
E         ?                                              +
E         -    #18 = Methodref          #2.#17         // com/example/MainActivity.setContentView:(I)V
E         +    #18 = Methodref          #2.#17         //  com/example/MainActivity.setContentView:(I)V
E         ?                                              +
E           -  #19 = Utf8               Sat Nov 21 14:20:33 CET 2015
E         - -  #20 = String             #19            // Sat Nov 21 14:20:33 CET 2015
E         + -  #20 = String             #19            //  Sat Nov 21 14:20:33 CET 2015
E         ?                                              +
E           +  #19 = Utf8               Thu Mar 17 11:54:42 CET 2016
E         - +  #20 = String             #19            // Thu Mar 17 11:54:42 CET 2016
E         + +  #20 = String             #19            //  Thu Mar 17 11:54:42 CET 2016
E         ?                                              +
E              #21 = Utf8               Code
E            {
E              public com.example.MainActivity();
E         -      descriptor: ()V
E         +      Signature: ()V
E                flags: ACC_PUBLIC
E                Code:
E                  stack=300, locals=1, args_size=1

tests/comparators/test_dex.py:55: AssertionError
______________________________________________________________________________ test_diff _______________________________________________________________________________

differences = [<Difference javap -verbose -constants -s -l -private {} -- javap -verbose -constants -s -l -private {} []>]

    @skip_unless_tools_exist('javap')
    def test_diff(differences):
        expected_diff = open(data('class_expected_diff')).read()
>       assert differences[0].unified_diff == expected_diff
E       assert '@@ -36,12 +3...ne 3: 0\n }\n' == '@@ -31,13 +31..."Test.java"\n'
E         - @@ -36,12 +36,12 @@
E         ?      ^  ^   ^  ^
E         + @@ -31,13 +31,13 @@
E         ?      ^  ^   ^  ^
E         +          line 1: 0
E         +  
E              public static int main(java.lang.String[]);
E         -      Signature: ([Ljava/lang/String;)I
E         ?      ^ ^^^ ^ -
E         +      descriptor: ([Ljava/lang/String;)I
E         ?      ^^^^^ ^ ^
E                flags: ACC_PUBLIC, ACC_STATIC
E         -      LineNumberTable:
E         -        line 3: 0
E                Code:
E                  stack=1, locals=1, args_size=1
E           -         0: bipush        42
E         - -         2: ireturn       
E         ?                     -------
E         + -         2: ireturn
E         - +         0: iconst_m1     
E         ?                       -----
E         + +         0: iconst_m1
E         - +         1: ireturn       
E         ?                     -------
E         + +         1: ireturn
E                  LineNumberTable:
E                    line 3: 0
E            }
E         +  SourceFile: "Test.java"

tests/comparators/test_java.py:45: AssertionError
_________________________________________________________________________ test_identification __________________________________________________________________________

file1 = <<class 'diffoscope.comparators.binary.FilesystemFile'> /build/diffoscope-61/tests/data/test1.ppu>

    @skip_unless_tools_exist('ppudump')
    def test_identification(file1):
>       assert isinstance(file1, PpuFile)
E       assert isinstance(<<class 'diffoscope.comparators.binary.FilesystemFile'> /build/diffoscope-61/tests/data/test1.ppu>, PpuFile)

tests/comparators/test_ppu.py:39: AssertionError
______________________________________________________________________________ test_diff _______________________________________________________________________________

differences = []

    @skip_unless_tools_exist('ppudump')
    def test_diff(differences):
>       print(differences[0].unified_diff)
E       IndexError: list index out of range

tests/comparators/test_ppu.py:51: IndexError
______________________________________________________________________ test_compare_non_existing _______________________________________________________________________

monkeypatch = <_pytest.monkeypatch.monkeypatch object at 0x7f27588b0e48>
file1 = <<class 'diffoscope.comparators.binary.FilesystemFile'> /build/diffoscope-61/tests/data/test1.ppu>

    @skip_unless_tools_exist('ppudump')
    def test_compare_non_existing(monkeypatch, file1):
>       assert_non_existing(monkeypatch, file1, has_null_source=False)

tests/comparators/test_ppu.py:57: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

monkeypatch = <_pytest.monkeypatch.monkeypatch object at 0x7f27588b0e48>
fixture = <<class 'diffoscope.comparators.binary.FilesystemFile'> /build/diffoscope-61/tests/data/test1.ppu>, has_null_source = False, has_details = True

    def assert_non_existing(monkeypatch, fixture, has_null_source=True, has_details=True):
        monkeypatch.setattr(Config.general, 'new_file', True)
    
        difference = fixture.compare(NonExistingFile('/nonexisting', fixture))
    
        output_html(difference, print_func=print)
        output_text(difference, print_func=print)
    
        assert difference.source2 == '/nonexisting'
>       assert not has_details or len(difference.details) > 0
E       assert (not True or 0 > 0)
E        +  where 0 = len([])
E        +    where [] = <Difference /build/diffoscope-61/tests/data/test1.ppu -- /nonexisting []>.details

tests/comparators/utils.py:78: AssertionError

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/reproducible-builds/attachments/20160927/9e012bbc/attachment.sig>


More information about the Reproducible-builds mailing list