[Piglit] [PATCH 5/8] Add calls to variable-index-read.sh and variable-index-write.sh in generated_tests
Tom Gall
tom.gall at linaro.org
Sat Apr 20 23:09:40 PDT 2013
In generated_tests/CMakeLists.txt add new fn piglit_make_sh_generated_tests which
allows for shells scripts to be called to generate tests cases.
Call variable-index-read.sh and variable-index-write.sh to generate tests for
glsl 1.00, 1.10 and 1.20.
Signed-off-by: Tom Gall <tom.gall at linaro.org>
---
generated_tests/CMakeLists.txt | 36 +++++++++++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/generated_tests/CMakeLists.txt b/generated_tests/CMakeLists.txt
index db3734f..c0950d1 100644
--- a/generated_tests/CMakeLists.txt
+++ b/generated_tests/CMakeLists.txt
@@ -18,6 +18,16 @@ function(piglit_make_generated_tests file_list generator_script)
VERBATIM)
endfunction(piglit_make_generated_tests custom_target generator_script)
+function(piglit_make_sh_generated_tests file_list generator_sh_script version)
+ # Add a custom command which executes ${generator_script}
+ # during the build.
+ add_custom_command(
+ OUTPUT ${file_list}
+ COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/${generator_sh_script} ${version} > ${file_list}
+ DEPENDS ${generator_sh_script} ${ARGN}
+ VERBATIM)
+endfunction(piglit_make_sh_generated_tests custom_target generator_sh_script)
+
# Create custom commands and targets to build generated tests.
piglit_make_generated_tests(
builtin_packing_tests.list
@@ -54,6 +64,24 @@ piglit_make_generated_tests(
piglit_make_generated_tests(
builtin_cl_int_tests.list
generate-cl-int-builtins.py)
+piglit_make_sh_generated_tests(
+ variable-index-read-100_tests.list
+ variable-index-read.sh 1.00)
+piglit_make_sh_generated_tests(
+ variable-index-read-110_tests.list
+ variable-index-read.sh 1.10)
+piglit_make_sh_generated_tests(
+ variable-index-read-120_tests.list
+ variable-index-read.sh 1.20)
+piglit_make_sh_generated_tests(
+ variable-index-write-100_tests.list
+ variable-index-write.sh 1.00)
+piglit_make_sh_generated_tests(
+ variable-index-write-110_tests.list
+ variable-index-write.sh 1.10)
+piglit_make_sh_generated_tests(
+ variable-index-write-120_tests.list
+ variable-index-write.sh 1.20)
# Add a "gen-tests" target that can be used to generate all the
# tests without doing any other compilation.
@@ -65,4 +93,10 @@ add_custom_target(gen-tests ALL
interpolation_tests.list
non-lvalue_tests.list
texture_query_lod_tests.list
- uniform-initializer_tests.list)
+ uniform-initializer_tests.list
+ variable-index-read-100_tests.list
+ variable-index-read-110_tests.list
+ variable-index-read-120_tests.list
+ variable-index-write-100_tests.list
+ variable-index-write-110_tests.list
+ variable-index-write-120_tests.list)
--
1.7.10.4
More information about the Piglit
mailing list