[Piglit] [PATCH 5/5] tests: add no_error test profile for testing KHR_no_error

Dylan Baker dylan at pnwbakers.com
Fri May 12 19:15:59 UTC 2017


With the one minor change below this patch is:
Reviewed-by: Dylan Baker <dylan at pnwbakers.com>

Quoting Timothy Arceri (2017-05-11 21:47:50)
> ---
>  tests/no_error.py | 29 +++++++++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 tests/no_error.py
> 
> diff --git a/tests/no_error.py b/tests/no_error.py
> new file mode 100644
> index 0000000..c060b42
> --- /dev/null
> +++ b/tests/no_error.py
> @@ -0,0 +1,29 @@
> +# -*- coding: utf-8 -*-
> +
> +from __future__ import (
> +     absolute_import, division, print_function, unicode_literals
> +)
> +
> +import six
> +
> +from tests.gpu import profile as _profile
> +from framework.test import PiglitGLTest
> +from framework.test.shader_test import ShaderTest, MultiShaderTest
> +from framework.profile import TestDict
> +
> +__all__ = ['profile']
> +
> +profile = _profile.copy()  # pylint: disable=invalid-name
> +
> +# Save the old test_list, but create a new one to contain the modified tests
> +old_test_list = profile.test_list
> +profile.test_list = TestDict()
> +
> +# Add a modified version of each PiglitGLTest as a khr_no_error variant.
> +# Shader runner doesn't explitly test for expected errors so we add shader
> +# tests as is. We actively filter GleanTest instances as well as GLSL parser
> +# and any other type of tests.
> +for name, test in six.iteritems(old_test_list):
> +    if isinstance(test, PiglitGLTest) or isinstance(test, ShaderTest) or isinstance(test, MultiShaderTest):

if isinstance(test, (PiglitGLTest, ShaderTest, MultiShaderTest)):

> +        profile.test_list['{} khr_no_error'.format(name)] = test
> +        test.command += ['-khr_no_error']
> -- 
> 2.9.3
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20170512/c419c27b/attachment.sig>


More information about the Piglit mailing list