[Piglit] [PATCH 02/11] Add CL build test for macro definitions with values specified

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


---
 tests/all_cl.tests                                 |    1 +
 .../program/build/macro-definitions-with-values.cl |   12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 tests/cl/program/build/macro-definitions-with-values.cl

diff --git a/tests/all_cl.tests b/tests/all_cl.tests
index 0f680cb..0896640 100644
--- a/tests/all_cl.tests
+++ b/tests/all_cl.tests
@@ -98,6 +98,7 @@ add_plain_program_tester_test(program_build, 'Scalar operators',  'build/scalar-
 add_plain_program_tester_test(program_build, 'Vector operators',  'build/vector-operators.cl')
 add_plain_program_tester_test(program_build, 'Scalar and vector operators',  'build/scalar-and-vector-operators.cl')
 add_plain_program_tester_test(program_build, 'Macro Definitions', 'build/macro-definitions.cl')
+add_plain_program_tester_test(program_build, 'Macro definitions with values', 'build/macro-definitions-with-values.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/macro-definitions-with-values.cl b/tests/cl/program/build/macro-definitions-with-values.cl
new file mode 100644
index 0000000..1aea883
--- /dev/null
+++ b/tests/cl/program/build/macro-definitions-with-values.cl
@@ -0,0 +1,12 @@
+/*!
+[config]
+name: Macro definitions with values
+clc_version_min: 10
+build_options: -D BUILD_OPT1=1 -D BUILD_OPT2=2
+!*/
+
+
+
+kernel void dummy_kernel(){
+    int var1 = BUILD_OPT1; int var2 = BUILD_OPT2; 
+}
\ No newline at end of file
-- 
1.7.9.5



More information about the Piglit mailing list