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

Eric Anholt eric at anholt.net
Tue May 14 11:23:30 PDT 2013


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>

I also needed this patch for my recent EGL image tests, so I've made the
little change and pushed it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130514/ac4a1877/attachment.pgp>


More information about the Piglit mailing list