[Piglit] [PATCH 2/2] Plug the built-in test generator to the CL test list.
Aaron Watry
awatry at gmail.com
Fri Mar 8 20:04:38 PST 2013
This isn't necessarily the prettiest way to do it, but it gets the job done.
---
tests/all_cl.tests | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/tests/all_cl.tests b/tests/all_cl.tests
index 267f969..72c9176 100644
--- a/tests/all_cl.tests
+++ b/tests/all_cl.tests
@@ -4,10 +4,13 @@
import os
import os.path as path
+import sys
from framework.core import *
from framework.exectest import *
+from subprocess import call
+
######
# Helper functions
@@ -104,3 +107,14 @@ program["Execute"] = program_execute
add_program_test_dir(program_build, 'tests/cl/program/build')
add_program_test_dir(program_build_fail, 'tests/cl/program/build/fail')
add_program_test_dir(program_execute, 'tests/cl/program/execute')
+
+#Generate the builtin tests
+origWD = os.getcwd() # remember our original working directory
+os.chdir(os.path.join(os.path.abspath(sys.path[0]), 'tests/cl/program/execute/builtin_functions'))
+subprocess.call("/usr/bin/env python generate-int-builtins.py".split(), shell=False)
+os.chdir(origWD) # get back to our original working directory
+
+#Run built-in tests
+program_execute_builtin = Group()
+program["Execute"]["Builtin"] = program_execute_builtin
+add_program_test_dir(program_execute_builtin, 'tests/cl/program/execute/builtin_functions')
\ No newline at end of file
--
1.7.4.4
More information about the Piglit
mailing list