[Piglit] [PATCH] framework: Fix 'module' object has no attribute 'XMLSyntaxError'.

2014-12-17 Thread Jose Fonseca
From: José Fonseca jfons...@vmware.com

etree.XMLSyntaxError is only available with lxml.  etree.ParseError is
available everywhere.  For lxml, etree.XMLSyntaxError is a subclass of
etree.ParseError.
---
 framework/backends/junit.py   | 2 +-
 framework/tests/backends_tests.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/backends/junit.py b/framework/backends/junit.py
index de8fd71..10e52ec 100644
--- a/framework/backends/junit.py
+++ b/framework/backends/junit.py
@@ -87,7 +87,7 @@ class JUnitBackend(FileBackend):
 # failed transaction and ignore it.
 try:
 piglit.append(etree.parse(f).getroot())
-except etree.XMLSyntaxError:
+except etree.ParseError:
 continue
 
 # set the test count by counting the number of tests.
diff --git a/framework/tests/backends_tests.py 
b/framework/tests/backends_tests.py
index 9050c38..b8d88e3 100644
--- a/framework/tests/backends_tests.py
+++ b/framework/tests/backends_tests.py
@@ -268,5 +268,5 @@ def test_junit_skips_bad_tests():
 
 try:
 test.finalize()
-except etree.XMLSyntaxError as e:
+except etree.ParseError as e:
 raise AssertionError(e)
-- 
2.1.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] cl-api-create-image: Fix memory leak.

2014-12-17 Thread Jan Vesely
On Tue, 2014-12-16 at 22:20 -0800, Vinson Lee wrote:
 Fix Coverity resource leak defect.
 
 Signed-off-by: Vinson Lee v...@freedesktop.org

Reviewed-by: Jan Vesely jan.ves...@rutgers.edu

 ---
  tests/cl/api/create-image.c | 3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/tests/cl/api/create-image.c b/tests/cl/api/create-image.c
 index 46a98dd..a1e143b 100644
 --- a/tests/cl/api/create-image.c
 +++ b/tests/cl/api/create-image.c
 @@ -44,8 +44,11 @@ static bool context_has_image_support(const 
 piglit_cl_context ctx)
   piglit_cl_get_device_info(ctx-device_ids[i],
   CL_DEVICE_IMAGE_SUPPORT);
   if (*image_support) {
 + free(image_support);
   return true;
   }
 +
 + free(image_support);
   }
   return false;
  }

-- 
Jan Vesely jan.ves...@rutgers.edu


signature.asc
Description: This is a digitally signed message part
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] cl-api-get-platform-ids: Fix possible use after free.

2014-12-17 Thread Jan Vesely
On Tue, 2014-12-16 at 22:27 -0800, Vinson Lee wrote:
 Fixes Use after free defect reported by Coverity.
 
 Signed-off-by: Vinson Lee v...@freedesktop.org
 ---
  tests/cl/api/get-platform-ids.c | 1 +
  1 file changed, 1 insertion(+)
 
 diff --git a/tests/cl/api/get-platform-ids.c b/tests/cl/api/get-platform-ids.c
 index 6cc734a..ab3e4cd 100644
 --- a/tests/cl/api/get-platform-ids.c
 +++ b/tests/cl/api/get-platform-ids.c
 @@ -80,6 +80,7 @@ piglit_cl_test(const int argc,
   piglit_merge_result(result, PIGLIT_FAIL);
   }
   free(platforms);
 + platforms = NULL;

The next test relies on the fact that platforms is not NULL. Maybe we
can use something like (void*)-1 instead of freed pointer.


   }
   }
   

-- 
Jan Vesely jan.ves...@rutgers.edu


signature.asc
Description: This is a digitally signed message part
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] util-cl: Fix non-portable sizeof.

2014-12-17 Thread Jan Vesely
On Tue, 2014-12-16 at 22:47 -0800, Vinson Lee wrote:
 Fix Coverity sizeof not portable defect.
 
 Signed-off-by: Vinson Lee v...@freedesktop.org

Reviewed-by: Jan Vesely jan.ves...@rutgers.edu

 ---
  tests/util/piglit-framework-cl-program.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/tests/util/piglit-framework-cl-program.c 
 b/tests/util/piglit-framework-cl-program.c
 index d335486..f94525b 100644
 --- a/tests/util/piglit-framework-cl-program.c
 +++ b/tests/util/piglit-framework-cl-program.c
 @@ -287,7 +287,7 @@ piglit_cl_program_test_run(const int argc,
   } else if(config-program_binary_file != NULL) {
   unsigned int length;
   size_t* lengths = malloc(sizeof(size_t) * 
 env.context-num_devices);
 - unsigned char** program_binaries = malloc(sizeof(unsigned 
 char**) * env.context-num_devices);
 + unsigned char** program_binaries = malloc(sizeof(unsigned 
 char*) * env.context-num_devices);
  
   ((char**)program_binaries)[0] =
   piglit_load_text_file(config-program_binary_file, 
 length);

-- 
Jan Vesely jan.ves...@rutgers.edu


signature.asc
Description: This is a digitally signed message part
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] arb_sample_shading-builtin-gl-num-samples: Use const reference.

2014-12-17 Thread Brian Paul

On 12/16/2014 11:07 PM, Vinson Lee wrote:

Fix Coverity big parameter passed by value defect.

Signed-off-by: Vinson Lee v...@freedesktop.org
---
  tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp 
b/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
index 620c12e..08bbea9 100644
--- a/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
+++ b/tests/spec/arb_sample_shading/execution/builtin-gl-num-samples.cpp
@@ -118,7 +118,7 @@ piglit_init(int argc, char **argv)
}
  }

-bool test_builtin_num_samples(Fbo ms_fbo)
+bool test_builtin_num_samples(const Fbo ms_fbo)
  {
GLint samples;
  GLfloat expected[4] = {0.0, 1.0, 0.0, 1.0};



For both arb_sample_shading patches,
Reviewed-by: Brian Paul bri...@vmware.com

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] tests/all.py: use list for asmparsertest command line arguments

2014-12-17 Thread Brian Paul
Instead of passing a string like asmparsertest ARBfp1.0 path/to/mad.txt,
now pass a list like [asmparsertest, ARBfp1.0, path/to/mad.txt].

This fixes the asmparsertest tests on Cygwin.  Before, all the tests
were failing because the backslash characters in the path were getting
removed.
---
 tests/all.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index fe623b8..e518222 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -3738,8 +3738,8 @@ add_plain_test(fast_color_clear, 
'fcc-read-to-pbo-after-clear')
 asmparsertest = {}
 def add_asmparsertest(group, shader):
 asmparsertest[group + '/' + shader] = PiglitGLTest(
-'asmparsertest ' + group + ' ' +
-os.path.join(testsDir, 'asmparsertest', 'shaders', group, shader),
+['asmparsertest', group,
+ os.path.join(testsDir, 'asmparsertest', 'shaders', group, shader)],
 run_concurrent=True)
 
 add_asmparsertest('ARBfp1.0', 'abs-01.txt')
-- 
1.9.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH piglit 3/3] texsubimage: Update the textures with different values

2014-12-17 Thread Neil Roberts
Previously the test was updating sub regions of the test texture with
the same values that were already in the texture. Therefore an
implementation that does nothing on glTexSubImage2D would pass which
doesn't seem very useful. This patch makes it create two reference
images with different values. At each update the entire texture is
recreated with the values from the first image and then a sub region
is updated with the values from the second image. The values are then
compared as before via glReadPixels but at each texel it decides
whether to compare with the first or second image depending on whether
the texel is in the updated region.
---
 tests/texturing/texsubimage.c | 197 +++---
 1 file changed, 145 insertions(+), 52 deletions(-)

diff --git a/tests/texturing/texsubimage.c b/tests/texturing/texsubimage.c
index e091fd1..d2aab25 100644
--- a/tests/texturing/texsubimage.c
+++ b/tests/texturing/texsubimage.c
@@ -141,14 +141,51 @@ piglit_draw_rect_tex3d(float x, float y, float w, float h,
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
 }
 
-
 static GLboolean
-equal_images(const GLubyte *img1, const GLubyte *img2,
- GLuint w, GLuint h, GLuint d)
+equal_images(GLenum target,
+const GLubyte *original_ref,
+const GLubyte *updated_ref,
+const GLubyte *testImg,
+GLuint w, GLuint h, GLuint d,
+GLuint tx, GLuint ty, GLuint tz,
+GLuint tw, GLuint th, GLuint td)
 {
-   return memcmp(img1, img2, w*h*d*4) == 0;
-}
+   const GLubyte *ref;
+   GLuint z, y, x;
+
+   switch (target) {
+   case GL_TEXTURE_1D:
+   ty = 0;
+   th = 1;
+   /* flow through */
+   case GL_TEXTURE_2D:
+   tz = 0;
+   td = 1;
+   break;
+   }
 
+   for (z = 0; z  d; z++) {
+   for (y = 0; y  h; y++) {
+   for (x = 0; x  w; x++) {
+   if (x = tx  x  tx + tw 
+   y = ty  y  ty + th 
+   z = tz  z  tz + td)
+   ref = updated_ref;
+   else
+   ref = original_ref;
+
+   if (memcmp(ref, testImg, 4))
+   return GL_FALSE;
+
+   testImg += 4;
+   original_ref += 4;
+   updated_ref += 4;
+   }
+   }
+   }
+
+   return GL_TRUE;
+}
 
 /**
  * Get block size for compressed format.
@@ -214,14 +251,55 @@ draw_and_read_texture(GLuint w, GLuint h, GLuint d, 
GLubyte *ref)
glReadPixels(0, 0, w, h * d, GL_RGBA, GL_UNSIGNED_BYTE, ref);
 }
 
+static GLuint
+create_texture(GLenum target,
+  GLenum intFormat,
+  GLsizei w, GLsizei h, GLsizei d,
+  GLenum srcFormat,
+  const GLubyte *img)
+{
+   GLuint tex;
+
+   glPixelStorei(GL_UNPACK_ROW_LENGTH, w);
+   glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, h);
+
+   glGenTextures(1, tex);
+   glBindTexture(target, tex);
+   glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+   glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+   glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0);
+   glPixelStorei(GL_UNPACK_SKIP_ROWS, 0);
+   glPixelStorei(GL_UNPACK_SKIP_IMAGES, 0);
+   if (target == GL_TEXTURE_1D) {
+   glTexImage1D(target, 0, intFormat, w, 0,
+srcFormat, GL_UNSIGNED_BYTE, img);
+   }
+   else if (target == GL_TEXTURE_2D) {
+   glTexImage2D(target, 0, intFormat, w, h, 0,
+srcFormat, GL_UNSIGNED_BYTE, img);
+   }
+   else if (target == GL_TEXTURE_3D) {
+   glTexImage3D(target, 0, intFormat, w, h, d, 0,
+srcFormat, GL_UNSIGNED_BYTE, img);
+   }
+
+   return tex;
+}
+
 /**
- * Create a texture image with reference values.  Draw a textured quad.
- * Save reference image with glReadPixels().
+ * Create two textures with different reference values. Draw both of
+ * the textures to the framebuffer and save the reference images with
+ * glReadPixels.
+ *
  * Loop:
- *replace a sub-region of the texture image with same values
- *draw test textured quad
- *read test image with glReadPixels
- *compare reference image to test image
+ *  - Create another texture with the same initial values as the first
+ *texture
+ *  - replace a random sub-region of the texture image with values from
+ *the 2nd texture
+ *  - draw the texture to the framebuffer and read back with glReadPixels
+ *  - compare reference images to test image choosing either the first
+ *or second reference image for each pixel depending on whether it
+ *is within 

[Piglit] [PATCH piglit 2/3] texsubimage: Render all of the images of a 3D texture

2014-12-17 Thread Neil Roberts
Previously when testing a 3D texture the test would just draw a single
image with the width and height of the texture and the z coordinates
set to span across the depth. This wouldn't end up drawing all of the
texels in the texture so instead it will now render all of the images
in a vertical line. In order to do this the test needs a taller window
than the default 160 pixels.
---
 tests/texturing/texsubimage.c | 35 ---
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/tests/texturing/texsubimage.c b/tests/texturing/texsubimage.c
index 0388da6..e091fd1 100644
--- a/tests/texturing/texsubimage.c
+++ b/tests/texturing/texsubimage.c
@@ -41,6 +41,9 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
 
config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
 
+   config.window_width = 512;
+   config.window_height = 512;
+
 PIGLIT_GL_TEST_CONFIG_END
 
 /**
@@ -141,9 +144,9 @@ piglit_draw_rect_tex3d(float x, float y, float w, float h,
 
 static GLboolean
 equal_images(const GLubyte *img1, const GLubyte *img2,
- GLuint w, GLuint h)
+ GLuint w, GLuint h, GLuint d)
 {
-   return memcmp(img1, img2, w*h*4) == 0;
+   return memcmp(img1, img2, w*h*d*4) == 0;
 }
 
 
@@ -190,6 +193,26 @@ get_format_block_size(GLenum format, GLuint *bw, GLuint 
*bh)
}
 }
 
+/**
+ * Draw each image of the texture to the framebuffer and then save the
+ * entire thing to a buffer with glReadPixels().
+ */
+static void
+draw_and_read_texture(GLuint w, GLuint h, GLuint d, GLubyte *ref)
+{
+   int i;
+
+   for (i = 0; i  d; i++) {
+   float tz = (i + 0.5f) / d;
+   piglit_draw_rect_tex3d(0, i * h, /* x/y */
+  w, h,
+  0.0, 0.0, /* tx/ty */
+  1.0, 1.0, /* tw/th */
+  tz, tz /* tz0/tz1 */);
+   }
+
+   glReadPixels(0, 0, w, h * d, GL_RGBA, GL_UNSIGNED_BYTE, ref);
+}
 
 /**
  * Create a texture image with reference values.  Draw a textured quad.
@@ -267,8 +290,7 @@ test_format(GLenum target, GLenum intFormat)
 
/* draw reference image */
glClear(GL_COLOR_BUFFER_BIT);
-   piglit_draw_rect_tex3d(0, 0, w, h, 0.0, 0.0, 1.0, 1.0, 0.0, 1.0);
-   glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, ref);
+   draw_and_read_texture(w, h, d, ref);
 
for (t = 0; t  10; t++) {
/* Choose random region of texture to update.
@@ -305,12 +327,11 @@ test_format(GLenum target, GLenum intFormat)
 
/* draw test image */
glClear(GL_COLOR_BUFFER_BIT);
-   piglit_draw_rect_tex3d(0, 0, w, h, 0.0, 0.0, 1.0, 1.0, 0.0, 
1.0);
-   glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, testImg);
+   draw_and_read_texture(w, h, d, testImg);
 
piglit_present_results();
 
-   if (!equal_images(ref, testImg, w, h)) {
+   if (!equal_images(ref, testImg, w, h, d)) {
printf(texsubimage failed\n);
printf(  target: %s\n, 
piglit_get_gl_enum_name(target));
printf(  internal format: %s\n, 
piglit_get_gl_enum_name(intFormat));
-- 
1.9.3

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] tests/all.py: use list for built-in-constants command line arguments

2014-12-17 Thread Brian Paul
As with the previous patch, fixes patch corruption on Cygwin.
---
 tests/all.py | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index 2ffb920..ba26ebd 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1030,7 +1030,7 @@ spec['glsl-es-1.00']['execution'] = {}
 add_shader_test_dir(spec['glsl-es-1.00']['execution'],
 os.path.join(testsDir, 'spec', 'glsl-es-1.00', 
'execution'),
 recursive=True)
-spec['glsl-es-1.00']['built-in constants'] = 
PiglitGLTest('built-in-constants_gles2 ' + os.path.join(testsDir, 
'spec/glsl-es-1.00/minimum-maximums.txt'), run_concurrent=True)
+spec['glsl-es-1.00']['built-in constants'] = 
PiglitGLTest(['built-in-constants_gles2', os.path.join(testsDir, 
'spec/glsl-es-1.00/minimum-maximums.txt')], run_concurrent=True)
 
 # Group spec/glsl-1.10
 spec['glsl-1.10'] = {}
@@ -1059,7 +1059,7 @@ for type in ['int', 'uint', 'float', 'vec2', 'vec3', 
'vec4', 'ivec2', 'ivec3',
 cmdline = 'simple {0} {1}'.format(type, arrayspec)
 spec['glsl-1.10']['execution']['varying-packing'][cmdline] = \
 PiglitGLTest('varying-packing-' + cmdline, run_concurrent=True)
-spec['glsl-1.10']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.10/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.10']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.10/minimum-maximums.txt')], 
run_concurrent=True)
 
 spec['glsl-1.10']['api'] = {}
 add_concurrent_test(spec['glsl-1.10']['api'], 'getactiveattrib 110');
@@ -1109,7 +1109,7 @@ add_recursion_test(rec, 'indirect-separate')
 add_recursion_test(rec, 'indirect-complex')
 add_recursion_test(rec, 'indirect-complex-separate')
 
-spec['glsl-1.20']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.20/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.20']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.20/minimum-maximums.txt')], 
run_concurrent=True)
 spec['glsl-1.20']['api'] = {}
 add_concurrent_test(spec['glsl-1.20']['api'], 'getactiveattrib 120');
 
@@ -1218,7 +1218,7 @@ add_concurrent_test(spec['glsl-1.30']['execution'], 
'vertexid-drawarrays')
 add_concurrent_test(spec['glsl-1.30']['execution'], 'vertexid-drawelements')
 add_concurrent_test(spec['glsl-1.30']['execution'], 'fs-execution-ordering')
 
-spec['glsl-1.30']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.30/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.30']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.30/minimum-maximums.txt')], 
run_concurrent=True)
 spec['glsl-1.30']['api'] = {}
 add_concurrent_test(spec['glsl-1.30']['api'], 'getactiveattrib 130');
 
@@ -1403,7 +1403,7 @@ add_shader_test_dir(spec['glsl-1.40'],
 os.path.join(testsDir, 'spec', 'glsl-1.40'),
 recursive=True)
 spec['glsl-1.40']['execution']['tf-no-position'] = 
PiglitGLTest('glsl-1.40-tf-no-position', run_concurrent=True)
-spec['glsl-1.40']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.40/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.40']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.40/minimum-maximums.txt')], 
run_concurrent=True)
 
 textureSize_samplers_140 = textureSize_samplers_130 + ['sampler2DRect', 
'isampler2DRect', 'sampler2DRectShadow', 'samplerBuffer', 'isamplerBuffer', 
'usamplerBuffer']
 for stage in ['vs', 'gs', 'fs']:
@@ -1445,7 +1445,7 @@ for draw in ['', 'indexed']:
 add_concurrent_test(spec['glsl-1.50'],
 ('arb_geometry_shader4-ignore-adjacent-vertices '
  'core {0} {1}').format(draw, prim))
-spec['glsl-1.50']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.50/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.50']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.50/minimum-maximums.txt')], 
run_concurrent=True)
 spec['glsl-1.50']['gs-emits-too-few-verts'] = 
PiglitGLTest('glsl-1.50-gs-emits-too-few-verts', run_concurrent=True)
 spec['glsl-1.50']['gs-end-primitive-optional-with-points-out'] = 
PiglitGLTest('glsl-1.50-geometry-end-primitive-optional-with-points-out', 
run_concurrent=True)
 spec['glsl-1.50']['getshaderiv-may-return-GS'] = 
PiglitGLTest('glsl-1.50-getshaderiv-may-return-GS', run_concurrent=True)
@@ -1507,7 +1507,7 @@ for output_layout in ['points', 'lines', 
'lines_adjacency', 'triangles',
 output_layout))
 
 spec['glsl-3.30'] = {}
-spec['glsl-3.30']['built-in constants'] = PiglitGLTest('built-in-constants ' + 

[Piglit] [PATCH] tests/all.py: use list for vpfp-generic command line arguments

2014-12-17 Thread Brian Paul
As with the previous patch, fixes patch corruption on Cygwin.
---
 tests/all.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index e518222..2ffb920 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -501,8 +501,8 @@ for subtest in ('interstage', 'intrastage', 'vs-gs'):
 shaders[cmdline] = PiglitGLTest(cmdline, run_concurrent=True)
 
 def add_vpfpgeneric(group, name):
-group[name] = PiglitGLTest('vpfp-generic ' +
-os.path.join(testsDir, 'shaders', 'generic', name + '.vpfp'),
+group[name] = PiglitGLTest(['vpfp-generic',
+os.path.join(testsDir, 'shaders', 'generic', name + '.vpfp')],
 run_concurrent=True)
 
 glx = {}
-- 
1.9.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] framework: Fix 'module' object has no attribute 'XMLSyntaxError'.

2014-12-17 Thread Dylan Baker
With one very minor nit,
Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com

On Wednesday, December 17, 2014 11:05:29 AM Jose Fonseca wrote:
 From: José Fonseca jfons...@vmware.com
 
 etree.XMLSyntaxError is only available with lxml.  etree.ParseError is
 available everywhere.  For lxml, etree.XMLSyntaxError is a subclass of
 etree.ParseError.

Actually, lxml.etree.ParseError is a subclass of
lxml.etree.XMLSyntaxError.

 ---
  framework/backends/junit.py   | 2 +-
  framework/tests/backends_tests.py | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/framework/backends/junit.py b/framework/backends/junit.py
 index de8fd71..10e52ec 100644
 --- a/framework/backends/junit.py
 +++ b/framework/backends/junit.py
 @@ -87,7 +87,7 @@ class JUnitBackend(FileBackend):
  # failed transaction and ignore it.
  try:
  piglit.append(etree.parse(f).getroot())
 -except etree.XMLSyntaxError:
 +except etree.ParseError:
  continue
  
  # set the test count by counting the number of tests.
 diff --git a/framework/tests/backends_tests.py 
 b/framework/tests/backends_tests.py
 index 9050c38..b8d88e3 100644
 --- a/framework/tests/backends_tests.py
 +++ b/framework/tests/backends_tests.py
 @@ -268,5 +268,5 @@ def test_junit_skips_bad_tests():
  
  try:
  test.finalize()
 -except etree.XMLSyntaxError as e:
 +except etree.ParseError as e:
  raise AssertionError(e)
 -- 
 2.1.0
 
 ___
 Piglit mailing list
 Piglit@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/piglit
 


signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] tests/all.py: use list for asmparsertest command line arguments

2014-12-17 Thread Dylan Baker
LGTM,
Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com

On Wednesday, December 17, 2014 10:24:38 AM Brian Paul wrote:
 Instead of passing a string like asmparsertest ARBfp1.0 path/to/mad.txt,
 now pass a list like [asmparsertest, ARBfp1.0, path/to/mad.txt].
 
 This fixes the asmparsertest tests on Cygwin.  Before, all the tests
 were failing because the backslash characters in the path were getting
 removed.
 ---
  tests/all.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/tests/all.py b/tests/all.py
 index fe623b8..e518222 100644
 --- a/tests/all.py
 +++ b/tests/all.py
 @@ -3738,8 +3738,8 @@ add_plain_test(fast_color_clear, 
 'fcc-read-to-pbo-after-clear')
  asmparsertest = {}
  def add_asmparsertest(group, shader):
  asmparsertest[group + '/' + shader] = PiglitGLTest(
 -'asmparsertest ' + group + ' ' +
 -os.path.join(testsDir, 'asmparsertest', 'shaders', group, shader),
 +['asmparsertest', group,
 + os.path.join(testsDir, 'asmparsertest', 'shaders', group, shader)],
  run_concurrent=True)
  
  add_asmparsertest('ARBfp1.0', 'abs-01.txt')
 -- 
 1.9.1
 
 ___
 Piglit mailing list
 Piglit@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/piglit
 


signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] tests/all.py: use list for vpfp-generic command line arguments

2014-12-17 Thread Dylan Baker
Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com

On Wednesday, December 17, 2014 10:46:27 AM Brian Paul wrote:
 As with the previous patch, fixes patch corruption on Cygwin.
 ---
  tests/all.py | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/tests/all.py b/tests/all.py
 index e518222..2ffb920 100644
 --- a/tests/all.py
 +++ b/tests/all.py
 @@ -501,8 +501,8 @@ for subtest in ('interstage', 'intrastage', 'vs-gs'):
  shaders[cmdline] = PiglitGLTest(cmdline, run_concurrent=True)
  
  def add_vpfpgeneric(group, name):
 -group[name] = PiglitGLTest('vpfp-generic ' +
 -os.path.join(testsDir, 'shaders', 'generic', name + '.vpfp'),
 +group[name] = PiglitGLTest(['vpfp-generic',
 +os.path.join(testsDir, 'shaders', 'generic', name + '.vpfp')],
  run_concurrent=True)
  
  glx = {}
 -- 
 1.9.1
 
 ___
 Piglit mailing list
 Piglit@lists.freedesktop.org
 http://lists.freedesktop.org/mailman/listinfo/piglit
 


signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] tests/all.py: use list for built-in-constants command line arguments

2014-12-17 Thread Dylan Baker
Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com

On Wednesday, December 17, 2014 10:46:38 AM Brian Paul wrote:
 As with the previous patch, fixes patch corruption on Cygwin.
 ---
  tests/all.py | 20 ++--
  1 file changed, 10 insertions(+), 10 deletions(-)
 
 diff --git a/tests/all.py b/tests/all.py
 index 2ffb920..ba26ebd 100644
 --- a/tests/all.py
 +++ b/tests/all.py
 @@ -1030,7 +1030,7 @@ spec['glsl-es-1.00']['execution'] = {}
  add_shader_test_dir(spec['glsl-es-1.00']['execution'],
  os.path.join(testsDir, 'spec', 'glsl-es-1.00', 
 'execution'),
  recursive=True)
 -spec['glsl-es-1.00']['built-in constants'] = 
 PiglitGLTest('built-in-constants_gles2 ' + os.path.join(testsDir, 
 'spec/glsl-es-1.00/minimum-maximums.txt'), run_concurrent=True)
 +spec['glsl-es-1.00']['built-in constants'] = 
 PiglitGLTest(['built-in-constants_gles2', os.path.join(testsDir, 
 'spec/glsl-es-1.00/minimum-maximums.txt')], run_concurrent=True)
  
  # Group spec/glsl-1.10
  spec['glsl-1.10'] = {}
 @@ -1059,7 +1059,7 @@ for type in ['int', 'uint', 'float', 'vec2', 'vec3', 
 'vec4', 'ivec2', 'ivec3',
  cmdline = 'simple {0} {1}'.format(type, arrayspec)
  spec['glsl-1.10']['execution']['varying-packing'][cmdline] = \
  PiglitGLTest('varying-packing-' + cmdline, run_concurrent=True)
 -spec['glsl-1.10']['built-in constants'] = PiglitGLTest('built-in-constants ' 
 + os.path.join(testsDir, 'spec/glsl-1.10/minimum-maximums.txt'), 
 run_concurrent=True)
 +spec['glsl-1.10']['built-in constants'] = 
 PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
 'spec/glsl-1.10/minimum-maximums.txt')], run_concurrent=True)
  
  spec['glsl-1.10']['api'] = {}
  add_concurrent_test(spec['glsl-1.10']['api'], 'getactiveattrib 110');
 @@ -1109,7 +1109,7 @@ add_recursion_test(rec, 'indirect-separate')
  add_recursion_test(rec, 'indirect-complex')
  add_recursion_test(rec, 'indirect-complex-separate')
  
 -spec['glsl-1.20']['built-in constants'] = PiglitGLTest('built-in-constants ' 
 + os.path.join(testsDir, 'spec/glsl-1.20/minimum-maximums.txt'), 
 run_concurrent=True)
 +spec['glsl-1.20']['built-in constants'] = 
 PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
 'spec/glsl-1.20/minimum-maximums.txt')], run_concurrent=True)
  spec['glsl-1.20']['api'] = {}
  add_concurrent_test(spec['glsl-1.20']['api'], 'getactiveattrib 120');
  
 @@ -1218,7 +1218,7 @@ add_concurrent_test(spec['glsl-1.30']['execution'], 
 'vertexid-drawarrays')
  add_concurrent_test(spec['glsl-1.30']['execution'], 'vertexid-drawelements')
  add_concurrent_test(spec['glsl-1.30']['execution'], 'fs-execution-ordering')
  
 -spec['glsl-1.30']['built-in constants'] = PiglitGLTest('built-in-constants ' 
 + os.path.join(testsDir, 'spec/glsl-1.30/minimum-maximums.txt'), 
 run_concurrent=True)
 +spec['glsl-1.30']['built-in constants'] = 
 PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
 'spec/glsl-1.30/minimum-maximums.txt')], run_concurrent=True)
  spec['glsl-1.30']['api'] = {}
  add_concurrent_test(spec['glsl-1.30']['api'], 'getactiveattrib 130');
  
 @@ -1403,7 +1403,7 @@ add_shader_test_dir(spec['glsl-1.40'],
  os.path.join(testsDir, 'spec', 'glsl-1.40'),
  recursive=True)
  spec['glsl-1.40']['execution']['tf-no-position'] = 
 PiglitGLTest('glsl-1.40-tf-no-position', run_concurrent=True)
 -spec['glsl-1.40']['built-in constants'] = PiglitGLTest('built-in-constants ' 
 + os.path.join(testsDir, 'spec/glsl-1.40/minimum-maximums.txt'), 
 run_concurrent=True)
 +spec['glsl-1.40']['built-in constants'] = 
 PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
 'spec/glsl-1.40/minimum-maximums.txt')], run_concurrent=True)
  
  textureSize_samplers_140 = textureSize_samplers_130 + ['sampler2DRect', 
 'isampler2DRect', 'sampler2DRectShadow', 'samplerBuffer', 'isamplerBuffer', 
 'usamplerBuffer']
  for stage in ['vs', 'gs', 'fs']:
 @@ -1445,7 +1445,7 @@ for draw in ['', 'indexed']:
  add_concurrent_test(spec['glsl-1.50'],
  ('arb_geometry_shader4-ignore-adjacent-vertices '
   'core {0} {1}').format(draw, prim))
 -spec['glsl-1.50']['built-in constants'] = PiglitGLTest('built-in-constants ' 
 + os.path.join(testsDir, 'spec/glsl-1.50/minimum-maximums.txt'), 
 run_concurrent=True)
 +spec['glsl-1.50']['built-in constants'] = 
 PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
 'spec/glsl-1.50/minimum-maximums.txt')], run_concurrent=True)
  spec['glsl-1.50']['gs-emits-too-few-verts'] = 
 PiglitGLTest('glsl-1.50-gs-emits-too-few-verts', run_concurrent=True)
  spec['glsl-1.50']['gs-end-primitive-optional-with-points-out'] = 
 PiglitGLTest('glsl-1.50-geometry-end-primitive-optional-with-points-out', 
 run_concurrent=True)
  spec['glsl-1.50']['getshaderiv-may-return-GS'] = 
 PiglitGLTest('glsl-1.50-getshaderiv-may-return-GS', run_concurrent=True)
 @@ -1507,7 +1507,7 @@ for 

Re: [Piglit] [PATCH] tests/all.py: use list for built-in-constants command line arguments

2014-12-17 Thread Brian Paul
Thanks.  BTW, could enforce this in the PiglitGLTest() initializer? 
That is, make sure the command is a list?


I'd like to try to avoid this problem in the future.

-Brian

PS: I fixed the patch/path typo in the commit messages.


On 12/17/2014 10:54 AM, Dylan Baker wrote:

Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com

On Wednesday, December 17, 2014 10:46:38 AM Brian Paul wrote:

As with the previous patch, fixes patch corruption on Cygwin.
---
  tests/all.py | 20 ++--
  1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index 2ffb920..ba26ebd 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -1030,7 +1030,7 @@ spec['glsl-es-1.00']['execution'] = {}
  add_shader_test_dir(spec['glsl-es-1.00']['execution'],
  os.path.join(testsDir, 'spec', 'glsl-es-1.00', 
'execution'),
  recursive=True)
-spec['glsl-es-1.00']['built-in constants'] = 
PiglitGLTest('built-in-constants_gles2 ' + os.path.join(testsDir, 
'spec/glsl-es-1.00/minimum-maximums.txt'), run_concurrent=True)
+spec['glsl-es-1.00']['built-in constants'] = 
PiglitGLTest(['built-in-constants_gles2', os.path.join(testsDir, 
'spec/glsl-es-1.00/minimum-maximums.txt')], run_concurrent=True)

  # Group spec/glsl-1.10
  spec['glsl-1.10'] = {}
@@ -1059,7 +1059,7 @@ for type in ['int', 'uint', 'float', 'vec2', 'vec3', 
'vec4', 'ivec2', 'ivec3',
  cmdline = 'simple {0} {1}'.format(type, arrayspec)
  spec['glsl-1.10']['execution']['varying-packing'][cmdline] = \
  PiglitGLTest('varying-packing-' + cmdline, run_concurrent=True)
-spec['glsl-1.10']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.10/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.10']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.10/minimum-maximums.txt')], 
run_concurrent=True)

  spec['glsl-1.10']['api'] = {}
  add_concurrent_test(spec['glsl-1.10']['api'], 'getactiveattrib 110');
@@ -1109,7 +1109,7 @@ add_recursion_test(rec, 'indirect-separate')
  add_recursion_test(rec, 'indirect-complex')
  add_recursion_test(rec, 'indirect-complex-separate')

-spec['glsl-1.20']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.20/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.20']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.20/minimum-maximums.txt')], 
run_concurrent=True)
  spec['glsl-1.20']['api'] = {}
  add_concurrent_test(spec['glsl-1.20']['api'], 'getactiveattrib 120');

@@ -1218,7 +1218,7 @@ add_concurrent_test(spec['glsl-1.30']['execution'], 
'vertexid-drawarrays')
  add_concurrent_test(spec['glsl-1.30']['execution'], 'vertexid-drawelements')
  add_concurrent_test(spec['glsl-1.30']['execution'], 'fs-execution-ordering')

-spec['glsl-1.30']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.30/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.30']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.30/minimum-maximums.txt')], 
run_concurrent=True)
  spec['glsl-1.30']['api'] = {}
  add_concurrent_test(spec['glsl-1.30']['api'], 'getactiveattrib 130');

@@ -1403,7 +1403,7 @@ add_shader_test_dir(spec['glsl-1.40'],
  os.path.join(testsDir, 'spec', 'glsl-1.40'),
  recursive=True)
  spec['glsl-1.40']['execution']['tf-no-position'] = 
PiglitGLTest('glsl-1.40-tf-no-position', run_concurrent=True)
-spec['glsl-1.40']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.40/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.40']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.40/minimum-maximums.txt')], 
run_concurrent=True)

  textureSize_samplers_140 = textureSize_samplers_130 + ['sampler2DRect', 
'isampler2DRect', 'sampler2DRectShadow', 'samplerBuffer', 'isamplerBuffer', 
'usamplerBuffer']
  for stage in ['vs', 'gs', 'fs']:
@@ -1445,7 +1445,7 @@ for draw in ['', 'indexed']:
  add_concurrent_test(spec['glsl-1.50'],
  ('arb_geometry_shader4-ignore-adjacent-vertices '
   'core {0} {1}').format(draw, prim))
-spec['glsl-1.50']['built-in constants'] = PiglitGLTest('built-in-constants ' + 
os.path.join(testsDir, 'spec/glsl-1.50/minimum-maximums.txt'), 
run_concurrent=True)
+spec['glsl-1.50']['built-in constants'] = PiglitGLTest(['built-in-constants', 
os.path.join(testsDir, 'spec/glsl-1.50/minimum-maximums.txt')], 
run_concurrent=True)
  spec['glsl-1.50']['gs-emits-too-few-verts'] = 
PiglitGLTest('glsl-1.50-gs-emits-too-few-verts', run_concurrent=True)
  spec['glsl-1.50']['gs-end-primitive-optional-with-points-out'] = 

Re: [Piglit] [PATCH] framework: Fix 'module' object has no attribute 'XMLSyntaxError'.

2014-12-17 Thread Jose Fonseca

On 17/12/14 17:49, Dylan Baker wrote:

With one very minor nit,
Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com


Thanks for the review.


On Wednesday, December 17, 2014 11:05:29 AM Jose Fonseca wrote:

From: José Fonseca jfons...@vmware.com

etree.XMLSyntaxError is only available with lxml.  etree.ParseError is
available everywhere.  For lxml, etree.XMLSyntaxError is a subclass of
etree.ParseError.


Actually, lxml.etree.ParseError is a subclass of
lxml.etree.XMLSyntaxError.


Really? Odd, `pydoc lxml.etree` shows otherwise:

$  pydoc lxml.etree
[...]
CLASSES
[...]
exceptions.Exception(exceptions.BaseException)
Error
LxmlError
C14NError
DTDError
DTDParseError
DTDValidateError
DocumentInvalid
LxmlRegistryError
NamespaceRegistryError
LxmlSyntaxError(LxmlError, exceptions.SyntaxError)
ParseError
XMLSyntaxError


Jose
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] framework: Fix 'module' object has no attribute 'XMLSyntaxError'.

2014-12-17 Thread Jose Fonseca

On 17/12/14 18:45, Jose Fonseca wrote:

On 17/12/14 17:49, Dylan Baker wrote:

With one very minor nit,
Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com


Thanks for the review.


On Wednesday, December 17, 2014 11:05:29 AM Jose Fonseca wrote:

From: José Fonseca jfons...@vmware.com

etree.XMLSyntaxError is only available with lxml.  etree.ParseError is
available everywhere.  For lxml, etree.XMLSyntaxError is a subclass of
etree.ParseError.


Actually, lxml.etree.ParseError is a subclass of
lxml.etree.XMLSyntaxError.


Really? Odd, `pydoc lxml.etree` shows otherwise:

$  pydoc lxml.etree
[...]
CLASSES
[...]
 exceptions.Exception(exceptions.BaseException)
 Error
 LxmlError
 C14NError
 DTDError
 DTDParseError
 DTDValidateError
 DocumentInvalid
 LxmlRegistryError
 NamespaceRegistryError
 LxmlSyntaxError(LxmlError, exceptions.SyntaxError)
 ParseError
 XMLSyntaxError


Jose


Actually, I'm positive XMLSyntaxError is a subclass of ParseError, 
otherwise my patch wouldn't work at all with lxml, and I've verified it 
does.


Jose
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] tests/all.py: use list for built-in-constants command line arguments

2014-12-17 Thread Dylan Baker
Yes, I've actually wanted to do that myself, but never had the time to
make sure everything worked.

I should have some time today to get that working.

On Wednesday, December 17, 2014 11:42:46 AM Brian Paul wrote:
 Thanks.  BTW, could enforce this in the PiglitGLTest() initializer? 
 That is, make sure the command is a list?
 
 I'd like to try to avoid this problem in the future.
 
 -Brian
 
 PS: I fixed the patch/path typo in the commit messages.
 
 
 On 12/17/2014 10:54 AM, Dylan Baker wrote:
  Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com
 
  On Wednesday, December 17, 2014 10:46:38 AM Brian Paul wrote:
  As with the previous patch, fixes patch corruption on Cygwin.
  ---
tests/all.py | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
 
  diff --git a/tests/all.py b/tests/all.py
  index 2ffb920..ba26ebd 100644
  --- a/tests/all.py
  +++ b/tests/all.py
  @@ -1030,7 +1030,7 @@ spec['glsl-es-1.00']['execution'] = {}
add_shader_test_dir(spec['glsl-es-1.00']['execution'],
os.path.join(testsDir, 'spec', 'glsl-es-1.00', 
  'execution'),
recursive=True)
  -spec['glsl-es-1.00']['built-in constants'] = 
  PiglitGLTest('built-in-constants_gles2 ' + os.path.join(testsDir, 
  'spec/glsl-es-1.00/minimum-maximums.txt'), run_concurrent=True)
  +spec['glsl-es-1.00']['built-in constants'] = 
  PiglitGLTest(['built-in-constants_gles2', os.path.join(testsDir, 
  'spec/glsl-es-1.00/minimum-maximums.txt')], run_concurrent=True)
 
# Group spec/glsl-1.10
spec['glsl-1.10'] = {}
  @@ -1059,7 +1059,7 @@ for type in ['int', 'uint', 'float', 'vec2', 'vec3', 
  'vec4', 'ivec2', 'ivec3',
cmdline = 'simple {0} {1}'.format(type, arrayspec)
spec['glsl-1.10']['execution']['varying-packing'][cmdline] = \
PiglitGLTest('varying-packing-' + cmdline, 
  run_concurrent=True)
  -spec['glsl-1.10']['built-in constants'] = 
  PiglitGLTest('built-in-constants ' + os.path.join(testsDir, 
  'spec/glsl-1.10/minimum-maximums.txt'), run_concurrent=True)
  +spec['glsl-1.10']['built-in constants'] = 
  PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
  'spec/glsl-1.10/minimum-maximums.txt')], run_concurrent=True)
 
spec['glsl-1.10']['api'] = {}
add_concurrent_test(spec['glsl-1.10']['api'], 'getactiveattrib 110');
  @@ -1109,7 +1109,7 @@ add_recursion_test(rec, 'indirect-separate')
add_recursion_test(rec, 'indirect-complex')
add_recursion_test(rec, 'indirect-complex-separate')
 
  -spec['glsl-1.20']['built-in constants'] = 
  PiglitGLTest('built-in-constants ' + os.path.join(testsDir, 
  'spec/glsl-1.20/minimum-maximums.txt'), run_concurrent=True)
  +spec['glsl-1.20']['built-in constants'] = 
  PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
  'spec/glsl-1.20/minimum-maximums.txt')], run_concurrent=True)
spec['glsl-1.20']['api'] = {}
add_concurrent_test(spec['glsl-1.20']['api'], 'getactiveattrib 120');
 
  @@ -1218,7 +1218,7 @@ add_concurrent_test(spec['glsl-1.30']['execution'], 
  'vertexid-drawarrays')
add_concurrent_test(spec['glsl-1.30']['execution'], 
  'vertexid-drawelements')
add_concurrent_test(spec['glsl-1.30']['execution'], 
  'fs-execution-ordering')
 
  -spec['glsl-1.30']['built-in constants'] = 
  PiglitGLTest('built-in-constants ' + os.path.join(testsDir, 
  'spec/glsl-1.30/minimum-maximums.txt'), run_concurrent=True)
  +spec['glsl-1.30']['built-in constants'] = 
  PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
  'spec/glsl-1.30/minimum-maximums.txt')], run_concurrent=True)
spec['glsl-1.30']['api'] = {}
add_concurrent_test(spec['glsl-1.30']['api'], 'getactiveattrib 130');
 
  @@ -1403,7 +1403,7 @@ add_shader_test_dir(spec['glsl-1.40'],
os.path.join(testsDir, 'spec', 'glsl-1.40'),
recursive=True)
spec['glsl-1.40']['execution']['tf-no-position'] = 
  PiglitGLTest('glsl-1.40-tf-no-position', run_concurrent=True)
  -spec['glsl-1.40']['built-in constants'] = 
  PiglitGLTest('built-in-constants ' + os.path.join(testsDir, 
  'spec/glsl-1.40/minimum-maximums.txt'), run_concurrent=True)
  +spec['glsl-1.40']['built-in constants'] = 
  PiglitGLTest(['built-in-constants', os.path.join(testsDir, 
  'spec/glsl-1.40/minimum-maximums.txt')], run_concurrent=True)
 
textureSize_samplers_140 = textureSize_samplers_130 + ['sampler2DRect', 
  'isampler2DRect', 'sampler2DRectShadow', 'samplerBuffer', 
  'isamplerBuffer', 'usamplerBuffer']
for stage in ['vs', 'gs', 'fs']:
  @@ -1445,7 +1445,7 @@ for draw in ['', 'indexed']:
add_concurrent_test(spec['glsl-1.50'],

  ('arb_geometry_shader4-ignore-adjacent-vertices '
 'core {0} {1}').format(draw, prim))
  -spec['glsl-1.50']['built-in constants'] = 
  PiglitGLTest('built-in-constants ' + os.path.join(testsDir, 
  'spec/glsl-1.50/minimum-maximums.txt'), run_concurrent=True)
  

Re: [Piglit] [PATCH] framework: Fix 'module' object has no attribute 'XMLSyntaxError'.

2014-12-17 Thread Dylan Baker
You're correct. I misread xml.SyntaxError as XMLSyntaxError on the
webpage. oops

On Wednesday, December 17, 2014 06:45:11 PM Jose Fonseca wrote:
 On 17/12/14 17:49, Dylan Baker wrote:
  With one very minor nit,
  Reviewed-by: Dylan Baker dylanx.c.ba...@intel.com
 
 Thanks for the review.
 
  On Wednesday, December 17, 2014 11:05:29 AM Jose Fonseca wrote:
  From: José Fonseca jfons...@vmware.com
 
  etree.XMLSyntaxError is only available with lxml.  etree.ParseError is
  available everywhere.  For lxml, etree.XMLSyntaxError is a subclass of
  etree.ParseError.
 
  Actually, lxml.etree.ParseError is a subclass of
  lxml.etree.XMLSyntaxError.
 
 Really? Odd, `pydoc lxml.etree` shows otherwise:
 
 $  pydoc lxml.etree
 [...]
 CLASSES
 [...]
  exceptions.Exception(exceptions.BaseException)
  Error
  LxmlError
  C14NError
  DTDError
  DTDParseError
  DTDValidateError
  DocumentInvalid
  LxmlRegistryError
  NamespaceRegistryError
  LxmlSyntaxError(LxmlError, exceptions.SyntaxError)
  ParseError
  XMLSyntaxError
 
 
 Jose


signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] util-cl: Fix non-portable sizeof.

2014-12-17 Thread Matt Turner
On Tue, Dec 16, 2014 at 10:47 PM, Vinson Lee v...@freedesktop.org wrote:
 Fix Coverity sizeof not portable defect.

 Signed-off-by: Vinson Lee v...@freedesktop.org
 ---
  tests/util/piglit-framework-cl-program.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/tests/util/piglit-framework-cl-program.c 
 b/tests/util/piglit-framework-cl-program.c
 index d335486..f94525b 100644
 --- a/tests/util/piglit-framework-cl-program.c
 +++ b/tests/util/piglit-framework-cl-program.c
 @@ -287,7 +287,7 @@ piglit_cl_program_test_run(const int argc,
 } else if(config-program_binary_file != NULL) {
 unsigned int length;
 size_t* lengths = malloc(sizeof(size_t) * 
 env.context-num_devices);
 -   unsigned char** program_binaries = malloc(sizeof(unsigned 
 char**) * env.context-num_devices);
 +   unsigned char** program_binaries = malloc(sizeof(unsigned 
 char*) * env.context-num_devices);

Someone explain this one to me?

program_binaries is an unsigned char ** and that's what we're giving
to sizeof. What's wrong with sizeof(unsigned char **)?
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] util-cl: Fix non-portable sizeof.

2014-12-17 Thread Ilia Mirkin
On Wed, Dec 17, 2014 at 2:17 PM, Matt Turner matts...@gmail.com wrote:
 On Tue, Dec 16, 2014 at 10:47 PM, Vinson Lee v...@freedesktop.org wrote:
 Fix Coverity sizeof not portable defect.

 Signed-off-by: Vinson Lee v...@freedesktop.org
 ---
  tests/util/piglit-framework-cl-program.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/tests/util/piglit-framework-cl-program.c 
 b/tests/util/piglit-framework-cl-program.c
 index d335486..f94525b 100644
 --- a/tests/util/piglit-framework-cl-program.c
 +++ b/tests/util/piglit-framework-cl-program.c
 @@ -287,7 +287,7 @@ piglit_cl_program_test_run(const int argc,
 } else if(config-program_binary_file != NULL) {
 unsigned int length;
 size_t* lengths = malloc(sizeof(size_t) * 
 env.context-num_devices);
 -   unsigned char** program_binaries = malloc(sizeof(unsigned 
 char**) * env.context-num_devices);
 +   unsigned char** program_binaries = malloc(sizeof(unsigned 
 char*) * env.context-num_devices);

 Someone explain this one to me?

 program_binaries is an unsigned char ** and that's what we're giving
 to sizeof. What's wrong with sizeof(unsigned char **)?

It's an array of (unsigned char *), not (unsigned char **). For
example if it were a 1d array, you might have

unsigned char *foo = malloc(sizeof(unsigned char) * num_elements)

right? Of course it doesn't end up _actually_ mattering, since
sizeof(char*) == sizeof(char**).

  -ilia
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] util-cl: Fix non-portable sizeof.

2014-12-17 Thread Matt Turner
On Wed, Dec 17, 2014 at 11:20 AM, Ilia Mirkin imir...@alum.mit.edu wrote:
 On Wed, Dec 17, 2014 at 2:17 PM, Matt Turner matts...@gmail.com wrote:
 On Tue, Dec 16, 2014 at 10:47 PM, Vinson Lee v...@freedesktop.org wrote:
 Fix Coverity sizeof not portable defect.

 Signed-off-by: Vinson Lee v...@freedesktop.org
 ---
  tests/util/piglit-framework-cl-program.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/tests/util/piglit-framework-cl-program.c 
 b/tests/util/piglit-framework-cl-program.c
 index d335486..f94525b 100644
 --- a/tests/util/piglit-framework-cl-program.c
 +++ b/tests/util/piglit-framework-cl-program.c
 @@ -287,7 +287,7 @@ piglit_cl_program_test_run(const int argc,
 } else if(config-program_binary_file != NULL) {
 unsigned int length;
 size_t* lengths = malloc(sizeof(size_t) * 
 env.context-num_devices);
 -   unsigned char** program_binaries = malloc(sizeof(unsigned 
 char**) * env.context-num_devices);
 +   unsigned char** program_binaries = malloc(sizeof(unsigned 
 char*) * env.context-num_devices);

 Someone explain this one to me?

 program_binaries is an unsigned char ** and that's what we're giving
 to sizeof. What's wrong with sizeof(unsigned char **)?

 It's an array of (unsigned char *), not (unsigned char **). For
 example if it were a 1d array, you might have

 unsigned char *foo = malloc(sizeof(unsigned char) * num_elements)

 right? Of course it doesn't end up _actually_ mattering, since
 sizeof(char*) == sizeof(char**).

   -ilia

Oh yes, of course. Thanks for doing my thinking for me. :)
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 1/2] CL: refactor genclbuiltins.py to allow TSS functions with different arg types

2014-12-17 Thread Aaron Watry
Ping.

The other patches I have no qualms about pushing, but I wouldn't mind
getting review for this one.

--Aaron

On Fri, Dec 12, 2014 at 3:05 PM, Aaron Watry awa...@gmail.com wrote:
 Before, if you had a function that had 2-3 args, it was assumed that all
 arguments were of the same base type.

 Now, that assumption is removed and we used the argument type defined in the
 test profile.

 This will be useful in the next commit, where ldexp(floatN,int) is introduced.

 This patch updates all multi-argument kernel generators to take an array of
 input types, instead of assuming that all inputs are of the same base type as
 the first argument.
 ---
  generated_tests/genclbuiltins.py | 44 
 +++-
  1 file changed, 25 insertions(+), 19 deletions(-)

 diff --git a/generated_tests/genclbuiltins.py 
 b/generated_tests/genclbuiltins.py
 index 571930d..6a595ff 100644
 --- a/generated_tests/genclbuiltins.py
 +++ b/generated_tests/genclbuiltins.py
 @@ -139,44 +139,44 @@ def gen_kernel_1_arg(f, fnName, inType, outType):
  gen_kernel(f, fnName, [inType], outType, [vecSize], '')


 -#  2 argument kernel with input types that match
 -def gen_kernel_2_arg_same_type(f, fnName, inType, outType):
 +#  2 argument kernel with input types that match their vector size
 +def gen_kernel_2_arg_same_size(f, fnName, inTypes, outType):
  for vecSize in ALL_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType], outType, [vecSize, vecSize],
 +gen_kernel(f, fnName, inTypes, outType, [vecSize, vecSize],
 '')


  #  2 argument kernel with 1 vector and one scalar input argument
 -def gen_kernel_2_arg_mixed_size(f, fnName, inType, outType):
 +def gen_kernel_2_arg_mixed_size(f, fnName, inTypes, outType):
  for vecSize in VEC_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType], outType, [vecSize, 1], 
 'tss_')
 +gen_kernel(f, fnName, inTypes, outType, [vecSize, 1], 'tss_')


  #  2 argument kernel with 1 vector and one scalar input argument with 
 multiple
  #input data types
 -def gen_kernel_2_arg_mixed_sign(f, fnName, inType1, inType2, outType):
 +def gen_kernel_2_arg_mixed_sign(f, fnName, inTypes, outType):
  for vecSize in ALL_WIDTHS:
 -gen_kernel(f, fnName, [inType1, inType2], outType, [vecSize, 
 vecSize],
 +gen_kernel(f, fnName, inTypes, outType, [vecSize, vecSize],
 '')


  #  3-argument built-in functions


 -def gen_kernel_3_arg_same_type(f, fnName, inType, outType):
 +def gen_kernel_3_arg_same_type(f, fnName, inTypes, outType):
  for vecSize in ALL_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType, inType], outType,
 +gen_kernel(f, fnName, inTypes, outType,
 [vecSize, vecSize, vecSize], ''
  )

 -def gen_kernel_3_arg_mixed_size_tss(f, fnName, inType, outType):
 +def gen_kernel_3_arg_mixed_size_tss(f, fnName, inTypes, outType):
  for vecSize in VEC_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType, inType], outType,
 +gen_kernel(f, fnName, inTypes, outType,
 [vecSize, 1, 1], 'tss_')

 -def gen_kernel_3_arg_mixed_size_tts(f, fnName, inType, outType):
 +def gen_kernel_3_arg_mixed_size_tts(f, fnName, inTypes, outType):
  for vecSize in VEC_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType, inType], outType,
 +gen_kernel(f, fnName, inTypes, outType,
 [vecSize, vecSize, 1], 'tts_')


 @@ -189,21 +189,27 @@ def generate_kernels(f, dataType, fnName, fnDef):
  return

  if (len(argTypes) == 3 and not fnName is 'upsample'):
 -gen_kernel_2_arg_same_type(f, fnName, argTypes[1], argTypes[0])
 +gen_kernel_2_arg_same_size(f, fnName,
 +[argTypes[1], argTypes[2]], argTypes[0])
  if (fnDef['function_type'] is 'tss'):
 -gen_kernel_2_arg_mixed_size(f, fnName, argTypes[1], argTypes[0])
 +gen_kernel_2_arg_mixed_size(f, fnName,
 +[argTypes[1], argTypes[2]], argTypes[0])
  return

  if (len(argTypes) == 4):
 -gen_kernel_3_arg_same_type(f, fnName, argTypes[1], argTypes[0])
 +gen_kernel_3_arg_same_type(f, fnName,
 +   [argTypes[1], argTypes[2], argTypes[3]], argTypes[0])
  if (fnDef['function_type'] is 'tss'):
 -gen_kernel_3_arg_mixed_size_tss(f, fnName, argTypes[1], 
 argTypes[0])
 +gen_kernel_3_arg_mixed_size_tss(f, fnName,
 +   [argTypes[1], argTypes[2], argTypes[3]], argTypes[0])
  if (fnDef['function_type'] is 'tts'):
 -gen_kernel_3_arg_mixed_size_tts(f, fnName, argTypes[1], 
 argTypes[0])
 +gen_kernel_3_arg_mixed_size_tts(f, fnName,
 +   [argTypes[1], argTypes[2], argTypes[3]], argTypes[0])
  return

  if (fnName is 'upsample'):
 -gen_kernel_2_arg_mixed_sign(f, fnName, argTypes[1], argTypes[2],
 +

Re: [Piglit] [PATCH 1/2] CL: refactor genclbuiltins.py to allow TSS functions with different arg types

2014-12-17 Thread Tom Stellard
On Fri, Dec 12, 2014 at 03:05:25PM -0600, Aaron Watry wrote:
 Before, if you had a function that had 2-3 args, it was assumed that all
 arguments were of the same base type.
 
 Now, that assumption is removed and we used the argument type defined in the
 test profile.
 
 This will be useful in the next commit, where ldexp(floatN,int) is introduced.
 
 This patch updates all multi-argument kernel generators to take an array of
 input types, instead of assuming that all inputs are of the same base type as
 the first argument.

For the series: 

Reviewed-by: Tom Stellard thomas.stell...@amd.com

 ---
  generated_tests/genclbuiltins.py | 44 
 +++-
  1 file changed, 25 insertions(+), 19 deletions(-)
 
 diff --git a/generated_tests/genclbuiltins.py 
 b/generated_tests/genclbuiltins.py
 index 571930d..6a595ff 100644
 --- a/generated_tests/genclbuiltins.py
 +++ b/generated_tests/genclbuiltins.py
 @@ -139,44 +139,44 @@ def gen_kernel_1_arg(f, fnName, inType, outType):
  gen_kernel(f, fnName, [inType], outType, [vecSize], '')
  
  
 -#  2 argument kernel with input types that match
 -def gen_kernel_2_arg_same_type(f, fnName, inType, outType):
 +#  2 argument kernel with input types that match their vector size
 +def gen_kernel_2_arg_same_size(f, fnName, inTypes, outType):
  for vecSize in ALL_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType], outType, [vecSize, vecSize],
 +gen_kernel(f, fnName, inTypes, outType, [vecSize, vecSize],
 '')
  
  
  #  2 argument kernel with 1 vector and one scalar input argument
 -def gen_kernel_2_arg_mixed_size(f, fnName, inType, outType):
 +def gen_kernel_2_arg_mixed_size(f, fnName, inTypes, outType):
  for vecSize in VEC_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType], outType, [vecSize, 1], 
 'tss_')
 +gen_kernel(f, fnName, inTypes, outType, [vecSize, 1], 'tss_')
  
  
  #  2 argument kernel with 1 vector and one scalar input argument with 
 multiple
  #input data types
 -def gen_kernel_2_arg_mixed_sign(f, fnName, inType1, inType2, outType):
 +def gen_kernel_2_arg_mixed_sign(f, fnName, inTypes, outType):
  for vecSize in ALL_WIDTHS:
 -gen_kernel(f, fnName, [inType1, inType2], outType, [vecSize, 
 vecSize],
 +gen_kernel(f, fnName, inTypes, outType, [vecSize, vecSize],
 '')
  
  
  #  3-argument built-in functions
  
  
 -def gen_kernel_3_arg_same_type(f, fnName, inType, outType):
 +def gen_kernel_3_arg_same_type(f, fnName, inTypes, outType):
  for vecSize in ALL_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType, inType], outType,
 +gen_kernel(f, fnName, inTypes, outType,
 [vecSize, vecSize, vecSize], ''
  )
  
 -def gen_kernel_3_arg_mixed_size_tss(f, fnName, inType, outType):
 +def gen_kernel_3_arg_mixed_size_tss(f, fnName, inTypes, outType):
  for vecSize in VEC_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType, inType], outType,
 +gen_kernel(f, fnName, inTypes, outType,
 [vecSize, 1, 1], 'tss_')
  
 -def gen_kernel_3_arg_mixed_size_tts(f, fnName, inType, outType):
 +def gen_kernel_3_arg_mixed_size_tts(f, fnName, inTypes, outType):
  for vecSize in VEC_WIDTHS:
 -gen_kernel(f, fnName, [inType, inType, inType], outType,
 +gen_kernel(f, fnName, inTypes, outType,
 [vecSize, vecSize, 1], 'tts_')
  
  
 @@ -189,21 +189,27 @@ def generate_kernels(f, dataType, fnName, fnDef):
  return
  
  if (len(argTypes) == 3 and not fnName is 'upsample'):
 -gen_kernel_2_arg_same_type(f, fnName, argTypes[1], argTypes[0])
 +gen_kernel_2_arg_same_size(f, fnName,
 +[argTypes[1], argTypes[2]], argTypes[0])
  if (fnDef['function_type'] is 'tss'):
 -gen_kernel_2_arg_mixed_size(f, fnName, argTypes[1], argTypes[0])
 +gen_kernel_2_arg_mixed_size(f, fnName,
 +[argTypes[1], argTypes[2]], argTypes[0])
  return
  
  if (len(argTypes) == 4):
 -gen_kernel_3_arg_same_type(f, fnName, argTypes[1], argTypes[0])
 +gen_kernel_3_arg_same_type(f, fnName,
 +   [argTypes[1], argTypes[2], argTypes[3]], argTypes[0])
  if (fnDef['function_type'] is 'tss'):
 -gen_kernel_3_arg_mixed_size_tss(f, fnName, argTypes[1], 
 argTypes[0])
 +gen_kernel_3_arg_mixed_size_tss(f, fnName,
 +   [argTypes[1], argTypes[2], argTypes[3]], argTypes[0])
  if (fnDef['function_type'] is 'tts'):
 -gen_kernel_3_arg_mixed_size_tts(f, fnName, argTypes[1], 
 argTypes[0])
 +gen_kernel_3_arg_mixed_size_tts(f, fnName,
 +   [argTypes[1], argTypes[2], argTypes[3]], argTypes[0])
  return
  
  if (fnName is 'upsample'):
 -gen_kernel_2_arg_mixed_sign(f, fnName, argTypes[1], argTypes[2],
 +

Re: [Piglit] [PATCH] deqp: Add test profile for external dEQP-GLES3 tests (v4)

2014-12-17 Thread Mason, Michael W
Reviewed-by: Michael W Mason michael.w.ma...@intel.com

I ran this on link-freon and it  worked as expected.  Thanks Chad!

 -Original Message-
 From: Chad Versace [mailto:chad.vers...@linux.intel.com]
 Sent: Tuesday, December 16, 2014 1:49 PM
 To: piglit@lists.freedesktop.org
 Cc: Chad Versace; Baker, DylanX C; Mason, Michael W
 Subject: [PATCH] deqp: Add test profile for external dEQP-GLES3 tests (v4)
 
 Google opensourced the drawElements Quality Product Testsuite (dEQP) as part 
 of the Android Lollipop release. It's git
 repo lives in the Android tree at 
 [https://android.googlesource.com/platform/external/deqp/].
 
 This patch adds a new module, deqp_gles3.py, that runs the dEQP-GLES3 tests.  
 It queries the 'deqp-gles3' executable at
 runtime for the list of testcases.  The module attempts queries the 
 'deqp-gles3' executable only if the environment
 variable PIGLIT_DEQP_GLES3_EXE or the piglit.conf option deqp-gles3.exe is 
 set.
 
 Why do we need to use Pigit as the testrunner for dEQP? (After all, dEQP has 
 its own testrunner). Because dEQP runs all
 tests in a single process. If test
 17530 of 55409 crashes, then the dEQP testrunner crashes and the remaining 
 tests never run. Piglit doesn't suffer from that
 problem, because it runs each test as a separate process.
 
 Tested on Intel Ivybridge by running the command
 piglit run -t dEQP-GLES3/info/vendor \
   tests/deqp_gles3.py tests/quick.py results with and without 
 PIGLIT_DEQP_GLES3_EXE set and with and without
 piglit.conf:deqp-gles.exe set. Also tested with various combinations of valid 
 and invalid values for
 PIGLIT_DEQP_GLES_EXTRA_ARGS and piglit.conf:deqp-gles.extra_args.
 
 Cc: Dylan Baker dylanx.c.ba...@intel.com
 Cc: Michael W Mason michael.w.ma...@intel.com
 Signed-off-by: Chad Versace chad.vers...@linux.intel.com
 ---
 
 v2:
 - Remove unused imports (dcbaker)
 - Remove extra newlines (dcbaker)
 - Don't use 'global' keyword (dcbaker)
 - Use global constant for DEQP_GLES3_EXE (dcbaker)
 - Fix DEQPTest.interpret_result to correctly parse test output. (mwmason)
 - Use 'super' keyword (dcbaker)
 
 v3:
 - Fix misnamed variable s/caselist_txt/caselist_path/. (mwmason)
 
 v4:
 - Add option piglit.conf:extra_args and env var
   PIGLIT_DEQP_GLES3_EXTRA_ARGS. (requested by mwmason)
 - Remove '--deqp-visibility=hidden'. (mwmason)
 - Fixed exception handling in func get_option.
 
 
  piglit.conf.example |  12 +
  tests/deqp_gles3.py | 139 
 
  2 files changed, 151 insertions(+)
  create mode 100644 tests/deqp_gles3.py
 
 diff --git a/piglit.conf.example b/piglit.conf.example index a864c01..b3869c2 
 100644
 --- a/piglit.conf.example
 +++ b/piglit.conf.example
 @@ -33,6 +33,18 @@ bindir=/home/usr/oclconform  testA  testB
 
 +;[deqp-gles3]
 +;
 +; Path to the deqp-gles3 executable. You can also set this with the
 +environment ; variable PIGLIT_DEQP_GLES3_EXE. Piglit will run the
 +dEQP-GLES3 tests if and ; only if this option is set.
 +;exe=/home/knuth/deqp/modules/gles3/deqp-gles3
 +;
 +; Space-separated list of extra command line arguments for deqp-gles3.
 +The ; option is not required. The environment variable
 +PIGLIT_DEQP_GLES3_EXTRA_ARGS ; overrides the value set here.
 +;extra_args=--deqp-visibility hidden
 +
  ; Section for specific oclconform test.  One of these sections is required 
 for  ; each test list in the oclconform section and
 must be called:
  ; oclconform-$testname
 diff --git a/tests/deqp_gles3.py b/tests/deqp_gles3.py new file mode 100644 
 index 000..b1bb33b
 --- /dev/null
 +++ b/tests/deqp_gles3.py
 @@ -0,0 +1,139 @@
 +# Copyright 2014 Intel Corporation
 +#
 +# Permission is hereby granted, free of charge, to any person obtaining
 +a copy # of this software and associated documentation files (the
 +Software), to deal # in the Software without restriction, including
 +without limitation the rights # to use, copy, modify, merge, publish,
 +distribute, sublicense, and/or sell # copies of the Software, and to
 +permit persons to whom the Software is # furnished to do so, subject to the 
 following conditions:
 +#
 +# The above copyright notice and this permission notice shall be
 +included in # all copies or substantial portions of the Software.
 +#
 +# THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
 +EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 +MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND
 +NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS
 +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN
 +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN
 +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE.
 +
 +import ConfigParser
 +import os
 +import subprocess
 +
 +# Piglit modules
 +import framework
 +from framework.profile import Test, TestProfile
 +
 +__all__ = ['profile']
 

[Piglit] [PATCH] generated_tests: Actually catch exception in os.makedirs

2014-12-17 Thread Dylan Baker
Patch b59ff71eb was supposed to fix os.makedirs exceptions, but falls
short because of a missing else statement that causes all of the caught
exceptions to fall back to raise.

This corrects, it also pulls the duplicate functions out into a shared
module.

Signed-off-by: Dylan Baker dylanx.c.ba...@intel.com
---
 generated_tests/gen_builtin_packing_tests.py   |  9 +---
 generated_tests/gen_builtin_uniform_tests.py   | 12 ++---
 generated_tests/gen_builtin_uniform_tests_fp64.py  | 12 ++---
 generated_tests/gen_const_builtin_equal_tests.py   |  9 +---
 generated_tests/gen_constant_array_size_tests.py   | 11 +
 .../gen_constant_array_size_tests_fp64.py  | 11 +
 generated_tests/gen_interpolation_tests.py | 11 +
 generated_tests/gen_non-lvalue_tests.py|  4 +-
 generated_tests/gen_outerproduct_invalid_params.py |  9 +---
 generated_tests/gen_outerproduct_tests.py  | 10 ++--
 generated_tests/gen_shader_bit_encoding_tests.py   |  9 +---
 .../gen_shader_image_load_store_tests.py   | 10 ++--
 generated_tests/gen_texture_lod_tests.py   |  9 +---
 generated_tests/gen_texture_query_lod_tests.py |  9 +---
 generated_tests/gen_uniform_initializer_tests.py   | 12 ++---
 generated_tests/genclbuiltins.py   | 54 +-
 generated_tests/generate-cl-store-tests.py | 10 ++--
 .../interpolation-qualifier-built-in-variable.py   |  9 +---
 {tests = generated_tests/modules}/__init__.py |  0
 generated_tests/modules/utils.py   | 43 +
 20 files changed, 105 insertions(+), 158 deletions(-)
 copy {tests = generated_tests/modules}/__init__.py (100%)
 create mode 100644 generated_tests/modules/utils.py

diff --git a/generated_tests/gen_builtin_packing_tests.py 
b/generated_tests/gen_builtin_packing_tests.py
index 5ca727a..901f493 100644
--- a/generated_tests/gen_builtin_packing_tests.py
+++ b/generated_tests/gen_builtin_packing_tests.py
@@ -43,6 +43,7 @@ from math import copysign, fabs, fmod, frexp, isinf, isnan, 
modf
 from numpy import int8, int16, uint8, uint16, uint32, float32
 
 from templates import template_dir
+from modules import utils
 
 TEMPLATES = template_dir(os.path.basename(os.path.splitext(__file__)[0]))
 
@@ -1027,13 +1028,7 @@ class ShaderTest(object):
 
 def write_file(self):
 dirname = os.path.dirname(self.filename)
-if not os.path.exists(dirname):
-try:
-os.makedirs(dirname)
-except OSError as e:
-if e.errno == 17:  # file exists
-pass
-raise
+utils.safe_makedirs(dirname)
 
 with open(self.filename, w) as f:
 f.write(self.__template.render(func=self.__func_info))
diff --git a/generated_tests/gen_builtin_uniform_tests.py 
b/generated_tests/gen_builtin_uniform_tests.py
index d3a7816..9bb3075 100644
--- a/generated_tests/gen_builtin_uniform_tests.py
+++ b/generated_tests/gen_builtin_uniform_tests.py
@@ -52,6 +52,8 @@ import os
 import os.path
 import sys
 
+from modules import utils
+
 
 def compute_offset_and_scale(test_vectors):
 Compute scale and offset values such that for each result in
@@ -537,15 +539,7 @@ class ShaderTest(object):
 shader_test += self.make_test()
 filename = self.filename()
 dirname = os.path.dirname(filename)
-
-if not os.path.exists(dirname):
-try:
-os.makedirs(dirname)
-except OSError as e:
-if e.errno == 17:  # file exists
-pass
-raise
-
+utils.safe_makedirs(dirname)
 with open(filename, 'w') as f:
 f.write(shader_test)
 
diff --git a/generated_tests/gen_builtin_uniform_tests_fp64.py 
b/generated_tests/gen_builtin_uniform_tests_fp64.py
index cf10c85..23032bd 100644
--- a/generated_tests/gen_builtin_uniform_tests_fp64.py
+++ b/generated_tests/gen_builtin_uniform_tests_fp64.py
@@ -52,6 +52,8 @@ import os
 import os.path
 import sys
 
+from modules import utils
+
 
 def compute_offset_and_scale(test_vectors):
 Compute scale and offset values such that for each result in
@@ -507,15 +509,7 @@ class ShaderTest(object):
 shader_test += self.make_test()
 filename = self.filename()
 dirname = os.path.dirname(filename)
-
-if not os.path.exists(dirname):
-try:
-os.makedirs(dirname)
-except OSError as e:
-if e.errno == 17:  # file exists
-pass
-raise
-
+utils.safe_makedirs(dirname)
 with open(filename, 'w') as f:
 f.write(shader_test)
 
diff --git a/generated_tests/gen_const_builtin_equal_tests.py 
b/generated_tests/gen_const_builtin_equal_tests.py
index 490a591..47a238c 100644
--- a/generated_tests/gen_const_builtin_equal_tests.py
+++ b/generated_tests/gen_const_builtin_equal_tests.py
@@ -25,6 +25,7 @@ import 

Re: [Piglit] [PATCH] generated_tests: Actually catch exception in os.makedirs

2014-12-17 Thread Mark Janes
It seems like you unintentionally included an extra file:
generated_tests/genclbuiltins.py

The deltas are not related to os.makedirs.

Dylan Baker baker.dyla...@gmail.com writes:

  generated_tests/genclbuiltins.py   | 54 
 +-

 diff --git a/generated_tests/genclbuiltins.py 
 b/generated_tests/genclbuiltins.py
 index 7e85a51..681aa29 100644
 --- a/generated_tests/genclbuiltins.py
 +++ b/generated_tests/genclbuiltins.py
 @@ -3,6 +3,8 @@ __all__ = ['gen', 'DATA_SIZES', 'MAX_VALUES', 'MAX', 'MIN', 
 'BMIN', 'BMAX',
  
  import os
  
 +from modules import utils
 +
  
  DATA_SIZES = {
  'char': 8,
 @@ -139,44 +141,44 @@ def gen_kernel_1_arg(f, fnName, inType, outType):
  gen_kernel(f, fnName, [inType], outType, [vecSize], '')
  
  
 -#  2 argument kernel with input types that match their vector size
 -def gen_kernel_2_arg_same_size(f, fnName, inTypes, outType):
 +#  2 argument kernel with input types that match
 +def gen_kernel_2_arg_same_type(f, fnName, inType, outType):
  for vecSize in ALL_WIDTHS:
 -gen_kernel(f, fnName, inTypes, outType, [vecSize, vecSize],
 +gen_kernel(f, fnName, [inType, inType], outType, [vecSize, vecSize],
 '')
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] generated_tests: Actually catch exception in os.makedirs

2014-12-17 Thread Dylan Baker
You're right. Obviously I picked up a stray hunk from another branch.
I'll fix that and send a v2.

On Wednesday, December 17, 2014 03:28:43 PM Mark Janes wrote:
 It seems like you unintentionally included an extra file:
 generated_tests/genclbuiltins.py
 
 The deltas are not related to os.makedirs.
 
 Dylan Baker baker.dyla...@gmail.com writes:
 
   generated_tests/genclbuiltins.py   | 54 
  +-
 
  diff --git a/generated_tests/genclbuiltins.py 
  b/generated_tests/genclbuiltins.py
  index 7e85a51..681aa29 100644
  --- a/generated_tests/genclbuiltins.py
  +++ b/generated_tests/genclbuiltins.py
  @@ -3,6 +3,8 @@ __all__ = ['gen', 'DATA_SIZES', 'MAX_VALUES', 'MAX', 'MIN', 
  'BMIN', 'BMAX',
   
   import os
   
  +from modules import utils
  +
   
   DATA_SIZES = {
   'char': 8,
  @@ -139,44 +141,44 @@ def gen_kernel_1_arg(f, fnName, inType, outType):
   gen_kernel(f, fnName, [inType], outType, [vecSize], '')
   
   
  -#  2 argument kernel with input types that match their vector size
  -def gen_kernel_2_arg_same_size(f, fnName, inTypes, outType):
  +#  2 argument kernel with input types that match
  +def gen_kernel_2_arg_same_type(f, fnName, inType, outType):
   for vecSize in ALL_WIDTHS:
  -gen_kernel(f, fnName, inTypes, outType, [vecSize, vecSize],
  +gen_kernel(f, fnName, [inType, inType], outType, [vecSize, 
  vecSize],
  '')


signature.asc
Description: This is a digitally signed message part.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [Patch v2] generated_tests: Actually catch exception in os.makedirs

2014-12-17 Thread Dylan Baker
Patch b59ff71eb was supposed to fix os.makedirs exceptions, but falls
short because of a missing else statement that causes all of the caught
exceptions to fall back to raise.

This corrects, it also pulls the duplicate functions out into a shared
module.

v2: - remove accidentally included hunk (Mark)

Signed-off-by: Dylan Baker dylanx.c.ba...@intel.com
---
 generated_tests/gen_builtin_packing_tests.py |  9 ++---
 generated_tests/gen_builtin_uniform_tests.py | 12 +++-
 generated_tests/gen_builtin_uniform_tests_fp64.py| 12 +++-
 generated_tests/gen_const_builtin_equal_tests.py |  9 ++---
 generated_tests/gen_constant_array_size_tests.py | 11 ++-
 generated_tests/gen_constant_array_size_tests_fp64.py| 11 ++-
 generated_tests/gen_interpolation_tests.py   | 11 ++-
 generated_tests/gen_non-lvalue_tests.py  |  4 ++--
 generated_tests/gen_outerproduct_invalid_params.py   |  9 ++---
 generated_tests/gen_outerproduct_tests.py| 10 +++---
 generated_tests/gen_shader_bit_encoding_tests.py |  9 ++---
 generated_tests/gen_shader_image_load_store_tests.py | 10 +++---
 generated_tests/gen_texture_lod_tests.py |  9 ++---
 generated_tests/gen_texture_query_lod_tests.py   |  9 ++---
 generated_tests/gen_uniform_initializer_tests.py | 12 +++-
 generated_tests/generate-cl-store-tests.py   | 10 +++---
 generated_tests/interpolation-qualifier-built-in-variable.py |  9 ++---
 17 files changed, 40 insertions(+), 126 deletions(-)

diff --git a/generated_tests/gen_builtin_packing_tests.py 
b/generated_tests/gen_builtin_packing_tests.py
index 5ca727a..901f493 100644
--- a/generated_tests/gen_builtin_packing_tests.py
+++ b/generated_tests/gen_builtin_packing_tests.py
@@ -43,6 +43,7 @@ from math import copysign, fabs, fmod, frexp, isinf, isnan, 
modf
 from numpy import int8, int16, uint8, uint16, uint32, float32
 
 from templates import template_dir
+from modules import utils
 
 TEMPLATES = template_dir(os.path.basename(os.path.splitext(__file__)[0]))
 
@@ -1027,13 +1028,7 @@ class ShaderTest(object):
 
 def write_file(self):
 dirname = os.path.dirname(self.filename)
-if not os.path.exists(dirname):
-try:
-os.makedirs(dirname)
-except OSError as e:
-if e.errno == 17:  # file exists
-pass
-raise
+utils.safe_makedirs(dirname)
 
 with open(self.filename, w) as f:
 f.write(self.__template.render(func=self.__func_info))
diff --git a/generated_tests/gen_builtin_uniform_tests.py 
b/generated_tests/gen_builtin_uniform_tests.py
index d3a7816..9bb3075 100644
--- a/generated_tests/gen_builtin_uniform_tests.py
+++ b/generated_tests/gen_builtin_uniform_tests.py
@@ -52,6 +52,8 @@ import os
 import os.path
 import sys
 
+from modules import utils
+
 
 def compute_offset_and_scale(test_vectors):
 Compute scale and offset values such that for each result in
@@ -537,15 +539,7 @@ class ShaderTest(object):
 shader_test += self.make_test()
 filename = self.filename()
 dirname = os.path.dirname(filename)
-
-if not os.path.exists(dirname):
-try:
-os.makedirs(dirname)
-except OSError as e:
-if e.errno == 17:  # file exists
-pass
-raise
-
+utils.safe_makedirs(dirname)
 with open(filename, 'w') as f:
 f.write(shader_test)
 
diff --git a/generated_tests/gen_builtin_uniform_tests_fp64.py 
b/generated_tests/gen_builtin_uniform_tests_fp64.py
index cf10c85..23032bd 100644
--- a/generated_tests/gen_builtin_uniform_tests_fp64.py
+++ b/generated_tests/gen_builtin_uniform_tests_fp64.py
@@ -52,6 +52,8 @@ import os
 import os.path
 import sys
 
+from modules import utils
+
 
 def compute_offset_and_scale(test_vectors):
 Compute scale and offset values such that for each result in
@@ -507,15 +509,7 @@ class ShaderTest(object):
 shader_test += self.make_test()
 filename = self.filename()
 dirname = os.path.dirname(filename)
-
-if not os.path.exists(dirname):
-try:
-os.makedirs(dirname)
-except OSError as e:
-if e.errno == 17:  # file exists
-pass
-raise
-
+utils.safe_makedirs(dirname)
 with open(filename, 'w') as f:
 f.write(shader_test)
 
diff --git a/generated_tests/gen_const_builtin_equal_tests.py 
b/generated_tests/gen_const_builtin_equal_tests.py
index 490a591..47a238c 100644
--- a/generated_tests/gen_const_builtin_equal_tests.py
+++ b/generated_tests/gen_const_builtin_equal_tests.py
@@ -25,6 +25,7 @@ import re
 import os

[Piglit] [PATCH] CL: Add support for generating double-precision tests

2014-12-17 Thread Aaron Watry
The tests are skipped for devices that don't support doubles, and
when the primary data type for a file is double, we enable the cl_khr_fp64 
pragma
before writing any kernels.

Signed-off-by: Aaron Watry awa...@gmail.com
---
 generated_tests/genclbuiltins.py | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/generated_tests/genclbuiltins.py b/generated_tests/genclbuiltins.py
index 7e85a51..9a8e85e 100644
--- a/generated_tests/genclbuiltins.py
+++ b/generated_tests/genclbuiltins.py
@@ -395,8 +395,13 @@ def gen(types, minVersions, functions, testDefs, dirName):
 '[config]\n' +
 'name: Test '+dataType+' '+fnName+' built-in on CL 1.1\n' +
 'clc_version_min: '+str(clcVersionMin)+'\n' +
-'dimensions: 1\n\n'
+'dimensions: 1\n'
 )
+if (dataType == 'double'):
+f.write('require_device_extensions: cl_khr_fp64\n')
+
+# Blank line  to provide separation between config header and tests
+f.write('\n')
 
 # Write all tests for the built-in function
 tests = functionDef['values']
@@ -416,6 +421,9 @@ def gen(types, minVersions, functions, testDefs, dirName):
 # Terminate the header section
 f.write('!*/\n\n')
 
+if (dataType == 'double'):
+f.write('#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n\n')
+
 # Generate the actual kernels
 generate_kernels(f, dataType, fnName, functionDef)
 
-- 
2.2.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit