[Piglit] [PATCH] Add basic execution tests for GL_AMD_shader_trinary_minmax.
Signed-off-by: Petri Latvala petri.latv...@intel.com --- These three tests are very simple tests for GL_AMD_shader_trinary_minmax functions that I used for regression-testing Mesa optimizations when constants are involved in the calls. Tested on Mesa/Haswell, the tests pass. I will need someone to push this if it's accepted. tests/all.py | 3 ++ .../execution/max3-basic.shader_test | 50 ++ .../execution/mid3-basic.shader_test | 50 ++ .../execution/min3-basic.shader_test | 50 ++ 4 files changed, 153 insertions(+) create mode 100644 tests/spec/amd_shader_trinary_minmax/execution/max3-basic.shader_test create mode 100644 tests/spec/amd_shader_trinary_minmax/execution/mid3-basic.shader_test create mode 100644 tests/spec/amd_shader_trinary_minmax/execution/min3-basic.shader_test diff --git a/tests/all.py b/tests/all.py index 553ae76..a67e725 100644 --- a/tests/all.py +++ b/tests/all.py @@ -1434,6 +1434,9 @@ spec['AMD_shader_trinary_minmax'] = {} import_glsl_parser_tests(spec['AMD_shader_trinary_minmax'], os.path.join(testsDir, 'spec', 'amd_shader_trinary_minmax'), ['']) +add_shader_test_dir(spec['AMD_shader_trinary_minmax'], +os.path.join(testsDir, 'spec', 'amd_shader_trinary_minmax'), +recursive=True) # Group ARB_point_sprite arb_point_sprite = {} diff --git a/tests/spec/amd_shader_trinary_minmax/execution/max3-basic.shader_test b/tests/spec/amd_shader_trinary_minmax/execution/max3-basic.shader_test new file mode 100644 index 000..be28d7b --- /dev/null +++ b/tests/spec/amd_shader_trinary_minmax/execution/max3-basic.shader_test @@ -0,0 +1,50 @@ +[require] +GLSL = 1.10 +GL_AMD_shader_trinary_minmax + +[vertex shader passthrough] + +[fragment shader] + +#extension GL_AMD_shader_trinary_minmax : require + +uniform float zero; +uniform float one; +uniform float middle; + +float test_all_constants() +{ + return max3(0.0, 1.0, 0.5); +} + +float test_two_constants() +{ + return max3(0.5, one, 0.0); +} + +float test_one_constant() +{ + return max3(one, zero, 0.5); +} + +float test_no_constants() +{ + return max3(middle, one, zero); +} + +void main() +{ + float r = test_all_constants(); + float g = test_two_constants(); + float b = test_one_constant(); + float a = test_no_constants(); + + gl_FragColor = vec4(r, g, b, a); +} + +[test] +uniform float zero 0.0 +uniform float one 1.0 +uniform float middle 0.5 +draw rect -1 -1 2 2 +probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/amd_shader_trinary_minmax/execution/mid3-basic.shader_test b/tests/spec/amd_shader_trinary_minmax/execution/mid3-basic.shader_test new file mode 100644 index 000..719f138 --- /dev/null +++ b/tests/spec/amd_shader_trinary_minmax/execution/mid3-basic.shader_test @@ -0,0 +1,50 @@ +[require] +GLSL = 1.10 +GL_AMD_shader_trinary_minmax + +[vertex shader passthrough] + +[fragment shader] + +#extension GL_AMD_shader_trinary_minmax : require + +uniform float zero; +uniform float one; +uniform float middle; + +float test_all_constants() +{ + return mid3(0.0, 1.0, 0.5); +} + +float test_two_constants() +{ + return mid3(0.5, one, 0.0); +} + +float test_one_constant() +{ + return mid3(one, zero, 0.5); +} + +float test_no_constants() +{ + return mid3(middle, one, zero); +} + +void main() +{ + float r = test_all_constants(); + float g = test_two_constants(); + float b = test_one_constant(); + float a = test_no_constants(); + + gl_FragColor = vec4(r, g, b, a); +} + +[test] +uniform float zero 0.0 +uniform float one 1.0 +uniform float middle 0.5 +draw rect -1 -1 2 2 +probe all rgba 0.5 0.5 0.5 0.5 diff --git a/tests/spec/amd_shader_trinary_minmax/execution/min3-basic.shader_test b/tests/spec/amd_shader_trinary_minmax/execution/min3-basic.shader_test new file mode 100644 index 000..3589b8e --- /dev/null +++ b/tests/spec/amd_shader_trinary_minmax/execution/min3-basic.shader_test @@ -0,0 +1,50 @@ +[require] +GLSL = 1.10 +GL_AMD_shader_trinary_minmax + +[vertex shader passthrough] + +[fragment shader] + +#extension GL_AMD_shader_trinary_minmax : require + +uniform float zero; +uniform float one; +uniform float middle; + +float test_all_constants() +{ + return min3(0.0, 1.0, 0.5); +} + +float test_two_constants() +{ + return min3(0.5, one, 0.0); +} + +float test_one_constant() +{ + return min3(one, zero, 0.5); +} + +float test_no_constants() +{ + return min3(middle, one, zero); +} + +void main() +{ + float r = test_all_constants(); + float g = test_two_constants(); + float b = test_one_constant(); + float a = test_no_constants(); + + gl_FragColor = vec4(r, g, b, a); +} + +[test] +uniform float zero 0.0 +uniform float one 1.0 +uniform
[Piglit] [PATCH] ARB_shader_texture_lod: Replace shell generator with python generator
This patch removes tests/spec/ARB_shader_texture_lod/compiler/*, which is a shell script that generates a number of tests, and 47 generated glsl parser tests. It replaces them with a python generator (require less code than the bash generator), that is run at build time by cmake. That means we don't need to check these simple generated tests in VCS. Signed-off-by: Dylan Baker baker.dyla...@gmail.com --- generated_tests/CMakeLists.txt | 4 + generated_tests/gen_texture_lod_tests.py | 181 ++ tests/all.py | 2 +- .../compiler/make_tex_lod_tests.sh | 210 - .../compiler/tex_grad-01.frag | 17 -- .../compiler/tex_grad-02.frag | 17 -- .../compiler/tex_grad-03.frag | 17 -- .../compiler/tex_grad-04.frag | 17 -- .../compiler/tex_grad-05.frag | 17 -- .../compiler/tex_grad-06.frag | 17 -- .../compiler/tex_grad-07.frag | 17 -- .../compiler/tex_grad-08.frag | 17 -- .../compiler/tex_grad-09.frag | 17 -- .../compiler/tex_grad-10.frag | 17 -- .../compiler/tex_grad-11.frag | 17 -- .../compiler/tex_grad-12.frag | 17 -- .../compiler/tex_grad-13.frag | 17 -- .../compiler/tex_grad-14.frag | 17 -- .../compiler/tex_grad-15.frag | 17 -- .../compiler/tex_grad-16.frag | 17 -- .../compiler/tex_grad-17.frag | 17 -- .../compiler/tex_grad-18.vert | 20 -- .../compiler/tex_grad-19.vert | 20 -- .../compiler/tex_grad-20.vert | 20 -- .../compiler/tex_grad-21.vert | 20 -- .../compiler/tex_grad-22.vert | 20 -- .../compiler/tex_grad-23.vert | 20 -- .../compiler/tex_grad-24.vert | 20 -- .../compiler/tex_grad-25.vert | 20 -- .../compiler/tex_grad-26.vert | 20 -- .../compiler/tex_grad-27.vert | 20 -- .../compiler/tex_grad-28.vert | 20 -- .../compiler/tex_grad-29.vert | 20 -- .../compiler/tex_grad-30.vert | 20 -- .../compiler/tex_grad-31.vert | 20 -- .../compiler/tex_grad-32.vert | 20 -- .../compiler/tex_grad-33.vert | 20 -- .../compiler/tex_grad-34.vert | 20 -- .../compiler/tex_lod-01.frag | 16 -- .../compiler/tex_lod-02.frag | 16 -- .../compiler/tex_lod-03.frag | 16 -- .../compiler/tex_lod-04.frag | 16 -- .../compiler/tex_lod-05.frag | 16 -- .../compiler/tex_lod-06.frag | 16 -- .../compiler/tex_lod-07.frag | 16 -- .../compiler/tex_lod-08.frag | 16 -- .../compiler/tex_lod-09.frag | 16 -- .../compiler/tex_lod-10.frag | 16 -- .../compiler/tex_lod-11.frag | 16 -- .../compiler/tex_lod-12.frag | 16 -- .../compiler/tex_lod-13.frag | 16 -- 51 files changed, 186 insertions(+), 1048 deletions(-) create mode 100644 generated_tests/gen_texture_lod_tests.py delete mode 100755 tests/spec/arb_shader_texture_lod/compiler/make_tex_lod_tests.sh delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-01.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-02.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-03.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-04.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-05.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-06.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-07.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-08.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-09.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-10.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-11.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-12.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-13.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-14.frag delete mode 100644 tests/spec/arb_shader_texture_lod/compiler/tex_grad-15.frag delete mode 100644
Re: [Piglit] [PATCH 01/24] tex3d: assorted clean-ups
- Original Message - On 04/29/2014 12:05 PM, Jose Fonseca wrote: - Original Message - Don't call piglit_report_result() - return result from piglit_display(). Use default window size and fix row wrapping to avoid drawing off the edge of the window. Use bool instead of int. Use piglit_get_gl_enum_name(). Use GLubyte instead of unsigned char. Set texture env mode to replace. --- tests/texturing/tex3d.c | 69 +++ 1 file changed, 33 insertions(+), 36 deletions(-) diff --git a/tests/texturing/tex3d.c b/tests/texturing/tex3d.c index 05c29a6..0dd72fc 100644 --- a/tests/texturing/tex3d.c +++ b/tests/texturing/tex3d.c @@ -32,9 +32,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN config.supports_gl_compat_version = 10; - config.window_width = 128; - config.window_height = 128; - config.window_visual = PIGLIT_GL_VISUAL_RGBA; + config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE; PIGLIT_GL_TEST_CONFIG_END @@ -50,17 +48,8 @@ static int nrcomponents(GLenum format) } } -static const char* formatname(GLenum format) -{ - switch(format) { - case GL_RGBA: return GL_RGBA; - case GL_RGB: return GL_RGB; - case GL_ALPHA: return GL_ALPHA; - default: abort(); - } -} - -static void expected_rgba(GLenum format, const unsigned char* texdata, unsigned char* expected) +static void +expected_rgba(GLenum format, const GLubyte *texdata, GLubyte *expected) { switch(format) { case GL_RGBA: @@ -84,13 +73,15 @@ static void expected_rgba(GLenum format, const unsigned char* texdata, unsigned } } -static int render_and_check(int w, int h, int d, GLenum format, float q, unsigned char* data, const char* test) +static bool +render_and_check(int w, int h, int d, GLenum format, float q, + const GLubyte *data, const char* test) { int x, y, z; int layer; - unsigned char* readback; - unsigned char* texp; - unsigned char* readp; + GLubyte *readback; + const GLubyte *texp; + GLubyte *readp; int ncomp = 0; glClearColor(0.0, 0.0, 0.0, 0.0); @@ -111,18 +102,18 @@ static int render_and_check(int w, int h, int d, GLenum format, float q, unsigne glVertex2f(x, y+h); glEnd(); x += w; - if (x = piglit_width) { + if (x + w = piglit_width) { Won't this change the behavior? At a glance it doesn't look like it will do the same thing. The test draws a series of quads from left to right. This conditional checks if we're about to draw off the right edge of the window, and if so, starts the next row. The same change was made below for the probing code. Between the original window size and the texture size being tested, I don't think the condition was ever actually hit. The corrected code was already present in the tex3d-npot.c test, btw. I see. Looks good AFAICT then. Jose ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] FW: [PATCH] fixed oes compressed etc2 texture miptree failure
I've pushed the ktx binary mode change. I still need to do a full piglit run with the 160x160 default window size change so I didn't push the change to oes_compressed_etc2_texture-miptree.c yet. -Brian On 04/29/2014 09:32 PM, Guo, Johney wrote: 160x160 on win8 is OK. The test passes without spurious window warning. And for the ktx and viewport fix, you will change and commit it directly, right? Thanks -- The content of your original patch looks OK, but it should probably be split into two patches: one for the ktx change, and another for the viewport fix. Can you please test changing the default window size to 160x160 and rerun on Win8 to verify? I'll do the same here on Linux. -Brian On 04/29/2014 05:03 AM, Guo, Johney wrote: Bumping up to 160 is simple way to fix the warns on Win8. For further compatibility, it is better to set the default window fix sized to disable resize function. BTW,Will my patch be accepted for this test? On 04/27/2014 12:45 PM, Ian Romanick wrote: On 04/24/2014 03:41 AM, Guo, Johney wrote: See tests/util/piglit-framework-gl/piglit_glut_framework.c:84: default_reshape_func(int w, int h) { if (piglit_automatic (w != piglit_width || h != piglit_height)) { printf(Got spurious window resize in automatic run (%d,%d to %d,%d)\n, piglit_width, piglit_height, w, h); piglit_report_result(PIGLIT_WARN); } piglit_width = w; piglit_height = h; glViewport(0, 0, w, h); } My OS is win8. If piglit_width 160, window manager will force it to 160. There was a similar issue a few years ago with Win7. I believe Brian Paul fixed this by modifying the framework to enforce a minimum window size depending on the operating system. It's better to fix this issue once for all tests than change each individual test. This is especially true since we may add more tests with too-small window sizes (since we're not on Windows). Brian, does that sound right? Basically, I changed the default window size to be 150x150 because on Windows (7 and maybe XP) if the window size was less than 116 pixels wide, it would get bumped up to 116 and that would cause the test to fail. I did a quick search of git history and found this one: commit 1894ef34c5e3cc0daefd1241b31a2b2ae32c3347 Author: Brian Paul bri...@vmware.com Date: Fri Apr 5 12:32:46 2013 -0600 lodbias: increase window size to fix test on Windows Before, the 96x96 window got bumped up to 116x96 by Windows and we saw a Got spurious window resize in automatic run message and the test reported warn. So the rule of thumb now is don't set the config.window_width, height vars unless you really have to, and be prepared for window resizes if you do. I've rarely tested Windows 8 so I wasn't aware of any problems there with the window size. If width=160 is the new magic number, we may have to bump up config.window_width, height again. Johney, can you try bumping up the default window size in tests/util/piglit-framework-gl.h and see if that solve the problem? I can likewise do that here and see if there's any unexpected regressions from changing the window size. Many piglit tests have set configure width as 150, then they will all report as warn. At least the following, $ grep -Irne \150\ tests | grep width tests/fbo/fbo-blit-d24s8.c:45: config.window_width = 150; tests/fbo/fbo-blit.c:43:config.window_width = 150; tests/fbo/fbo-copypix.c:40: config.window_width = 150; tests/fbo/fbo-readdrawpix.c:40: config.window_width = 150; tests/spec/arb_es2_compatibility/arb_es2_compatibility-depthrangef.c:36: config.window_width = 150; tests/texturing/incomplete-texture.c:38:config.window_width = 150; tests/texturing/shaders/textureSize.c:55: config.window_width = 150; tests/texturing/texsubimage.c:42: config.window_width = 150; tests/util/piglit-framework-gl.h:272:config.window_width = 150; What is more, glViewport(0, 0, w, h) will change the viewport to (w,h), so in each glut display() function, glViewPort() should be recalled for validity The last time I bumped up the default window size I had to fix a bunch of tests that had hard-coded dimensions. Looks like there's a few more to tend to... -Brian ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/2] tests/igt.py: discard dmesg output that does not match certain keywords
Signed-off-by: Thomas Wood thomas.w...@intel.com --- tests/igt.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/igt.py b/tests/igt.py index 7cfb6ad..d8dfa15 100644 --- a/tests/igt.py +++ b/tests/igt.py @@ -256,3 +256,6 @@ for test in multiTests: addSubTestCases(test) profile.dmesg = True + +# the dmesg property of TestProfile returns a Dmesg object +profile.dmesg.regex = re.compile((drm|gem|i915)) -- 1.9.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/2] framework/dmesg.py: add a filtering mechanism
Only update the test status if at least one of the lines in the dmesg output matches the given regular expression. Signed-off-by: Thomas Wood thomas.w...@intel.com --- framework/dmesg.py | 11 +++ 1 file changed, 11 insertions(+) diff --git a/framework/dmesg.py b/framework/dmesg.py index 3af8496..78b8d46 100644 --- a/framework/dmesg.py +++ b/framework/dmesg.py @@ -53,6 +53,7 @@ class LinuxDmesg(object): Create a dmesg instance self._last_message = None self._new_messages = [] +self.regex = None; # Populate self.dmesg initially, otherwise the first test will always # be full of dmesg crud. @@ -101,6 +102,16 @@ class LinuxDmesg(object): # if update_dmesg() found new entries replace the results of the test # and subtests if self._new_messages: + +if (self.regex is not None): +found = False +for line in self._new_messages: +if self.regex.search(line) is not None: +found = True +break +if not found: +return result + result['result'] = replace(result['result']) # Replace any subtests -- 1.9.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 1/2] framework/dmesg.py: add a filtering mechanism
On Wed, Apr 30, 2014 at 12:12 PM, Thomas Wood thomas.w...@intel.com wrote: Only update the test status if at least one of the lines in the dmesg output matches the given regular expression. Would be nice to provide a mechanism to set this on the cmdline too, but not required as part of this change. Just a thought. Signed-off-by: Thomas Wood thomas.w...@intel.com --- framework/dmesg.py | 11 +++ 1 file changed, 11 insertions(+) diff --git a/framework/dmesg.py b/framework/dmesg.py index 3af8496..78b8d46 100644 --- a/framework/dmesg.py +++ b/framework/dmesg.py @@ -53,6 +53,7 @@ class LinuxDmesg(object): Create a dmesg instance self._last_message = None self._new_messages = [] +self.regex = None; # Populate self.dmesg initially, otherwise the first test will always # be full of dmesg crud. @@ -101,6 +102,16 @@ class LinuxDmesg(object): # if update_dmesg() found new entries replace the results of the test # and subtests if self._new_messages: + +if (self.regex is not None): No need for parens. Also, you can just do if self.regex: Since RE objects will implicitly evaluate to true +found = False +for line in self._new_messages: +if self.regex.search(line) is not None: Same deal here -- no need for is not None -- match objects are implicitly true. (Which is what .search() returns IIRC.) +found = True +break +if not found: +return result If you're a fan of fancy python, you can use the for/else construct and write this as: for line in self._new_messages: if self.regex.search(line): break else: return result + result['result'] = replace(result['result']) # Replace any subtests -- 1.9.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/3] cmake: Install under separate piglit directory
Install paths updated: * $PREFIX/share/doc = $PREFIX/share/doc/piglit * $PREFIX/lib = $PREFIX/lib/piglit/lib * $PREFIX/bin = $PREFIX/lib/piglit/bin * etc... Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- CMakeLists.txt | 23 +-- cmake/piglit_util.cmake | 4 ++-- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbdccf1..0c91705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.6) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules) +INCLUDE (GNUInstallDirs) INCLUDE (CheckCCompilerFlag) INCLUDE (CheckCSourceCompiles) INCLUDE (CheckCXXCompilerFlag) @@ -376,6 +377,16 @@ check_include_file(sys/stat.h HAVE_SYS_STAT_H) check_include_file(unistd.hHAVE_UNISTD_H) check_include_file(fcntl.h HAVE_FCNTL_H) +set(PIGLIT_INSTALL_LIBDIR +${CMAKE_INSTALL_LIBDIR}/piglit) +if(NOT IS_ABSOLUTE ${PIGLIT_INSTALL_LIBDIR}) + set(PIGLIT_INSTALL_FULL_LIBDIR ${CMAKE_INSTALL_PREFIX}/${PIGLIT_INSTALL_LIBDIR}) +else() + set(PIGLIT_INSTALL_FULL_LIBDIR ${PIGLIT_INSTALL_LIBDIR}) +endif() + +SET(CMAKE_INSTALL_RPATH ${PIGLIT_INSTALL_FULL_LIBDIR}/lib) + configure_file( ${piglit_SOURCE_DIR}/tests/util/config.h.in ${piglit_BINARY_DIR}/tests/util/config.h @@ -398,7 +409,7 @@ install ( COPYING README RELEASE - DESTINATION share/doc + DESTINATION share/doc/piglit ) install ( @@ -410,30 +421,30 @@ install ( piglit-summary.py piglit-summary-html.py piglit-summary-junit.py - DESTINATION . + DESTINATION ${PIGLIT_INSTALL_LIBDIR} ) install ( DIRECTORY framework - DESTINATION . + DESTINATION ${PIGLIT_INSTALL_LIBDIR} FILES_MATCHING PATTERN *.py ) install ( DIRECTORY templates - DESTINATION . + DESTINATION ${PIGLIT_INSTALL_LIBDIR} ) install ( DIRECTORY tests - DESTINATION . + DESTINATION ${PIGLIT_INSTALL_LIBDIR} FILES_MATCHING REGEX .*\\.(py|program_test|shader_test|frag|vert|geom|ktx|cl|txt|vpfp)$ REGEX CMakeFiles|CMakeLists EXCLUDE ) install ( DIRECTORY ${CMAKE_BINARY_DIR}/generated_tests - DESTINATION . + DESTINATION ${PIGLIT_INSTALL_LIBDIR} FILES_MATCHING REGEX .*\\.(shader_test|program_test|frag|vert|geom|cl|txt)$ REGEX CMakeFiles|CMakeLists EXCLUDE ) diff --git a/cmake/piglit_util.cmake b/cmake/piglit_util.cmake index d3cab44..e2c3454 100644 --- a/cmake/piglit_util.cmake +++ b/cmake/piglit_util.cmake @@ -62,7 +62,7 @@ function(piglit_add_executable name) add_executable(${name} ${ARGV}) add_dependencies(${name} piglit_dispatch_gen) -install(TARGETS ${name} DESTINATION bin) +install(TARGETS ${name} DESTINATION ${PIGLIT_INSTALL_LIBDIR}/bin) endfunction(piglit_add_executable) @@ -81,7 +81,7 @@ function(piglit_add_library name) add_library(${name} STATIC ${ARGV}) else(WIN32) add_library(${name} SHARED ${ARGV}) -install(TARGETS ${name} DESTINATION lib) +install(TARGETS ${name} DESTINATION ${PIGLIT_INSTALL_LIBDIR}/lib) endif(WIN32) add_dependencies(${name} piglit_dispatch_gen) -- 1.9.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 0/3] Update piglit install locations
Move piglit binaries and libraries out of the system paths Add a piglit wrapper command to easily run piglit commands in the new install location git://people.freedesktop.org/~jljusten/piglit piglit-cmd Jordan Justen (3): cmake: Install under separate piglit directory cmake: Add version suffix for install paths piglit: Add piglit command CMakeLists.txt | 43 ++ cmake/piglit_util.cmake | 4 +-- piglit.in | 42 ++ piglit_cmd.py | 96 + 4 files changed, 177 insertions(+), 8 deletions(-) create mode 100755 piglit.in create mode 100755 piglit_cmd.py -- 1.9.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/3] cmake: Add version suffix for install paths
If used, then piglit will be installed into a separate path. For example, if '-DPIGLIT_INSTALL_VERSION=20140430' was specified with cmake, then piglit would install to $PREFIX/lib/piglit-20140430. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- CMakeLists.txt | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c91705..a9a602c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -377,8 +377,14 @@ check_include_file(sys/stat.h HAVE_SYS_STAT_H) check_include_file(unistd.hHAVE_UNISTD_H) check_include_file(fcntl.h HAVE_FCNTL_H) +if(DEFINED PIGLIT_INSTALL_VERSION) + set(PIGLIT_INSTALL_VERSION_SUFFIX + -${PIGLIT_INSTALL_VERSION}) +else() + set(PIGLIT_INSTALL_VERSION_SUFFIX ) +endif() set(PIGLIT_INSTALL_LIBDIR -${CMAKE_INSTALL_LIBDIR}/piglit) +${CMAKE_INSTALL_LIBDIR}/piglit${PIGLIT_INSTALL_VERSION_SUFFIX}) if(NOT IS_ABSOLUTE ${PIGLIT_INSTALL_LIBDIR}) set(PIGLIT_INSTALL_FULL_LIBDIR ${CMAKE_INSTALL_PREFIX}/${PIGLIT_INSTALL_LIBDIR}) else() @@ -409,7 +415,7 @@ install ( COPYING README RELEASE - DESTINATION share/doc/piglit + DESTINATION share/doc/piglit${PIGLIT_INSTALL_VERSION_SUFFIX} ) install ( -- 1.9.2 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 3/3] piglit: Add piglit command
The piglit command is a wrapper command for the piglit-command.py scripts. For example, running 'piglit run' is equivalent to piglit-run.py. It is installed to $PREFIX/bin/piglit, and will launch the sub-commands either at their installed location in $PREFIX/lib/piglit, or in the source tree. 'piglit help command' will run 'piglit-command.py --help' as expected. 'piglit', 'piglit help' or 'piglit --help' will show the list of possible sub-commands. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- CMakeLists.txt | 14 + piglit.in | 42 + piglit_cmd.py | 96 ++ 3 files changed, 152 insertions(+) create mode 100755 piglit.in create mode 100755 piglit_cmd.py diff --git a/CMakeLists.txt b/CMakeLists.txt index a9a602c..7561788 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,9 @@ INCLUDE (FindPkgConfig) project (piglit) +set(PythonInterp_FIND_VERSION 2) +find_package(PythonInterp REQUIRED) + find_package(Threads) find_package(X11) if(X11_FOUND) @@ -398,6 +401,11 @@ configure_file( ${piglit_BINARY_DIR}/tests/util/config.h ) +configure_file( + ${piglit_SOURCE_DIR}/piglit.in + ${piglit_BINARY_DIR}/piglit${PIGLIT_INSTALL_VERSION_SUFFIX} +) + include(cmake/piglit_util.cmake) include(cmake/piglit_glapi.cmake) include(cmake/piglit_dispatch.cmake) @@ -420,6 +428,7 @@ install ( install ( PROGRAMS + piglit_cmd.py piglit-merge-results.py piglit-print-commands.py piglit-run.py @@ -455,6 +464,11 @@ install ( REGEX CMakeFiles|CMakeLists EXCLUDE ) +install ( + PROGRAMS piglit${PIGLIT_INSTALL_VERSION_SUFFIX} + DESTINATION ${CMAKE_INSTALL_BINDIR} +) + set (CPACK_PACKAGE_VERSION_MAJOR 1) set (CPACK_PACKAGE_VERSION_MINOR 0) diff --git a/piglit.in b/piglit.in new file mode 100755 index 000..1290d9f --- /dev/null +++ b/piglit.in @@ -0,0 +1,42 @@ +#!@PYTHON_EXECUTABLE@ +# +# 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: +# +# 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 AUTHOR(S) 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 sys +import os + +piglit_source = '@piglit_SOURCE_DIR@' +piglit_install_full_libdir = '@PIGLIT_INSTALL_FULL_LIBDIR@' + +piglit_cmd_source_path = \ +os.path.realpath(os.path.join(piglit_source, 'piglit')) +piglit_cmd_in_source = \ +piglit_cmd_source_path == os.path.realpath(sys.argv[0]) + +if piglit_cmd_in_source: + piglit_run_dir = piglit_source +else: + piglit_run_dir = piglit_install_full_libdir + +sys.path.insert(0, piglit_run_dir) +import piglit_cmd +piglit_cmd.run(piglit_run_dir, piglit_cmd_in_source) diff --git a/piglit_cmd.py b/piglit_cmd.py new file mode 100755 index 000..50916ab --- /dev/null +++ b/piglit_cmd.py @@ -0,0 +1,96 @@ +#!/usr/bin/env python +# +# 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: +# +# 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 AUTHOR(S) 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 os +import subprocess +import sys + +class piglit_cmd: + def __init__(self, base_dir, from_source): + self.base_dir = base_dir + self.from_source = from_source +
Re: [Piglit] [PATCH 1/2] framework/dmesg.py: add a filtering mechanism
On Wednesday, April 30, 2014 12:20:31 Ilia Mirkin wrote: On Wed, Apr 30, 2014 at 12:12 PM, Thomas Wood thomas.w...@intel.com wrote: Only update the test status if at least one of the lines in the dmesg output matches the given regular expression. Would be nice to provide a mechanism to set this on the cmdline too, but not required as part of this change. Just a thought. Signed-off-by: Thomas Wood thomas.w...@intel.com --- framework/dmesg.py | 11 +++ 1 file changed, 11 insertions(+) diff --git a/framework/dmesg.py b/framework/dmesg.py index 3af8496..78b8d46 100644 --- a/framework/dmesg.py +++ b/framework/dmesg.py @@ -53,6 +53,7 @@ class LinuxDmesg(object): Create a dmesg instance self._last_message = None self._new_messages = [] +self.regex = None; remove the semicolon, this isn't C :) # Populate self.dmesg initially, otherwise the first test will always # be full of dmesg crud. @@ -101,6 +102,16 @@ class LinuxDmesg(object): # if update_dmesg() found new entries replace the results of the test # and subtests if self._new_messages: + +if (self.regex is not None): No need for parens. Also, you can just do if self.regex: Since RE objects will implicitly evaluate to true +found = False +for line in self._new_messages: +if self.regex.search(line) is not None: Same deal here -- no need for is not None -- match objects are implicitly true. (Which is what .search() returns IIRC.) +found = True +break +if not found: +return result If you're a fan of fancy python, you can use the for/else construct and write this as: for line in self._new_messages: if self.regex.search(line): break else: return result I am a fan of fancy python, we use this construct in piglit a lot. + result['result'] = replace(result['result']) # Replace any subtests -- 1.9.0 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Add basic execution tests for GL_AMD_shader_trinary_minmax.
There are a bunch of generated tests for this extension (in generated_tests/spec/AMD_shader_trinary_minmax/). Since these are specifically testing cases with constants, I'd rename these mid3-with-constants.shader_test. On 04/30/2014 02:28 AM, Petri Latvala wrote: Signed-off-by: Petri Latvala petri.latv...@intel.com --- These three tests are very simple tests for GL_AMD_shader_trinary_minmax functions that I used for regression-testing Mesa optimizations when constants are involved in the calls. Tested on Mesa/Haswell, the tests pass. The above text should go in the commit message. Other than that, I think these tests are fine. Reviewed-by: Ian Romanick ian.d.roman...@intel.com I will need someone to push this if it's accepted. tests/all.py | 3 ++ .../execution/max3-basic.shader_test | 50 ++ .../execution/mid3-basic.shader_test | 50 ++ .../execution/min3-basic.shader_test | 50 ++ 4 files changed, 153 insertions(+) create mode 100644 tests/spec/amd_shader_trinary_minmax/execution/max3-basic.shader_test create mode 100644 tests/spec/amd_shader_trinary_minmax/execution/mid3-basic.shader_test create mode 100644 tests/spec/amd_shader_trinary_minmax/execution/min3-basic.shader_test diff --git a/tests/all.py b/tests/all.py index 553ae76..a67e725 100644 --- a/tests/all.py +++ b/tests/all.py @@ -1434,6 +1434,9 @@ spec['AMD_shader_trinary_minmax'] = {} import_glsl_parser_tests(spec['AMD_shader_trinary_minmax'], os.path.join(testsDir, 'spec', 'amd_shader_trinary_minmax'), ['']) +add_shader_test_dir(spec['AMD_shader_trinary_minmax'], +os.path.join(testsDir, 'spec', 'amd_shader_trinary_minmax'), +recursive=True) # Group ARB_point_sprite arb_point_sprite = {} diff --git a/tests/spec/amd_shader_trinary_minmax/execution/max3-basic.shader_test b/tests/spec/amd_shader_trinary_minmax/execution/max3-basic.shader_test new file mode 100644 index 000..be28d7b --- /dev/null +++ b/tests/spec/amd_shader_trinary_minmax/execution/max3-basic.shader_test @@ -0,0 +1,50 @@ +[require] +GLSL = 1.10 +GL_AMD_shader_trinary_minmax + +[vertex shader passthrough] + +[fragment shader] + +#extension GL_AMD_shader_trinary_minmax : require + +uniform float zero; +uniform float one; +uniform float middle; + +float test_all_constants() +{ + return max3(0.0, 1.0, 0.5); +} + +float test_two_constants() +{ + return max3(0.5, one, 0.0); +} + +float test_one_constant() +{ + return max3(one, zero, 0.5); +} + +float test_no_constants() +{ + return max3(middle, one, zero); +} + +void main() +{ + float r = test_all_constants(); + float g = test_two_constants(); + float b = test_one_constant(); + float a = test_no_constants(); + + gl_FragColor = vec4(r, g, b, a); +} + +[test] +uniform float zero 0.0 +uniform float one 1.0 +uniform float middle 0.5 +draw rect -1 -1 2 2 +probe all rgba 1.0 1.0 1.0 1.0 diff --git a/tests/spec/amd_shader_trinary_minmax/execution/mid3-basic.shader_test b/tests/spec/amd_shader_trinary_minmax/execution/mid3-basic.shader_test new file mode 100644 index 000..719f138 --- /dev/null +++ b/tests/spec/amd_shader_trinary_minmax/execution/mid3-basic.shader_test @@ -0,0 +1,50 @@ +[require] +GLSL = 1.10 +GL_AMD_shader_trinary_minmax + +[vertex shader passthrough] + +[fragment shader] + +#extension GL_AMD_shader_trinary_minmax : require + +uniform float zero; +uniform float one; +uniform float middle; + +float test_all_constants() +{ + return mid3(0.0, 1.0, 0.5); +} + +float test_two_constants() +{ + return mid3(0.5, one, 0.0); +} + +float test_one_constant() +{ + return mid3(one, zero, 0.5); +} + +float test_no_constants() +{ + return mid3(middle, one, zero); +} + +void main() +{ + float r = test_all_constants(); + float g = test_two_constants(); + float b = test_one_constant(); + float a = test_no_constants(); + + gl_FragColor = vec4(r, g, b, a); +} + +[test] +uniform float zero 0.0 +uniform float one 1.0 +uniform float middle 0.5 +draw rect -1 -1 2 2 +probe all rgba 0.5 0.5 0.5 0.5 diff --git a/tests/spec/amd_shader_trinary_minmax/execution/min3-basic.shader_test b/tests/spec/amd_shader_trinary_minmax/execution/min3-basic.shader_test new file mode 100644 index 000..3589b8e --- /dev/null +++ b/tests/spec/amd_shader_trinary_minmax/execution/min3-basic.shader_test @@ -0,0 +1,50 @@ +[require] +GLSL = 1.10 +GL_AMD_shader_trinary_minmax + +[vertex shader passthrough] + +[fragment shader] + +#extension GL_AMD_shader_trinary_minmax : require + +uniform float zero; +uniform float one; +uniform float middle; + +float
Re: [Piglit] [PATCH] fixed-oes_compressed_etc2_texture-miptree-failure
Is this problem fixed with Brian's recent commits? On 04/16/2014 08:29 PM, Guo, Johney wrote: - glut config.window_width should be 160 so as to avoid warning message. - fopen ktx texture file should be binary mode - viewport need be reset in each display, since it has changed in glut reshape() function Signed-off-by: infi infidra...@163.com --- tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c | 3 ++- tests/util/piglit_ktx.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c index 59d8748..eeda3cb 100644 --- a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c +++ b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c @@ -289,6 +289,7 @@ piglit_display(void) bool pass = true; glClear(GL_COLOR_BUFFER_BIT); + glViewport(0, 0, window_width, window_height); for (level = 0; level num_levels; ++level) { glUniform2f(level_pixel_size_loc, (float) level_width, @@ -339,7 +340,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN config.supports_gl_es_version = 30; - config.window_width = 150; + config.window_width = 160; config.window_height = 150; config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA; PIGLIT_GL_TEST_CONFIG_END diff --git a/tests/util/piglit_ktx.c b/tests/util/piglit_ktx.c index b60f737..d844540 100644 --- a/tests/util/piglit_ktx.c +++ b/tests/util/piglit_ktx.c @@ -436,7 +436,7 @@ piglit_ktx_read_file(const char *filename) if (self == NULL) goto out_of_memory; - file = fopen(filename, r); + file = fopen(filename, rb); if (file == NULL) goto bad_open; @@ -521,7 +521,7 @@ piglit_ktx_write_file(struct piglit_ktx *self, const char *filename) size_t size_written = 0; bool ok = true; - file = fopen(filename, w); + file = fopen(filename, wb); if (file == NULL) goto bad_open; ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Add basic execution tests for GL_AMD_shader_trinary_minmax.
Petri Latvala petri.latv...@intel.com writes: Signed-off-by: Petri Latvala petri.latv...@intel.com --- These three tests are very simple tests for GL_AMD_shader_trinary_minmax functions that I used for regression-testing Mesa optimizations when constants are involved in the calls. Tested on Mesa/Haswell, the tests pass. I will need someone to push this if it's accepted. Reviewed and pushed. pgpQ5vZGTZdvB.pgp Description: PGP signature ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 3/3] piglit: Add piglit command
On Wed, Apr 30, 2014 at 11:18 AM, Dylan Baker baker.dyla...@gmail.com wrote: On Wednesday, April 30, 2014 10:28:57 Jordan Justen wrote: The piglit command is a wrapper command for the piglit-command.py scripts. For example, running 'piglit run' is equivalent to piglit-run.py. It is installed to $PREFIX/bin/piglit, and will launch the sub-commands either at their installed location in $PREFIX/lib/piglit, or in the source tree. 'piglit help command' will run 'piglit-command.py --help' as expected. 'piglit', 'piglit help' or 'piglit --help' will show the list of possible sub-commands. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com I'm not at all happy with this approach. I would love to see a combined piglit interface, but I'd rather see something using argparse with subcommands and replacing the existing piglit scripts with wrappers for that. Example? Instead of 'piglit run all results', what would you prefer? Anyway, piglit_cmd.py is the source that controls the piglit command, so it can evolve to present something different. This patch seems like a reasonable step which would allow you to then re-implement the unified interface as you see fit. This is a mess that will be hard to maintain. Is it not equivalent to today in terms of maintenance? -Jordan ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 3/3] piglit: Add piglit command
On Wednesday, April 30, 2014 13:42:09 Jordan Justen wrote: On Wed, Apr 30, 2014 at 11:18 AM, Dylan Baker baker.dyla...@gmail.com wrote: On Wednesday, April 30, 2014 10:28:57 Jordan Justen wrote: The piglit command is a wrapper command for the piglit-command.py scripts. For example, running 'piglit run' is equivalent to piglit-run.py. It is installed to $PREFIX/bin/piglit, and will launch the sub-commands either at their installed location in $PREFIX/lib/piglit, or in the source tree. 'piglit help command' will run 'piglit-command.py --help' as expected. 'piglit', 'piglit help' or 'piglit --help' will show the list of possible sub-commands. Signed-off-by: Jordan Justen jordan.l.jus...@intel.com I'm not at all happy with this approach. I would love to see a combined piglit interface, but I'd rather see something using argparse with subcommands and replacing the existing piglit scripts with wrappers for that. Example? Instead of 'piglit run all results', what would you prefer? Anyway, piglit_cmd.py is the source that controls the piglit command, so it can evolve to present something different. This patch seems like a reasonable step which would allow you to then re-implement the unified interface as you see fit. It's not the interface I have a problem with, it's the implementation. This isn't what we want at all. There is zero code here I would want to use, and it creates a situation where the user interface will change, and we're left with unhappy users. This is a mess that will be hard to maintain. Is it not equivalent to today in terms of maintenance? -Jordan ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 0/3] Update piglit install locations
On Wed, Apr 30, 2014 at 10:59 AM, Jose Fonseca jfons...@vmware.com wrote: I was concerned this series will create problems with the package target. The expectation is that the tarball produced by the package target will have precisely the necessary layout to run the piglit testsuite in a different machine (without needing the source tree.) After fixing the issue below, I did try the package target, and it looked reasonable. But, I doubt that I'm testing your concern. Can you check it? But I couldn't even get that far when I tried it here: $ git remote add jljusten git://people.freedesktop.org/~jljusten/piglit $ git checkout piglit-cmd $ cmake -H. -Bbuild/piglit-cmd -DCMAKE_INSTALL_PREFIX=publish/piglit-cmd -G Ninja $ ninja -C build/piglit-cmd $ ninja -C build/piglit-cmd install [...] CMake Error at cmake_install.cmake:73 (FILE): file INSTALL cannot find /home/jfonseca/work/vmware/tests/piglit/piglit. I updated the branch, and I think this should be fixed. Can you re-test it? Thanks, -Jordan ninja: build stopped: subcommand failed. $ ninja -C build/piglit-cmd package ninja: Entering directory `build/piglit-cmd' [1/1] Run CPack packaging tool... FAILED: cd /home/jfonseca/work/vmware/tests/piglit/build/piglit-cmd /usr/bin/cpack --config ./CPackConfig.cmake CPack: Create package using TBZ2 CPack: Install projects CPack: - Install project: piglit CMake Error at /home/jfonseca/work/vmware/tests/piglit/build/piglit-cmd/cmake_install.cmake:73 (FILE): file INSTALL cannot find /home/jfonseca/work/vmware/tests/piglit/piglit. CPack Error: Error when generating package: piglit ninja: build stopped: subcommand failed. I suspect that the problem is that your Patch 3/3 is not safe for out-of-source builds. Jose - Original Message - Move piglit binaries and libraries out of the system paths Add a piglit wrapper command to easily run piglit commands in the new install location git://people.freedesktop.org/~jljusten/piglit piglit-cmd Jordan Justen (3): cmake: Install under separate piglit directory cmake: Add version suffix for install paths piglit: Add piglit command CMakeLists.txt | 43 ++ cmake/piglit_util.cmake | 4 +-- piglit.in | 42 ++ piglit_cmd.py | 96 + 4 files changed, 177 insertions(+), 8 deletions(-) create mode 100755 piglit.in create mode 100755 piglit_cmd.py -- 1.9.2 ___ Piglit mailing list Piglit@lists.freedesktop.org https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/piglitk=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0Ar=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0Am=sEMoRk5w037K%2FLcAKRlZNCrf5qrvHANx7DhcyXuMYxs%3D%0As=946b712461aa3e093ab66ea0402da7d9203cfe3d3f4f2ef8dd91f61462f5adfa ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 3/3] piglit: Add piglit command
On Wed, Apr 30, 2014 at 1:58 PM, Dylan Baker baker.dyla...@gmail.com wrote: On Wednesday, April 30, 2014 13:42:09 Jordan Justen wrote: Anyway, piglit_cmd.py is the source that controls the piglit command, so it can evolve to present something different. This patch seems like a reasonable step which would allow you to then re-implement the unified interface as you see fit. It's not the interface I have a problem with, it's the implementation. This isn't what we want at all. There is zero code here I would want to use, and it creates a situation where the user interface will change, and we're left with unhappy users. So, you are fine with the interface, but it is going to have to change? And, our users (??) will be unhappy if we change the interface, but you want to do something similar, and they'll be okay with that change? And, you have no feedback other than throw it all out and create a single argparsed based thing with a similar interface? That about sum it up? :) In terms of interface changes, I think 'piglit-run.py [args]' to 'piglit run [args]' is a fairly small adjustment. I've really never thought piglit's command interface was particularly bad (or good :), which is why I'm just looking to do the minimal translation here. I do think it is pretty bad the way we install piglit binaries and libraries, so I was just trying to fix that. -Jordan ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 3/3] piglit: Add piglit command
On Wednesday, April 30, 2014 15:21:37 Jordan Justen wrote: On Wed, Apr 30, 2014 at 1:58 PM, Dylan Baker baker.dyla...@gmail.com wrote: On Wednesday, April 30, 2014 13:42:09 Jordan Justen wrote: Anyway, piglit_cmd.py is the source that controls the piglit command, so it can evolve to present something different. This patch seems like a reasonable step which would allow you to then re-implement the unified interface as you see fit. It's not the interface I have a problem with, it's the implementation. This isn't what we want at all. There is zero code here I would want to use, and it creates a situation where the user interface will change, and we're left with unhappy users. So, you are fine with the interface, but it is going to have to change? And, our users (??) will be unhappy if we change the interface, but you want to do something similar, and they'll be okay with that change? Let me rephrase. I'm good with the general idea Let my draw the scenario I'm worried about, people (including our QA team) beginusing this wrapper. We decide that another layer of argparse is simpler and easier to work with. There are minor differences which break users wrapper scripts and they become unhappy. This is exactly what happened when I did the getopt to argparse conversion, because there were subtle differences between the way they worked. I guess what I don't see is the pressing problem that this is solving that we need to land this implementation. I've toyed with argparse a couple of times (I just cleaned up github or I'd have a branch to point you at doh!) Le me be clear here, I like the idea, it's the implementation that concerns me. Particularly because there is the potential for differences, it seems more sensible to me to just develop what we want now, and not worry about it later. And, you have no feedback other than throw it all out and create a single argparsed based thing with a similar interface? That about sum it up? :) In terms of interface changes, I think 'piglit-run.py [args]' to 'piglit run [args]' is a fairly small adjustment. I've really never thought piglit's command interface was particularly bad (or good :), which is why I'm just looking to do the minimal translation here. I do think it is pretty bad the way we install piglit binaries and libraries, so I was just trying to fix that. I've never really thought it was good, I tend to lean toward bad. But, changing the ABI is always tough and I've never felt it worth the uphill battle to make the change. -Jordan signature.asc Description: This is a digitally signed message part. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit