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

Aaron Watry awatry at gmail.com
Sun Dec 2 20:25:00 PST 2012


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.
---
 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



More information about the Piglit mailing list