[Piglit] [v5 01/12] util: egl: support for skipping unsupported extension tests

Pohjolainen, Topi topi.pohjolainen at intel.com
Tue May 14 22:53:17 PDT 2013


On Tue, May 14, 2013 at 11:23:30AM -0700, Eric Anholt wrote:
> Chad Versace <chad.versace at linux.intel.com> writes:
> 
> > 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>

And by the way for future cleanup, the same 'exit()' can be found in
'piglit_require_extension()'. I used it as example.

> 
> I also needed this patch for my recent EGL image tests, so I've made the
> little change and pushed it.

Thanks Eric, I can drop it then.


More information about the Piglit mailing list