[Piglit] [PATCH] unittests: Skip timeout tests on windows
There is no implementation of the code these tests exercise on windows, so they shouldn't run, these were masked by the bad skip conditions fixed in 701df09b7510aca2a010ad9eaff2e0258e4ea4bc. Signed-off-by: Dylan Baker --- unittests/base_tests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unittests/base_tests.py b/unittests/base_tests.py index 2c3d99b..0f89139 100644 --- a/unittests/base_tests.py +++ b/unittests/base_tests.py @@ -173,6 +173,7 @@ def test_timeout_kill_children(): @attr('slow') +@utils.nose.Skip.platform('win32', is_=True) @utils.nose.Skip.backport(3.3, 'subprocess32') @utils.nose.Skip.binary('sleep') @nt.timed(6) @@ -189,6 +190,7 @@ def test_timeout(): @attr('slow') +@utils.nose.Skip.platform('win32', is_=True) @utils.nose.Skip.backport(3.3, 'subprocess32') @utils.nose.Skip.binary('sleep') @nt.timed(6) @@ -200,6 +202,7 @@ def test_timeout_timeout(): nt.eq_(test.result.result, 'timeout') +@utils.nose.Skip.platform('win32', is_=True) @utils.nose.Skip.backport(3.3, 'subprocess32') @utils.nose.Skip.binary('true') @nt.timed(2) -- 2.9.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] generators: Add extensions requirements to gen_constant_array_size_tests
Reviewed-by: Dave Airlie On 7 July 2016 at 05:31, Dylan Baker wrote: > This fixes int64 failures. > > Signed-off-by: Dylan Baker > --- > generated_tests/gen_constant_array_size_tests.py | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/generated_tests/gen_constant_array_size_tests.py > b/generated_tests/gen_constant_array_size_tests.py > index 8462c02..9c1a9a8 100644 > --- a/generated_tests/gen_constant_array_size_tests.py > +++ b/generated_tests/gen_constant_array_size_tests.py > @@ -87,7 +87,11 @@ class ParserTest(object): > extension requirements that the test has. Returns the empty > list by default. > """ > -return [] > +ret = [] > +if self.__signature.extension: > +ret.append(self.__signature.extension) > + > +return ret > > @abc.abstractmethod > def test_suffix(self): > -- > 2.9.0 > > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] generators: Add extensions requirements to gen_constant_array_size_tests
This fixes int64 failures. Signed-off-by: Dylan Baker --- generated_tests/gen_constant_array_size_tests.py | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/generated_tests/gen_constant_array_size_tests.py b/generated_tests/gen_constant_array_size_tests.py index 8462c02..9c1a9a8 100644 --- a/generated_tests/gen_constant_array_size_tests.py +++ b/generated_tests/gen_constant_array_size_tests.py @@ -87,7 +87,11 @@ class ParserTest(object): extension requirements that the test has. Returns the empty list by default. """ -return [] +ret = [] +if self.__signature.extension: +ret.append(self.__signature.extension) + +return ret @abc.abstractmethod def test_suffix(self): -- 2.9.0 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] arb_gpu_shader_int64: add test generation to standard testing template
Quoting Ian Romanick (2016-07-05 15:31:11) > It looks like none of the compiler tests have GL_ARB_gpu_shader_int64 in > the requirements section... so now I get ~400 spurious failures. :( I have a patch that I think fixes this. I'm running it through Jenkins now to be sure, I'll send it to the list if everything looks good. Dylan signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] framework: Read test files as utf-8
Quoting Jussi Kukkonen (2016-07-06 03:25:28) > Make sure test files are always considered utf-8 to avoid a > UnicodeDecodeError when e.g. locale is unset. > > This requires using io.open() as python2 open() does not support > "encoding". The upside of this is that same code paths should now work > for both python2 and python3. > > Signed-off-by: Jussi Kukkonen > --- > framework/test/glsl_parser_test.py | 11 +++ > framework/test/shader_test.py | 11 +++ > 2 files changed, 6 insertions(+), 16 deletions(-) > > diff --git a/framework/test/glsl_parser_test.py > b/framework/test/glsl_parser_test.py > index cd1693c..df08672 100644 > --- a/framework/test/glsl_parser_test.py > +++ b/framework/test/glsl_parser_test.py > @@ -26,7 +26,7 @@ from __future__ import ( > ) > import os > import re > - > +import io > import six > > from framework import exceptions > @@ -98,13 +98,8 @@ class GLSLParserTest(FastSkipMixin, PiglitBaseTest): > # Parse the config file and get the config section, then write this > # section to a StringIO and pass that to ConfigParser > try: > -with open(filepath, 'r') as testfile: > -# Python 2 returns a bytes instance, but python 3 returns str > -# (unicode) instance. > -if six.PY2: > -testfile = testfile.read().decode('utf-8') > -elif six.PY3: > -testfile = testfile.read() > +with io.open(filepath, mode='r', encoding='utf-8') as testfile: > +testfile = testfile.read() > config = self.__parser(testfile, filepath) > command = self.__get_command(config, filepath) > except GLSLParserInternalError as e: > diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py > index 4fb33a0..f3c945c 100644 > --- a/framework/test/shader_test.py > +++ b/framework/test/shader_test.py > @@ -27,8 +27,7 @@ from __future__ import ( > absolute_import, division, print_function, unicode_literals > ) > import re > - > -import six > +import io > > from framework import exceptions > from .opengl import FastSkipMixin > @@ -60,14 +59,10 @@ class ShaderTest(FastSkipMixin, PiglitBaseTest): > # cost. The first one looks for the start of the config block or > raises > # an exception. The second looks for the GL version or raises an > # exception > -with open(filename, 'r') as shader_file: > +with io.open(filename, mode='r', encoding='utf-8') as shader_file: > # The mock in python 3.3 doesn't support readlines(), so use > # read().split() as a workaround > -if six.PY3: > -lines = (l for l in shader_file.read().split('\n')) > -elif six.PY2: > -lines = (l.decode('utf-8') for l in > - shader_file.read().split(b'\n')) > +lines = (l for l in shader_file.read().split('\n')) > > # Find the config section > for line in lines: > -- > 2.8.1 > > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/piglit Also, there are some unittests that were broken by your patch, I've gone ahead and fixed them and squashed them into your changes and pushed this. Thanks for doing this. Reviewed-by: Dylan Baker signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] Nearly finished: shader_runner running THOUSANDS of tests per process
Quoting Marek Olšák (2016-07-04 16:39:48) > On Fri, May 27, 2016 at 7:53 PM, Dylan Baker wrote: > > Quoting Marek Olšák (2016-04-16 15:16:34) > >> Hi, > >> > >> This makes shader_runner very fast. The expected result is 40% > >> decrease in quick.py running time, or a 12x faster piglit run if you > >> run shader tests alone. > >> > >> Branch: > >> https://cgit.freedesktop.org/~mareko/piglit/log/?h=shader-runner > >> > >> Changes: > >> > >> 1) Any number of test files can be specified as command-line > >> parameters. Those command lines can be insanely long. > >> > >> 2) shader_runner can re-create the window & GL context if test > >> requirements demand different settings when going from one test to > >> another. > >> > >> 3) all.py generates one shader_runner instance per group of tests > >> (usually one or two directories - tests and generated_tests). > >> Individual tests are reported as subtests. > >> > >> The shader_runner part is done. The python part needs more work. > >> > >> > >> What's missing: > >> > >> Handling of crashes. If shader_runner crashes: > >> - The crash is not shown in piglit results (other tests with subtests > >> already have the same behavior) > >> - The remaining tests will not be run. > >> > >> The ShaderTest python class has the list of all files and should be > >> able to catch a crash, check how many test results have been written, > >> and restart shader_runner with the remaining tests. > >> > >> shader_runner prints TEST %i: and then the subtest result. %i is the > >> i-th file in the list. Python can parse that and re-run shader_runner > >> with the first %i tests removed. (0..%i-1 -> parse subtest results; %i > >> -> crash; %i+1.. -> run again) > >> > >> > >> I'm by no means a python expert, so here's an alternative solution (for > >> me): > >> - Catch crash signals in shader_runner. > >> - In the single handler, re-run shader_runner with the remaining tests. > >> > >> Opinions welcome, > >> > >> Marek > >> ___ > >> Piglit mailing list > >> Piglit@lists.freedesktop.org > >> https://lists.freedesktop.org/mailman/listinfo/piglit > > > > Hey Marek, > > > > I'd picked this up and was finishing it up, I have a branch on my github > > (https://github.com/dcbaker/piglit wip/multi-shader_runner), I'm just > > trying to make sure we're not duplicating effort. > > Hi, > > What's the current state of this please? > > Do you need shader_runner to be able to recover from crashes or does > the framework handle them already? > > Marek Sorry for the late reply, it was a holiday here in the US, I've set up the framework to recover from them. My assumption was that this would be more portable than C, since we would probably need windows specific code and linux specific code. I was planning to pick this up again today, I've had other things that needed to be solved first, but basically I'm down to the bug squashing and patch ordering stage, plus handling a few corner cases (there are a couple of extensions that apply to GLES and to desktop GL). Dylan signature.asc Description: signature ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] generators/gen_vs_in_fp64: Different VBO values per vertex
Before, in every drawing we were having the same VBO values per vertex to be compared against the values in the uniforms. Now, we also have different values per vertex so we can be sure that it is truly its own data. Signed-off-by: Andres Gomez --- .../gen_vs_in_fp64/columns.shader_test.mako| 41 - .../gen_vs_in_fp64/regular.shader_test.mako| 43 +- 2 files changed, 49 insertions(+), 35 deletions(-) diff --git a/generated_tests/templates/gen_vs_in_fp64/columns.shader_test.mako b/generated_tests/templates/gen_vs_in_fp64/columns.shader_test.mako index 2dfb723..f094a03 100644 --- a/generated_tests/templates/gen_vs_in_fp64/columns.shader_test.mako +++ b/generated_tests/templates/gen_vs_in_fp64/columns.shader_test.mako @@ -48,7 +48,9 @@ GLSL >= ${glsl} #extension GL_ARB_vertex_attrib_64bit : require % endif -uniform ${mat.name} expected; +% for vidx in range(4): + uniform ${mat.name} expected${vidx}; +% endfor in ${mat.name} value; in vec3 piglit_vertex; @@ -59,15 +61,18 @@ out vec4 fs_color; void main() { - gl_Position = vec4(piglit_vertex, 1.0); - % for idx, column in enumerate(columns): -% if column == 1: - if (value[${idx}] != expected[${idx}]) { -fs_color = RED; -return; - } - ## XXX: should we break here? -% endif + gl_Position = vec4(piglit_vertex.x, piglit_vertex.y, 0.0, 1.0); + % for vidx, vertex in enumerate(['-1.0', '0.0', '1.0', '2.0']): +if (piglit_vertex.z == ${vertex}) { +% for idx, column in enumerate(columns): + % if column == 1: +if (value[${idx}] != expected${vidx}[${idx}]) { +fs_color = RED; +return; +} + % endif +% endfor +} % endfor fs_color = GREEN; } @@ -90,11 +95,11 @@ piglit_vertex/float/vec3\ % endfor % for d in range(len(dvalues)): - % for vertex in ('-1.0 -1.0 0.0', ' 1.0 -1.0 0.0', ' 1.0 1.0 0.0', '-1.0 1.0 0.0'): + % for vidx, vertex in enumerate(['-1.0 -1.0 -1.0', ' 1.0 -1.0 0.0', ' 1.0 1.0 1.0', '-1.0 1.0 2.0']): ${vertex} \ % for i in range(mat.columns): % for j in range(mat.rows): -${dvalues[(d + i * mat.rows + j) % len(dvalues)]} \ +${dvalues[(d + i * mat.rows + j + vidx) % len(dvalues)]} \ % endfor \ % endfor @@ -105,13 +110,15 @@ ${dvalues[(d + i * mat.rows + j) % len(dvalues)]} \ [test] % for d in range(len(dvalues)): - uniform ${mat.name} expected\ - % for i in range(mat.columns): -% for j in range(mat.rows): - ${dvalues[(d + i * mat.rows + j) % len(dvalues)]}\ + % for vidx in range(4): +uniform ${mat.name} expected${vidx}\ +% for i in range(mat.columns): + % for j in range(mat.rows): +${dvalues[(d + i * mat.rows + j + vidx) % len(dvalues)]}\ + % endfor % endfor - % endfor + % endfor clear color 0.0 0.0 1.0 0.0 clear draw arrays GL_TRIANGLE_FAN ${d * 4} 4 diff --git a/generated_tests/templates/gen_vs_in_fp64/regular.shader_test.mako b/generated_tests/templates/gen_vs_in_fp64/regular.shader_test.mako index b6fab62..5620cbe 100644 --- a/generated_tests/templates/gen_vs_in_fp64/regular.shader_test.mako +++ b/generated_tests/templates/gen_vs_in_fp64/regular.shader_test.mako @@ -50,7 +50,9 @@ GL_MAX_VERTEX_ATTRIBS >= ${num_vs_in} % endif % for idx, in_type in enumerate(in_types): - uniform ${in_type.name} expected${idx}${'[{}]'.format(arrays[idx]) if arrays[idx] - 1 else ''}; + % for vidx in range(4): +uniform ${in_type.name} expected${idx}${vidx}${'[{}]'.format(arrays[idx]) if arrays[idx] - 1 else ''}; + % endfor % endfor % for idx, in_type in enumerate(in_types): in ${in_type.name} value${idx}${'[{}]'.format(arrays[idx]) if arrays[idx] - 1 else ''}; @@ -63,13 +65,16 @@ out vec4 fs_color; void main() { -gl_Position = vec4(piglit_vertex, 1.0); -% for idx, in_type in enumerate(in_types): -if (value${idx} != expected${idx}) { -fs_color = RED; -return; -} -## XXX: should this have a break? +gl_Position = vec4(piglit_vertex.x, piglit_vertex.y, 0.0, 1.0); +% for vidx, vertex in enumerate(['-1.0', '0.0', '1.0', '2.0']): + if (piglit_vertex.z == ${vertex}) { +% for idx, in_type in enumerate(in_types): + if (value${idx} != expected${idx}${vidx}) { + fs_color = RED; + return; + } +% endfor + } % endfor fs_color = GREEN; } @@ -101,7 +106,7 @@ void main() % endif % for d in range(len(gl_types_values['double'])): - % for vertex in ('-1.0 -1.0 0.0', ' 1.0 -1.0 0.0', ' 1.0 1.0 0.0', '-1.0 1.0 0.0'): + % for vidx, vertex in enumerate(['-1.0 -1.0 -1.0', ' 1.0 -1.0 0.0', ' 1.0 1.0 1.0', '-1.0 1.0 2.0']): % for idx, in_type in enumerate(in_types): % if idx == position_order - 1: ${vertex} \ @@ -109,7 +114,7 @@ void main() % for i in range(arrays[idx]): % for j in range(in_type.
[Piglit] [PATCH] framework: Read test files as utf-8
Make sure test files are always considered utf-8 to avoid a UnicodeDecodeError when e.g. locale is unset. This requires using io.open() as python2 open() does not support "encoding". The upside of this is that same code paths should now work for both python2 and python3. Signed-off-by: Jussi Kukkonen --- framework/test/glsl_parser_test.py | 11 +++ framework/test/shader_test.py | 11 +++ 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/framework/test/glsl_parser_test.py b/framework/test/glsl_parser_test.py index cd1693c..df08672 100644 --- a/framework/test/glsl_parser_test.py +++ b/framework/test/glsl_parser_test.py @@ -26,7 +26,7 @@ from __future__ import ( ) import os import re - +import io import six from framework import exceptions @@ -98,13 +98,8 @@ class GLSLParserTest(FastSkipMixin, PiglitBaseTest): # Parse the config file and get the config section, then write this # section to a StringIO and pass that to ConfigParser try: -with open(filepath, 'r') as testfile: -# Python 2 returns a bytes instance, but python 3 returns str -# (unicode) instance. -if six.PY2: -testfile = testfile.read().decode('utf-8') -elif six.PY3: -testfile = testfile.read() +with io.open(filepath, mode='r', encoding='utf-8') as testfile: +testfile = testfile.read() config = self.__parser(testfile, filepath) command = self.__get_command(config, filepath) except GLSLParserInternalError as e: diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py index 4fb33a0..f3c945c 100644 --- a/framework/test/shader_test.py +++ b/framework/test/shader_test.py @@ -27,8 +27,7 @@ from __future__ import ( absolute_import, division, print_function, unicode_literals ) import re - -import six +import io from framework import exceptions from .opengl import FastSkipMixin @@ -60,14 +59,10 @@ class ShaderTest(FastSkipMixin, PiglitBaseTest): # cost. The first one looks for the start of the config block or raises # an exception. The second looks for the GL version or raises an # exception -with open(filename, 'r') as shader_file: +with io.open(filename, mode='r', encoding='utf-8') as shader_file: # The mock in python 3.3 doesn't support readlines(), so use # read().split() as a workaround -if six.PY3: -lines = (l for l in shader_file.read().split('\n')) -elif six.PY2: -lines = (l.decode('utf-8') for l in - shader_file.read().split(b'\n')) +lines = (l for l in shader_file.read().split('\n')) # Find the config section for line in lines: -- 2.8.1 ___ Piglit mailing list Piglit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/piglit