[Piglit] [PATCH] Fix warnings-as-errors CL test.

Tom Stellard tom at stellard.net
Mon Dec 3 13:04:01 PST 2012


On Sun, Dec 02, 2012 at 10:25:00PM -0600, Aaron Watry wrote:
> I had previously been under the impression that an unused variable would be
> enough to trigger a warning and therefore get the test to pass.. I was wrong.
> 
> Now, we attempt to enable a made up extension name, which throws a warning and
> causes the program to fail to build when the -Werror build option is present.

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

> ---
>  tests/cl/program/build/fail/warnings-as-errors.cl |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/tests/cl/program/build/fail/warnings-as-errors.cl b/tests/cl/program/build/fail/warnings-as-errors.cl
> index cd4462f..beec202 100644
> --- a/tests/cl/program/build/fail/warnings-as-errors.cl
> +++ b/tests/cl/program/build/fail/warnings-as-errors.cl
> @@ -6,6 +6,8 @@ build_options: -Werror
>  expect_build_fail: true
>  !*/
>  
> +#pragma OPENCL EXTENSION made_up_extension : enable
> +
>  void dummy_function() { int i = 0; }
>  
>  kernel void dummy_kernel() {
> -- 
> 1.7.10.4
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list