[Piglit] [PATCH 01/11] Add CL build test for macro definitions without values
Aaron Watry
awatry at gmail.com
Wed Oct 10 16:44:02 PDT 2012
---
tests/all_cl.tests | 1 +
tests/cl/program/build/macro-definitions.cl | 10 ++++++++++
2 files changed, 11 insertions(+)
create mode 100644 tests/cl/program/build/macro-definitions.cl
diff --git a/tests/all_cl.tests b/tests/all_cl.tests
index 5cb79f5..0f680cb 100644
--- a/tests/all_cl.tests
+++ b/tests/all_cl.tests
@@ -97,6 +97,7 @@ add_plain_program_tester_test(program_build, 'Other data types', 'build/other-d
add_plain_program_tester_test(program_build, 'Scalar operators', 'build/scalar-operators.cl')
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_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.cl b/tests/cl/program/build/macro-definitions.cl
new file mode 100644
index 0000000..7d62f40
--- /dev/null
+++ b/tests/cl/program/build/macro-definitions.cl
@@ -0,0 +1,10 @@
+/*!
+[config]
+name: Macro Definitions
+clc_version_min: 10
+build_options: -D BUILD_OPT -D BUILD_OPT2
+!*/
+
+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