[Piglit] [PATCH] arb_spec_shader_atomic_counters/unique-id: improve check print
The frequencies are kept in the [start, end] range by mapping onto [0, end-start]. However when printing the observed values, don't subtract the starting value, to avoid confusion. Signed-off-by: Ilia Mirkin --- Spent a ton of time trying to figure out why it was seeing -100... turns out it was seeing 0, which makes (very little) more sense. tests/spec/arb_shader_atomic_counters/unique-id.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/spec/arb_shader_atomic_counters/unique-id.c b/tests/spec/arb_shader_atomic_counters/unique-id.c index eee4f2c..e264bf0 100644 --- a/tests/spec/arb_shader_atomic_counters/unique-id.c +++ b/tests/spec/arb_shader_atomic_counters/unique-id.c @@ -57,11 +57,12 @@ check(int dx, int dy, uint32_t start_value, uint32_t end_value) for (y = 0; y < L; y += dy) { for (x = 0; x < L; x += dx) { -uint32_t v = pixels[y][x] - base; +uint32_t p = pixels[y][x]; +uint32_t v = p - base; if (v >= size) { printf("Probe value at (%d, %d)\n", x, y); -printf(" Observed: 0x%08x\n", v); +printf(" Observed: 0x%08x\n", p); printf(" Value outside expected window.\n"); free(frequency); return false; @@ -69,7 +70,7 @@ check(int dx, int dy, uint32_t start_value, uint32_t end_value) if (size > 1 && frequency[v]++) { printf("Probe value at (%d, %d)\n", x, y); -printf(" Observed: 0x%08x\n", v); +printf(" Observed: 0x%08x\n", p); printf(" Value not unique.\n"); free(frequency); return false; -- 2.0.4 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [RFC PATCH] summary.py: escape \ from Windows results when creating folders on Linux
Seemingly this is sufficient for a Windows piglit run/result file to be ran under Linux and the correct directory structure (and html) to be generated. Unfortunately my python-fu is a bit short so I'm not sure if(how much) this will backfire when used on Windows with either Linux or Windows result file. Cc: Dylan Baker Signed-off-by: Emil Velikov --- framework/summary.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/summary.py b/framework/summary.py index f4fd80d..6dc2b07 100644 --- a/framework/summary.py +++ b/framework/summary.py @@ -482,7 +482,7 @@ class Summary: # Then build the individual test results for key, value in each.tests.iteritems(): -html_path = path.join(destination, name, escape_filename(key + ".html")) +html_path = path.join(destination, name, escape_filename(key.replace('\\', '/') + ".html")) temp_path = path.dirname(html_path) if value['result'] not in exclude: -- 2.1.3 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH RFC v3] arb_shader_precision: add tests for floating point precision
I have a few nitpicky comments, I didn't look at every example, but most of them probably apply to all 3 templates. This requires GL 4.00, so it should require GLSL 400 right? Ian? If this does require 4.00 then you should also test with fp64 data from builtin_function_fp64.py On Friday, November 21, 2014 04:37:05 PM Micah Fedke wrote: > This generated_tests script creates a suite of tests that measure the > floating point precision of most GLSL built-ins, according to > ARB_shader_precision. Test vectors come from builtin_function.py, but > are filtered down to avoid non-float types. > > These tests are reporting precision errors in ceil, cross, mod, > op-assign-div, op-assign-mult, div, mult, reflect and refract on > Ivybridge. > > --- > > Updates since the previous RFC (v2): > > Addressed comments from Dylan Baker > - discarded the procedural string concatenation and implemented Mako > templates > Addressed comments from Chris Forbes (off-list) > - generated files are now placed in > generated_tests/spec/arb_shader_precision/ > - updated the description in the generator script > Additional fixes > - the conditional that selects the comparison type (multi-value or >single-value style) was incorrectly including the single-valued >distance-float-float in the multi-value branch > > Concerns about the utility of the test vectors supplied by > builtin_function.py > still remain. I cannot currently see how to add tests to the test_suite dict > generated by builtin_function.py in a clean manner - one needs to either > hammer > out each test by hand (which is error prone considering the compounding > nature > of the parameters) or gain access to/copy the private generator functions > within builtin_function.py. builtin_function.py could be turned into a class, > or it could be modified to accept operators and/or test vectors from an > external file, however either option threatens to modify something many tests > rely on, so discussion on this point is welcome. > > Note: I am new to the project and don't have commit access. > > generated_tests/CMakeLists.txt | 7 +- > generated_tests/gen_shader_precision_tests.py | 151 ++ > generated_tests/shader_precision_templates/fs.mako | 160 +++ > generated_tests/shader_precision_templates/gs.mako | 173 > + > generated_tests/shader_precision_templates/vs.mako | 169 > 5 files changed, 659 insertions(+), 1 deletion(-) > create mode 100644 generated_tests/gen_shader_precision_tests.py > create mode 100644 generated_tests/shader_precision_templates/fs.mako > create mode 100644 generated_tests/shader_precision_templates/gs.mako > create mode 100644 generated_tests/shader_precision_templates/vs.mako > > diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt > index 6d27b3e..3ccf69c 100644 > --- a/generated_tests/CMakeLists.txt > +++ b/generated_tests/CMakeLists.txt > @@ -91,6 +91,10 @@ piglit_make_generated_tests( > constant_array_size_tests_fp64.list > gen_constant_array_size_tests_fp64.py > builtin_function_fp64.py) > +piglit_make_generated_tests( > + shader_precision_tests.list > + gen_shader_precision_tests.py > + builtin_function.py) The templates should be added as dependencies, no? > > # Add a "gen-tests" target that can be used to generate all the > # tests without doing any other compilation. > @@ -113,4 +117,5 @@ add_custom_target(gen-tests ALL > uniform-initializer_tests.list > interpolation-qualifier-built-in-variable.list > builtin_uniform_tests_fp64.list > - constant_array_size_tests_fp64.list) > + constant_array_size_tests_fp64.list > + shader_precision_tests.list) Stray space? > diff --git a/generated_tests/gen_shader_precision_tests.py > b/generated_tests/gen_shader_precision_tests.py > new file mode 100644 > index 000..c93f811 > --- /dev/null > +++ b/generated_tests/gen_shader_precision_tests.py > @@ -0,0 +1,151 @@ > +# coding=utf-8 > +# > +# 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 (including the next > +# paragraph) 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
[Piglit] [PATCH RFC v3] arb_shader_precision: add tests for floating point precision
This generated_tests script creates a suite of tests that measure the floating point precision of most GLSL built-ins, according to ARB_shader_precision. Test vectors come from builtin_function.py, but are filtered down to avoid non-float types. These tests are reporting precision errors in ceil, cross, mod, op-assign-div, op-assign-mult, div, mult, reflect and refract on Ivybridge. --- Updates since the previous RFC (v2): Addressed comments from Dylan Baker - discarded the procedural string concatenation and implemented Mako templates Addressed comments from Chris Forbes (off-list) - generated files are now placed in generated_tests/spec/arb_shader_precision/ - updated the description in the generator script Additional fixes - the conditional that selects the comparison type (multi-value or single-value style) was incorrectly including the single-valued distance-float-float in the multi-value branch Concerns about the utility of the test vectors supplied by builtin_function.py still remain. I cannot currently see how to add tests to the test_suite dict generated by builtin_function.py in a clean manner - one needs to either hammer out each test by hand (which is error prone considering the compounding nature of the parameters) or gain access to/copy the private generator functions within builtin_function.py. builtin_function.py could be turned into a class, or it could be modified to accept operators and/or test vectors from an external file, however either option threatens to modify something many tests rely on, so discussion on this point is welcome. Note: I am new to the project and don't have commit access. generated_tests/CMakeLists.txt | 7 +- generated_tests/gen_shader_precision_tests.py | 151 ++ generated_tests/shader_precision_templates/fs.mako | 160 +++ generated_tests/shader_precision_templates/gs.mako | 173 + generated_tests/shader_precision_templates/vs.mako | 169 5 files changed, 659 insertions(+), 1 deletion(-) create mode 100644 generated_tests/gen_shader_precision_tests.py create mode 100644 generated_tests/shader_precision_templates/fs.mako create mode 100644 generated_tests/shader_precision_templates/gs.mako create mode 100644 generated_tests/shader_precision_templates/vs.mako diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt index 6d27b3e..3ccf69c 100644 --- a/generated_tests/CMakeLists.txt +++ b/generated_tests/CMakeLists.txt @@ -91,6 +91,10 @@ piglit_make_generated_tests( constant_array_size_tests_fp64.list gen_constant_array_size_tests_fp64.py builtin_function_fp64.py) +piglit_make_generated_tests( + shader_precision_tests.list + gen_shader_precision_tests.py + builtin_function.py) # Add a "gen-tests" target that can be used to generate all the # tests without doing any other compilation. @@ -113,4 +117,5 @@ add_custom_target(gen-tests ALL uniform-initializer_tests.list interpolation-qualifier-built-in-variable.list builtin_uniform_tests_fp64.list - constant_array_size_tests_fp64.list) + constant_array_size_tests_fp64.list + shader_precision_tests.list) diff --git a/generated_tests/gen_shader_precision_tests.py b/generated_tests/gen_shader_precision_tests.py new file mode 100644 index 000..c93f811 --- /dev/null +++ b/generated_tests/gen_shader_precision_tests.py @@ -0,0 +1,151 @@ +# coding=utf-8 +# +# 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 (including the next +# paragraph) 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. + +# Generate a set of shader_runner tests for overloaded versions of every +# built-in function specified in arb_shader_precision, based on the test +# vectors computed by builtin_function.py, and structured according to the mako +# templates in shader_precision_templates
Re: [Piglit] [PATCH 2/2] framework/backends/junit: Prepend command line to stdout.
On Friday, November 21, 2014 09:11:32 PM Jose Fonseca wrote: > On 21/11/14 20:27, Dylan Baker wrote: > > On Friday, November 21, 2014 07:37:20 PM Jose Fonseca wrote: > >> Dylan, > >> > >> I'm not sure you guys are still using the junit backend regularly or > >> not. Would be the change below OK? > >> > >> BTW, I finished transition all my jenkins' piglit jobs to the junit > >> backend. > >> > >> Feel free to remove the summary-junit code, or let me know if you rather > >> I do it. > > > > Would you do it please? > > Will do. > > > > >> > >> Jose > > > > We are still using it regularly, Mark is our guy that runs the Jenkins > > stuff, I've CC'd him to see what he thinks. > > > >> > >> On 20/11/14 12:06, jfons...@vmware.com wrote: > >>> From: José Fonseca > >>> > >>> Showing the command line of the test is quite useful, specially when > >>> diagnosing failures. > >>> > >>> Unfortunately JUnit format allows no better place to have it other than > >>> stdout/stderr. > >>> --- > >>>framework/backends/junit.py | 3 +++ > >>>1 file changed, 3 insertions(+) > >>> > >>> diff --git a/framework/backends/junit.py b/framework/backends/junit.py > >>> index 1c27e98..59d06c6 100644 > >>> --- a/framework/backends/junit.py > >>> +++ b/framework/backends/junit.py > >>> @@ -144,6 +144,9 @@ class JUnitBackend(FileBackend): > >>>out = etree.SubElement(element, 'system-out') > >>>out.text = data['out'] > >>> > >>> +# Prepend command line to stdout > >>> +out.text = data['command'] + '\n' + out.text > >>> + > > > > If Marks okay with it. > > > > Otherwise I sent out a series a couple months ago titled > > 'Junit backend: add more data to the junit output', the last patch of > > that series puts the command in the failure message attribute, of > > course, that means only failures will have the command attached. > > I missed that. I'll take a look. > > I don't feel strongly either way -- command line just on failures or all > the time. > > Jose Doesn't matter to me either. Whatever is more useful is fine. > > > > >>># Add stderr > >>>err = etree.SubElement(element, 'system-err') > >>>err.text = data['err'] > >>> > >> > >> ___ > >> Piglit mailing list > >> Piglit@lists.freedesktop.org > >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_piglit&d=AAIFAw&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=zfmBZnnVGHeYde45pMKNnVyzeaZbdIqVLprmZCM2zzE&m=kR9Scj4Mn-JTqAxpmjdw7SYS-lti9vjSS3Rw7yIUKXY&s=2DpWFsEjjBxILEoiJCDSj3CJ2u8tglXcS4Oh-1FhZqY&e= > >> > 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] Junit backend: add more data to the junit output
On 03/10/14 00:59, Dylan Baker wrote: This adds additional data to the junit output, specifically it adds the command used to run a test to the junit output if the test fails. ___ Piglit mailing list Piglit@lists.freedesktop.org https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/piglit&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=EnAhp9FGvJPMS0ru0EUCoOvDXURwGua3YSQnULfr08k%3D%0A&s=c27e55a2b191dcb8fd11efac69cc761c7aef6833c6295992056f7538673233d9 Patch 1-2 looks good. Concerning patch 3, I don't feel strongly either way. On one hand, most of the cases I want to know the command line is indeed when the test fails. On the other hand, it might be better to have the command line handy anyway, just in case (e.g, if you want to run a test that is passing that's related to the one failing). Either way, this is Reviewed-by: Jose Fonseca Jose PS: Junit is quite restrictive. I really wished that Jenkins had a less quirky format, and didn't make so much assumptions about . One of the things I hate the most is how the test tree gets all screwed up, instead of being grouped hierarchically. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] framework/summary/junit: Remove.
From: José Fonseca Deprecated by JUnit backend. Tested with json backend + summary html to ensure nothing's broken. --- framework/junit.py| 377 -- framework/programs/summary.py | 111 - piglit| 4 - piglit-summary-junit.py | 28 4 files changed, 520 deletions(-) delete mode 100644 framework/junit.py delete mode 100755 piglit-summary-junit.py diff --git a/framework/junit.py b/framework/junit.py deleted file mode 100644 index 7916731..000 --- a/framework/junit.py +++ /dev/null @@ -1,377 +0,0 @@ -### -# -# Copyright 2010-2011 VMware, Inc. -# All Rights Reserved. -# -# 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, sub license, 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 (including the -# next paragraph) 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 NON-INFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS AND/OR ITS SUPPLIERS 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. -# -### - -"""Testing framework that assists invoking external programs and outputing -results in ANT's junit XML format, used by Jenkins-CI.""" - - -import locale -import optparse -import os.path -import shutil -import string -import sys -import time - - -__all__ = [ -'Error', -'Failure', -'Main', -'Report', -'Test', -'TestSuite', -] - - -class Failure(Exception): -pass - - -class Error(Exception): -pass - - -# Not all valid Unicode characters are valid XML. -# See http://www.w3.org/TR/xml/#charsets -_validXmlAscii = ''.join([((_c >= 0x20 and _c < 0x80) or _c in (0x9, 0xA, 0xD)) and chr(_c) or '?' for _c in range(256)]) -_validXmlUnicode = {} -for _c in range(0x20): -if _c not in (0x9, 0xA, 0xD): -_validXmlUnicode[_c] = ord('?') -del _c - - -def escape(s): -'''Escape and encode a XML string.''' -if isinstance(s, unicode): -s = s.translate(_validXmlUnicode) -else: -#s = s.decode(locale.getpreferredencoding(), 'replace') -s = s.translate(_validXmlAscii) -s = s.decode('ascii', 'ignore') -s = s.replace('&', '&') -s = s.replace('<', '<') -s = s.replace('>', '>') -s = s.replace('"', '"') -s = s.replace("'", ''') -s = s.encode('UTF-8') -return s - - -# same as string.printable, but without '\v\f' -_printable = string.digits + string.letters + string.punctuation + ' \t\n\r' -_printable = ''.join([chr(_c) in _printable and chr(_c) or '?' for _c in range(256)]) -del _c - - -class Report: -"""Write test results in ANT's junit XML format. - -See also: -- https://github.com/jenkinsci/jenkins/tree/master/test/src/test/resources/hudson/tasks/junit -- http://www.junit.org/node/399 -- http://wiki.apache.org/ant/Proposals/EnhancedTestReports -""" - -def __init__(self, filename, time = True): -self.path = os.path.dirname(os.path.abspath(filename)) -if not os.path.exists(self.path): -os.makedirs(self.path) - -self.stream = open(filename, 'wt') -self.testsuites = [] -self.inside_testsuite = False -self.inside_testcase = False -self.time = time - -def start(self): -self.stream.write('\n') -self.stream.write('\n') - -def stop(self): -if self.inside_testcase: -self.stream.write('\n') -self.inside_testcase = False -if self.inside_testsuite: -self.stream.write('\n') -self.inside_testsuite = False -self.stream.write('\n') -self.stream.flush() -self.stream.close() - -def escapeName(self, name): -'''Dots are special for junit, so escape them with underscores.''' -name = name.replace('.', '_') -return name - -def startSuite(self, name): -self.testsuites.append(self.escapeName(name)) - -def stopSuite(self): -if self.inside_testsuite: -self.stream.write('\n') -self.inside_testsuite = False -self.testsuites.pop(-1) - -def startCas
Re: [Piglit] [PATCH 2/2] framework/backends/junit: Prepend command line to stdout.
On 21/11/14 20:27, Dylan Baker wrote: On Friday, November 21, 2014 07:37:20 PM Jose Fonseca wrote: Dylan, I'm not sure you guys are still using the junit backend regularly or not. Would be the change below OK? BTW, I finished transition all my jenkins' piglit jobs to the junit backend. Feel free to remove the summary-junit code, or let me know if you rather I do it. Would you do it please? Will do. Jose We are still using it regularly, Mark is our guy that runs the Jenkins stuff, I've CC'd him to see what he thinks. On 20/11/14 12:06, jfons...@vmware.com wrote: From: José Fonseca Showing the command line of the test is quite useful, specially when diagnosing failures. Unfortunately JUnit format allows no better place to have it other than stdout/stderr. --- framework/backends/junit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/backends/junit.py b/framework/backends/junit.py index 1c27e98..59d06c6 100644 --- a/framework/backends/junit.py +++ b/framework/backends/junit.py @@ -144,6 +144,9 @@ class JUnitBackend(FileBackend): out = etree.SubElement(element, 'system-out') out.text = data['out'] +# Prepend command line to stdout +out.text = data['command'] + '\n' + out.text + If Marks okay with it. Otherwise I sent out a series a couple months ago titled 'Junit backend: add more data to the junit output', the last patch of that series puts the command in the failure message attribute, of course, that means only failures will have the command attached. I missed that. I'll take a look. I don't feel strongly either way -- command line just on failures or all the time. Jose # Add stderr err = etree.SubElement(element, 'system-err') err.text = data['err'] ___ Piglit mailing list Piglit@lists.freedesktop.org https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_piglit&d=AAIFAw&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=zfmBZnnVGHeYde45pMKNnVyzeaZbdIqVLprmZCM2zzE&m=kR9Scj4Mn-JTqAxpmjdw7SYS-lti9vjSS3Rw7yIUKXY&s=2DpWFsEjjBxILEoiJCDSj3CJ2u8tglXcS4Oh-1FhZqY&e= ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] framework/backends/junit: Prepend command line to stdout.
Dylan Baker writes: > On Friday, November 21, 2014 07:37:20 PM Jose Fonseca wrote: >> On 20/11/14 12:06, jfons...@vmware.com wrote: >> > From: José Fonseca >> > >> > Showing the command line of the test is quite useful, specially when >> > diagnosing failures. > > If Marks okay with it. I like this change. I regularly find myself running the other backend manually to get the command. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] framework/backends/junit: Prepend command line to stdout.
On Friday, November 21, 2014 07:37:20 PM Jose Fonseca wrote: > Dylan, > > I'm not sure you guys are still using the junit backend regularly or > not. Would be the change below OK? > > BTW, I finished transition all my jenkins' piglit jobs to the junit backend. > > Feel free to remove the summary-junit code, or let me know if you rather > I do it. Would you do it please? > > Jose We are still using it regularly, Mark is our guy that runs the Jenkins stuff, I've CC'd him to see what he thinks. > > On 20/11/14 12:06, jfons...@vmware.com wrote: > > From: José Fonseca > > > > Showing the command line of the test is quite useful, specially when > > diagnosing failures. > > > > Unfortunately JUnit format allows no better place to have it other than > > stdout/stderr. > > --- > > framework/backends/junit.py | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/framework/backends/junit.py b/framework/backends/junit.py > > index 1c27e98..59d06c6 100644 > > --- a/framework/backends/junit.py > > +++ b/framework/backends/junit.py > > @@ -144,6 +144,9 @@ class JUnitBackend(FileBackend): > > out = etree.SubElement(element, 'system-out') > > out.text = data['out'] > > > > +# Prepend command line to stdout > > +out.text = data['command'] + '\n' + out.text > > + If Marks okay with it. Otherwise I sent out a series a couple months ago titled 'Junit backend: add more data to the junit output', the last patch of that series puts the command in the failure message attribute, of course, that means only failures will have the command attached. > > # Add stderr > > err = etree.SubElement(element, 'system-err') > > err.text = data['err'] > > > > ___ > 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
[Piglit] [PATCH 3/4] utils: add initial WAFFLE_WGL support
This will allow us to use waffle with its upcoming WGL support for Windows. With that done, the final step to removing glut is to convert piglit to use waffle for MacOS. Current implementation does not have input handling/event loop, and as such one needs to pass "-auto" when running individual tests, otherwise the test will abort after being displayed for 8 seconds. Waffle 1.5.0 is the first version that has WGL support. TODO: - Bump the WAFFLE_API_VERSION ? - Add input handling (event_loop). v2: Updated the instructions in the README. v3: Update against upstream Waffle (no API breakage) Signed-off-by: Emil Velikov Reviewed-by: Brian Paul (v1) Signed-off-by: Emil Velikov --- CMakeLists.txt | 7 +- README | 38 +- tests/util/CMakeLists.txt | 5 ++ .../piglit-framework-gl/piglit_wfl_framework.c | 10 +++ .../piglit-framework-gl/piglit_wgl_framework.c | 85 ++ .../piglit-framework-gl/piglit_wgl_framework.h | 29 .../piglit-framework-gl/piglit_winsys_framework.c | 7 ++ 7 files changed, 177 insertions(+), 4 deletions(-) create mode 100644 tests/util/piglit-framework-gl/piglit_wgl_framework.c create mode 100644 tests/util/piglit-framework-gl/piglit_wgl_framework.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f15971..6ba6df8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ if(PIGLIT_USE_WAFFLE) # validates the required version at most once for the lifetime of the # source tree. If someone changes the required version by editing the # CMakeLists, CMake fails to detect the new requirement. - set(WAFFLE_REQUIRED_VERSION "1.3.0") + set(WAFFLE_REQUIRED_VERSION "1.5.0") if(WAFFLE_VERSION VERSION_LESS WAFFLE_REQUIRED_VERSION) message(FATAL_ERROR "Found waffle-${WAFFLE_VERSION}, but " "piglit requires waffle-${WAFFLE_REQUIRED_VERSION}") @@ -128,6 +128,11 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") pkg_check_modules(LIBDRM_INTEL QUIET libdrm_intel) pkg_check_modules(XCB_DRI2 QUIET xcb-dri2) pkg_check_modules(GLPROTO QUIET glproto) +ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + if (PIGLIT_USE_WAFFLE) + set(PIGLIT_HAS_WGL True) + add_definitions(-DPIGLIT_HAS_WGL) + endif() ENDIF() IF(PIGLIT_HAS_GLX) diff --git a/README b/README index 2917c3a..b894db7 100644 --- a/README +++ b/README @@ -144,15 +144,19 @@ http://www.opengl.org/registry/#headers Copy header files to MSVC. C:\Program Files\Microsoft Visual Studio 12.0\VC\include\GL -Download freeglut for MSVC. -http://www.transmissionzero.co.uk/software/freeglut-devel - Install pip. http://www.pip-installer.org/en/latest/installing.html Install python mako. > c:\Python27\Scripts\pip.exe install mako + +2.5.1 GLUT +-- + +Download freeglut for MSVC. +http://www.transmissionzero.co.uk/software/freeglut-devel + Open Visual Studio Command Prompt. Start Menu->All Programs->Visual Studio 2013->Visual Studio Tools->VS2013 x86 Native Tools Command Prompt CD to piglit directory. @@ -172,6 +176,34 @@ File->Exit Build from the Visual Studio Command Prompt. > nmake +2.5.2 Waffle + + +Download waffle for MSVC. +http://www.waffle-gl.org/ + +Open the Command Prompt. +CD to piglit directory. + +Run CMake GUI. + > C:\Program Files\CMake 2.8\bin\cmake-gui.exe . +Configure + - 'Visual Studio 12 2013', or + - 'Visual Studio 12 2013 Win64' + - Use default native compilers +Set these variables in the Advanced view. +Note that the values provided are for reference purposed and may differ on your system. + - PIGLIT_USE_WAFFLE, BOOL, TRUE + - WAFFLE_VERSION, STRING, "1.5.0" + - WAFFLE_INCLUDE_DIRS, PATH, ${waffle_root}\include\waffle + - WAFFLE_LDFLAGS, FILEPATH, ${waffle_root}\lib\waffle-1.lib + - GLEXT_INCLUDE_DIR, PATH, C:\Program Files\Microsoft Visual Studio 12.0\VC\include\GL +Configure +Generate +File->Exit + +Build from the Command Prompt. + > cmake --build . 3. How to run tests --- diff --git a/tests/util/CMakeLists.txt b/tests/util/CMakeLists.txt index 98eedd0..edc8469 100644 --- a/tests/util/CMakeLists.txt +++ b/tests/util/CMakeLists.txt @@ -64,6 +64,11 @@ if(PIGLIT_USE_WAFFLE) piglit-util-waffle.c ) + if(PIGLIT_HAS_WGL) + list(APPEND UTIL_GL_SOURCES + piglit-framework-gl/piglit_wgl_framework.c + ) + endif() if(PIGLIT_HAS_GBM) list(APPEND UTIL_GL_SOURCES piglit-framework-gl/piglit_gbm_framework.c diff --git a/tests/util/piglit-framework-gl/piglit_wfl_framework.c b/tests/util/piglit-framework-gl/piglit_wfl_framework.c index c762b00..75fbacf 100644 --- a/tests/util/piglit-framework-gl/piglit_wfl_framework.c +++ b/tests/util/piglit-framework-gl/
[Piglit] [PATCH 4/4] util/dispatch: move "to waffle or not to waffle" decision in the caller
piglit-dispatch.c is about to get hairy even without this hunk. Also moving the code in piglit-dispatch-init.c will allow us to have a clear visual as we start removing the non-waffle (glut) support. Signed-off-by: Emil Velikov Reviewed-by: Brian Paul Signed-off-by: Emil Velikov --- tests/util/piglit-dispatch-init.c | 77 --- tests/util/piglit-dispatch.c | 62 --- 2 files changed, 72 insertions(+), 67 deletions(-) diff --git a/tests/util/piglit-dispatch-init.c b/tests/util/piglit-dispatch-init.c index b27330e..cc8b684 100644 --- a/tests/util/piglit-dispatch-init.c +++ b/tests/util/piglit-dispatch-init.c @@ -41,6 +41,12 @@ #endif +#if defined(PIGLIT_USE_WAFFLE) +#include +#include "piglit-util-waffle.h" +#include "piglit-framework-gl.h" +#endif + /** * Generated code calls this function if the test tries to use a GL * function that is not supported on the current implementation. @@ -182,6 +188,43 @@ get_core_proc_address(const char *function_name, int gl_10x_version) #endif +#ifdef PIGLIT_USE_WAFFLE +static enum waffle_enum piglit_waffle_dl = WAFFLE_DL_OPENGL; + +/** + * This function is used to retrieve the address of core GL functions + * via the waffle library. + */ +static piglit_dispatch_function_ptr +get_wfl_core_proc(const char *name, int gl_10x_version) +{ + piglit_dispatch_function_ptr func; + + func = (piglit_dispatch_function_ptr)waffle_dl_sym(piglit_waffle_dl, + name); + if (!func) + wfl_log_error(__FUNCTION__); + + return func; +} + +/** + * This function is used to retrieve the address of functions not part of the + * core GL specification via the waffle library. + */ +static piglit_dispatch_function_ptr +get_wfl_ext_proc(const char *name) +{ + piglit_dispatch_function_ptr func; + + func = (piglit_dispatch_function_ptr)waffle_get_proc_address(name); + if (!func) + wfl_log_error(__FUNCTION__); + + return func; +} +#endif + /** * Initialize the GL dispatch mechanism to a default configuration. * @@ -200,11 +243,35 @@ piglit_dispatch_default_init(piglit_dispatch_api api) if (already_initialized) return; - piglit_dispatch_init(api, -get_core_proc_address, -get_ext_proc_address, -default_unsupported, -default_get_proc_address_failure); +#ifdef PIGLIT_USE_WAFFLE + switch (api) { + case PIGLIT_DISPATCH_GL: + piglit_waffle_dl = WAFFLE_DL_OPENGL; + break; + case PIGLIT_DISPATCH_ES1: + piglit_waffle_dl = WAFFLE_DL_OPENGL_ES1; + break; + case PIGLIT_DISPATCH_ES2: + piglit_waffle_dl = WAFFLE_DL_OPENGL_ES2; + break; + } + + if (gl_fw) { + piglit_dispatch_init(api, +get_wfl_core_proc, +get_wfl_ext_proc, +default_unsupported, +default_get_proc_address_failure); + } else +#endif + { + + piglit_dispatch_init(api, +get_core_proc_address, +get_ext_proc_address, +default_unsupported, +default_get_proc_address_failure); + } already_initialized = true; } diff --git a/tests/util/piglit-dispatch.c b/tests/util/piglit-dispatch.c index 4c5c956..90a6dba 100644 --- a/tests/util/piglit-dispatch.c +++ b/tests/util/piglit-dispatch.c @@ -23,12 +23,6 @@ #include "piglit-dispatch.h" #include "piglit-util-gl.h" -#if defined(PIGLIT_USE_WAFFLE) -#include -#include "piglit-util-waffle.h" -#include "piglit-framework-gl.h" -#endif - /* Global state maintained by the Piglit dispatch mechanism: */ /** @@ -86,43 +80,6 @@ check_initialized() exit(1); } -#ifdef PIGLIT_USE_WAFFLE -static enum waffle_enum piglit_waffle_dl = WAFFLE_DL_OPENGL; - -/** - * Generated code calls this function to retrieve the address of a - * core function. - */ -static piglit_dispatch_function_ptr -get_wfl_core_proc(const char *name, int gl_10x_version) -{ - piglit_dispatch_function_ptr func; - - func = (piglit_dispatch_function_ptr)waffle_dl_sym(piglit_waffle_dl, - name); - if (!func) - wfl_log_error(__FUNCTION__); - - return func; -} - -/** - * Generated code calls this function to retrieve the address of a - * core function. - */ -static piglit_dispatch_function_ptr -get_wfl_ext_proc(const char *name) -{ - piglit_dispatch_function_ptr func; - - func = (piglit_dispatch_function_ptr)waffle_get_proc_address(name);
[Piglit] The infamous Waffle WGL support
Hello list, This is my (hopefully) final submission on the topic of converting piglit to use Waffle WGL. With some cleanups (input handling?) to follow some time later. Since the original submission we have dropped the Waffle changes which break the API, and WGL support is now in waffle/master :) I would suspect that Chad will roll a release (1.5.0) within the upcoming week or two, and following that we merge this series. Patches 1&2 are some very trivial cleanups, which I decided to send along ;) A tree with the patches can be found in over at github https://github.com/evelikov/piglit/tree/for-upstream/wgl Cheers, Emil ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 1/4] util: fix comment typo
Signed-off-by: Emil Velikov --- tests/util/piglit-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h index 84e2066..9731c1c 100755 --- a/tests/util/piglit-util.h +++ b/tests/util/piglit-util.h @@ -115,7 +115,7 @@ enum piglit_result { }; /** - * An idividual subtest that makes up part of a test group. + * An individual subtest that makes up part of a test group. */ struct piglit_subtest { /** Name of the subtest as it will appear in the log. */ -- 2.1.3 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH 2/4] utils/glx: remove empty/unused function piglit_framework_fbo_init_glx
Signed-off-by: Emil Velikov --- tests/util/piglit-glx-util.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/tests/util/piglit-glx-util.c b/tests/util/piglit-glx-util.c index 5e3152f..3042dc8 100644 --- a/tests/util/piglit-glx-util.c +++ b/tests/util/piglit-glx-util.c @@ -498,10 +498,3 @@ piglit_glx_get_all_proc_addresses(const struct piglit_glx_proc_reference *proced } } } - -/* Creates a GLX context for rendering into an FBO */ -void -piglit_framework_fbo_init_glx() -{ - -} -- 2.1.3 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH 2/2] framework/backends/junit: Prepend command line to stdout.
Dylan, I'm not sure you guys are still using the junit backend regularly or not. Would be the change below OK? BTW, I finished transition all my jenkins' piglit jobs to the junit backend. Feel free to remove the summary-junit code, or let me know if you rather I do it. Jose On 20/11/14 12:06, jfons...@vmware.com wrote: From: José Fonseca Showing the command line of the test is quite useful, specially when diagnosing failures. Unfortunately JUnit format allows no better place to have it other than stdout/stderr. --- framework/backends/junit.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/backends/junit.py b/framework/backends/junit.py index 1c27e98..59d06c6 100644 --- a/framework/backends/junit.py +++ b/framework/backends/junit.py @@ -144,6 +144,9 @@ class JUnitBackend(FileBackend): out = etree.SubElement(element, 'system-out') out.text = data['out'] +# Prepend command line to stdout +out.text = data['command'] + '\n' + out.text + # Add stderr err = etree.SubElement(element, 'system-err') err.text = data['err'] ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] framework/backends/junit: Split test name correctly on Windows.
From: José Fonseca Use os.path instead of posixpath, which handles both / and \ on Windows. --- framework/backends/junit.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/framework/backends/junit.py b/framework/backends/junit.py index 59d06c6..3647601 100644 --- a/framework/backends/junit.py +++ b/framework/backends/junit.py @@ -20,9 +20,8 @@ """ Module implementing a JUnitBackend for piglit """ -import os +import os.path import re -import posixpath import shutil try: from lxml import etree @@ -108,7 +107,7 @@ class JUnitBackend(FileBackend): # classname), and replace piglits '/' separated groups with '.', after # replacing any '.' with '_' (so we don't get false groups). Also # remove any '\\' that has been inserted on windows accidentally -classname, testname = posixpath.split(name) +classname, testname = os.path.split(os.path.normpath(name)) classname = classname.replace('.', '_') classname = JUnitBackend._REPLACE.sub('.', classname) -- 1.9.1 ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit