piglit: 8a0cf185ebb56efab3b47f35624f92f35431cca7 (master) Build error on Ubuntu 12.04. This is probably caused by an older version of Mako. [ 0%] Generating tests/util/piglit-dispatch-gen.c, tests/util/piglit-dispatch-gen.h, tests/util/piglit-util-gl-enum-gen.c debug: registry.gl: etree is xml.etree.cElementTree debug: registry.gl: _etree_iterfind wraps ElementTree.iterfind Traceback (most recent call last): File "tests/util/gen_dispatch.py", line 201, in <module> main() File "tests/util/gen_dispatch.py", line 68, in main DispatchCode.emit(args.out_dir, gl_registry) File "tests/util/gen_dispatch.py", line 93, in emit render_template(cls.H_TEMPLATE, out_dir, **context_vars) File "tests/util/gen_dispatch.py", line 127, in render_template template.render_context(ctx) File "/usr/lib/python2.7/dist-packages/mako/template.py", line 325, in render_context **kwargs) File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 692, in _render_context _exec_template(inherit, lclcontext, args=args, kwargs=kwargs) File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 718, in _exec_template callable_(context, *args, **kwargs) File "tests_util_piglit_dispatch_gen_h_mako", line 147, in render_body File "tests_util_piglit_dispatch_gen_h_mako", line 123, in __M_anon_26 NameError: global name 'fake_whitespace' is not defined $ python Python 2.7.3 (default, Feb 27 2014, 19:58:35) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import mako >>> print mako.__version__ 0.5.0 ac1f382db9d3ea5c69870a2bcd62a24bdb81ec5b is the first bad commit commit ac1f382db9d3ea5c69870a2bcd62a24bdb81ec5b Author: Chad Versace <chad.versace@linux.intel.com> Date: Tue Jun 10 17:21:59 2014 -0700 dispatch: Generate piglit-dispatch from Khronos XML Khronos now generates its headers from XML and no longer maintains the old, crufty *.spec files. Piglit should do the same. Otherwise, piglit-dispatch won't be able to pick up new extension functions. As a really really big bonus, after Piglit starts generating its GL dispatch code from gl.xml, it will be a small step to start generating EGL and GLX dispatch from egl.xml and glx.xml. This patch imports 'gl.xml' into a new toplevel "registry" directory, to follow the precedent of libepoxy. This patch follows the precedent of libepoxy by importing "gl.xml" into a new toplevel "registry" directory. I did *not* try to redesign piglit-dispatch in this patch. To the contrary, I attempted to keep the newly generated dispatch code to be as similar as possible as the old generated code. Despite wanting to clean up piglit-dispatch's design, I refrained because "a patch should do one thing, and do it well". I strove to keep separate concerns in separate files. File "registry/gl.py" parses "registry/gl.xml". File "tests/util/gen_dispatch.py" generates code from the that parsed result. This decision kept gen_dispatch.py small and focused. I hope everyone finds the rewritten gen_dispatch.py more maintainable and easy to read. The generated code has changed as following: - It now contains the GLES1 API, because gl.xml contains information on all OpenGL APIs. - The comment block for each function alias set now contains more information. For each function in the set, it now lists the complete set of providers. For example: /* glActiveTexture (GL_VERSION_1_3) (GL_VERSION_ES_CM_1_0) (GL_ES_VERSION_2_0) */ /* glActiveTextureARB (GL_ARB_multitexture) */ extern PFNGLACTIVETEXTUREPROC piglit_dispatch_glActiveTexture; #define glActiveTexture piglit_dispatch_glActiveTexture #define glActiveTextureARB piglit_dispatch_glActiveTexture - Enums are sorted by group then by value. Old dispatch sorted only by value. For example: /* Enum Group MapBufferUsageMask */ #define GL_MAP_READ_BIT 0x0001 #define GL_MAP_READ_BIT_EXT 0x0001 #define GL_MAP_WRITE_BIT 0x0002 #define GL_MAP_WRITE_BIT_EXT 0x0002 ... Tested for regressions with: piglit run -p x11_egl -x glx -x glean Mesa 10.2.1 Intel Ivybridge Fedora 20 v3, for Dylan: - Replace ElementTree with cElementTree, for speed. - Each method $foo in KeyedOrderedSet that returns a generator, rename it to iter${foo} to follow Python2 (not 3) naming conventions. - Python 2.6 lacks OrderedDict, so don't use it. - Remove unused import 'dedent'. - Python 2.6 does not recognize the syntax for set literals, so replace each set literal with a list literal or generator literal. - Replace sys.stderr.write with print(file=sys.stderr). - Remove hand-coded OrderedKeyedSet.copy and instead use copy module. - Prefer the 'lxml' module (it uses libxml2) over Python's builtin 'xml' module. - Replace methods ``def foo(x, y):`` with ``def foo(self, other):``. - Replace lists with generators in methods Command.c_*_param_list. - PEP8: Separate all toplevel items with 2 newlines. - PEP8: Fix minor whitespace issues. - PEP8: Replace some ``== None`` with ``is None``. - Replace None-check for --out-dir with add_argument(..., required=True) - Remove 'prog' assignment when calling ArgumentParser(prog=PROG_NAME). Instead, use default value Signed-off-by: Chad Versace <chad.versace@linux.intel.com> :040000 040000 dc7ef35277173130f18f4610f75aef7d95c0c5bb ddc7619e1394897486f5b70770f1fe7752221763 M cmake :040000 040000 51a6ed8868201852233834917230dc002c4c8247 c75c89ef0bfe600c119095215ac9017ff9e58227 M registry :040000 040000 729349e471132d3ab16cfb3488695d9bdb79a6e8 e7ed030779be12b0f44b2f594d665c64e69b5fbd M tests bisect run success
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.