Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_xml_from_binary[graphite/graphite_tests.ttf-{Glat,Silf}] fail on big endian machines #1311

Closed
mcepl opened this issue Sep 4, 2018 · 5 comments

Comments

@mcepl
Copy link

mcepl commented Sep 4, 2018

See full build log on ppc64 machine. I can see:

[   97s] =================================== FAILURES ===================================
[   97s] ____________ test_xml_from_binary[graphite/graphite_tests.ttf-Silf] ____________
[   97s] 
[   97s] testfile = 'graphite/graphite_tests.ttf', tableTag = 'Silf'
[   97s] 
[   97s]     def test_xml_from_binary(testfile, tableTag):
[   97s]         """Check XML from decompiled object."""
[   97s]         _skip_if_requirement_missing(testfile)
[   97s]     
[   97s]         xml_expected = read_expected_ttx(testfile, tableTag)
[   97s]     
[   97s]         with open_font(testfile) as font:
[   97s]             xml_from_binary = dump_ttx(font, tableTag)
[   97s]     
[   97s] >       assert xml_expected == xml_from_binary
[   97s] E       assert '<?xml versio...>\n\n</ttFont>\n' == '<?xml version...>\n\n</ttFont>\n'
[   97s] E         Skipping 1899 identical leading characters in diff, use -v to show
[   97s] E         - ow _i="0">1 1 2</row>
[   97s] E         ?            ---
[   97s] E         + ow _i="0">256 256 512</row>
[   97s] E         ?           +++++++++
[   97s] E         -             <row _i="1">0 3 0</row>
[   97s] E         ?                           ^...
[   97s] E         
[   97s] E         ...Full output truncated (63 lines hidden), use '-vv' to show
[   97s] 
[   97s] Tests/ttLib/tables/tables_test.py:297: AssertionError
[   97s] ____________ test_xml_from_binary[graphite/graphite_tests.ttf-Glat] ____________
[   97s] 
[   97s] testfile = 'graphite/graphite_tests.ttf', tableTag = 'Glat'
[   97s] 
[   97s]     def test_xml_from_binary(testfile, tableTag):
[   97s]         """Check XML from decompiled object."""
[   97s]         _skip_if_requirement_missing(testfile)
[   97s]     
[   97s]         xml_expected = read_expected_ttx(testfile, tableTag)
[   97s]     
[   97s]         with open_font(testfile) as font:
[   97s]             xml_from_binary = dump_ttx(font, tableTag)
[   97s]     
[   97s] >       assert xml_expected == xml_from_binary
[   97s] E       assert '<?xml versio...>\n\n</ttFont>\n' == '<?xml version...>\n\n</ttFont>\n'
[   97s] E         Skipping 161 identical leading characters in diff, use -v to show
[   97s] E           def">
[   97s] E         -       <attribute index="1" value="3"/>
[   97s] E         -       <attribute index="2" value="30"/>
[   97s] E               </glyph>
[   97s] E               <glyph name="space">
[   97s] E         -       <attribute index="1" value="3"/>...
[   97s] E         
[   97s] E         ...Full output truncated (19 lines hidden), use '-vv' to show
[   97s] 
[   97s] Tests/ttLib/tables/tables_test.py:297: AssertionError

The same error happens both with python 2.7.15 and with python 3.6.5

@anthrotype
Copy link
Member

is that PowerPC? Interesting.. we don't run tests on that platform.
How can I reproduce this on my local (Debian Linux) machine?

@mcepl
Copy link
Author

mcepl commented Sep 4, 2018

no idea. I am OpenSUSE Python packager, so I get this when building the package on ppc64 machine (see https://build.opensuse.org/package/show/home:mcepl:branches:M17N/python-FontTools although here the bug is already patched against). I can even add s390 machine, but I don't think it is necessary, ppc64 should be enough. Of course, everybody can get OBS account, and yes, it builds even for Debian. https://en.opensuse.org/openSUSE:Build_Service_Debian_builds

Doesn't Debian build farm has ppc64 and s390x machines? At least they seem to be available on https://packages.debian.org/sid/python-numpy

@behdad behdad closed this as completed in 349cd94 Sep 6, 2018
@anthrotype
Copy link
Member

Thanks @behdad!

@mcepl
Copy link
Author

mcepl commented Sep 6, 2018

@behdad perfect, works, except for missing import sys in Lib/fontTools/ttLib/tables/G__l_o_c.py

@anthrotype
Copy link
Member

@mcepl I fixed that on master. I will cut a new release before the end of this week.

@anthrotype anthrotype reopened this Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants