[Piglit] [v5 01/12] util: egl: support for skipping unsupported extension tests
Chad Versace
chad.versace at linux.intel.com
Tue May 7 11:42:59 PDT 2013
On 05/03/2013 04:26 AM, Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> tests/util/piglit-util-egl.c | 9 +++++++++
> tests/util/piglit-util-egl.h | 5 +++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
> index 1087429..5a9f0a9 100644
> --- a/tests/util/piglit-util-egl.c
> +++ b/tests/util/piglit-util-egl.c
> @@ -84,3 +84,12 @@ piglit_is_egl_extension_supported(EGLDisplay egl_dpy, const char *name)
>
> return piglit_is_extension_in_string(egl_extension_list, name);
> }
> +
> +void piglit_require_egl_extension(const char *name)
> +{
> + if (!piglit_is_egl_extension_supported(eglGetCurrentDisplay(), name)) {
> + printf("Test requires %s\n", name);
> + piglit_report_result(PIGLIT_SKIP);
> + exit(1);
> + }
> +}
piglit_report_result() already calls exit(). Remove the call to exit(1) here and it's
Reviewed-by: Chad Versace <chad.versace at linux.intel.com>
More information about the Piglit
mailing list