[Piglit] [PATCH 09/11] Add CL build test for -Werror

Aaron Watry awatry at gmail.com
Wed Oct 10 16:44:10 PDT 2012


---
 tests/all_cl.tests                                |    1 +
 tests/cl/program/build/fail/warnings-as-errors.cl |   13 +++++++++++++
 2 files changed, 14 insertions(+)
 create mode 100644 tests/cl/program/build/fail/warnings-as-errors.cl

diff --git a/tests/all_cl.tests b/tests/all_cl.tests
index f5d2b67..d8dc409 100644
--- a/tests/all_cl.tests
+++ b/tests/all_cl.tests
@@ -105,6 +105,7 @@ add_plain_program_tester_test(program_build, 'Math Intrinsics', 'build/math-intr
 add_plain_program_tester_test(program_build, 'Optimization Options', 'build/optimization-options.cl')
 add_plain_program_tester_test(program_build, 'Disable Warnings', 'build/disable-warnings.cl')
 add_plain_program_tester_test(program_build, 'CL Version Declaration', 'build/version-declaration.cl')
+add_plain_program_tester_test(program_build_fail, 'Treat warnings as errors', 'build/fail/warnings-as-errors.cl')
 add_plain_program_tester_test(program_build_fail, 'Increment operator on float',  'build/fail/increment-float.cl')
 add_plain_program_tester_test(program_build_fail, 'Add different size vector',  'build/fail/add-different-size-vector.cl')
 #   Execute
diff --git a/tests/cl/program/build/fail/warnings-as-errors.cl b/tests/cl/program/build/fail/warnings-as-errors.cl
new file mode 100644
index 0000000..cd4462f
--- /dev/null
+++ b/tests/cl/program/build/fail/warnings-as-errors.cl
@@ -0,0 +1,13 @@
+/*!
+[config]
+name: Treat warnings as errors
+clc_version_min: 10
+build_options: -Werror
+expect_build_fail: true
+!*/
+
+void dummy_function() { int i = 0; }
+
+kernel void dummy_kernel() {
+    dummy_function();
+}
\ No newline at end of file
-- 
1.7.9.5



More information about the Piglit mailing list