[Piglit] [Bug 88595] New: gen_shader_precision_tests.py build error with older version of NumPY

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Jan 19 09:58:11 PST 2015


https://bugs.freedesktop.org/show_bug.cgi?id=88595

            Bug ID: 88595
           Summary: gen_shader_precision_tests.py build error with older
                    version of NumPY
           Product: piglit
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Keywords: bisected, regression
          Severity: normal
          Priority: medium
         Component: tests
          Assignee: piglit at lists.freedesktop.org
          Reporter: vlee at freedesktop.org
        QA Contact: piglit at lists.freedesktop.org
                CC: baker.dylan.c at gmail.com, chrisf at ijw.co.nz

piglit: c0c386a584ceec3ca8f3629e5b478a0ec3aea71d (master)

commit 7bc55808ee944457227b7230182d51d82b9909fc introduced a build error with
older versions of NumPy.

commit 7bc55808ee944457227b7230182d51d82b9909fc
Author: Micah Fedke <micah.fedke at collabora.co.uk>
Date:   Wed Nov 19 17:22:00 2014 -0600

    arb_shader_precision: add tests for floating point precision

    Note: A bunch of these currently don't pass on i965.

    Reviewed-by: Dylan Baker <dylanx.c.baker at intel.com>
    Reviewed-by: Chris Forbes <chrisf at ijw.co.nz>


Traceback (most recent call last):
  File "generated_tests/gen_shader_precision_tests.py", line 159, in <module>
    main()
  File "generated_tests/gen_shader_precision_tests.py", line 156, in main
    column_major_values=column_major_values ))
  File "site-packages/mako/template.py", line 452, in render_unicode
    as_unicode=True)
  File "site-packages/mako/runtime.py", line 803, in _render
    **_kwargs_for_callable(callable_, data))
  File "site-packages/mako/runtime.py", line 835, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "site-packages/mako/runtime.py", line 860, in _exec_template
    callable_(context, *args, **kwargs)
  File
"generators/templates/gen_shader_precision_testsgenerated_tests/templates/gen_shader_precision_tests/vs.mako.py",
line 113, in render_body
    __M_writer(unicode(shader_runner_format(
column_major_values(test_vector.arguments[i]))))
  File "generated_tests/gen_shader_precision_tests.py", line 114, in
shader_runner_format
    retval+=' {0}'.format('{0:1.8e}'.format(x))
ValueError: Unknown format code 'e' for object of type 'str'

>>> import numpy
>>> numpy.__version__
'1.4.1'
>>> x = numpy.float32(-1.5)
>>> ' {0}'.format('{0:1.8e}'.format(x))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Unknown format code 'e' for object of type 'str'


This is probably NumPy bug #1675, which was fixed in NumPy 1.6.2. Upgrading
NumPY fixed the build error.

>>> import numpy
>>> numpy.__version__
'1.9.1'
>>> x = numpy.float32(-1.5)
>>> ' {0}'.format('{0:1.8e}'.format(x))
' -1.50000000e+00'

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150119/01c65bc2/attachment.html>


More information about the Piglit mailing list