[Piglit] [PATCH 1/3] opencv: Add 'individual' option to piglit.conf
Tom Stellard
thomas.stellard at amd.com
Tue Sep 9 06:36:29 PDT 2014
This replaces the individual parameter in add_opencv_tests()
---
framework/opencv.py | 3 ++-
piglit.conf.example | 10 ++++++++++
tests/all_cl.py | 2 +-
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/framework/opencv.py b/framework/opencv.py
index cefc94c..a5201c9 100644
--- a/framework/opencv.py
+++ b/framework/opencv.py
@@ -38,12 +38,13 @@ class OpenCVTest(GTest):
GTest.__init__(self, options)
-def add_opencv_tests(profile, individual = False):
+def add_opencv_tests(profile):
if not PIGLIT_CONFIG.has_option('opencv', 'opencv_test_ocl_bindir'):
return
opencv_test_ocl = path.join(PIGLIT_CONFIG.get('opencv',
'opencv_test_ocl_bindir'), 'opencv_test_ocl')
+ individual = PIGLIT_CONFIG.has_option('opencv', 'individual')
if not path.isfile(opencv_test_ocl):
print('Warning: {} does not exist.\nSkipping OpenCV '
'tests...'.format(opencv_test_ocl))
diff --git a/piglit.conf.example b/piglit.conf.example
index e7a2101..9cb7dd1 100644
--- a/piglit.conf.example
+++ b/piglit.conf.example
@@ -2,6 +2,16 @@
; Set the opencv_test_ocl_bindir variable to run the OpenCV OpenCL tests.
;opencv_test_ocl_bindir=/home/user/opencv/build/bin
;opencv_workdir=/home/user/opencv/samples/c/
+; Run each subtest individiually to so a result is recored for each subtest.
+; For example, default behavior:
+; opencv/OCL_ML/Kmeans -> Pass
+;
+; With 'individual' option:
+; OCL_ML/Kmeans.Mat/0 -> Pass
+; OCL_ML/Kmeans.Mat/1 -> Pass
+; OCL_ML/Kmeans.Mat/2 -> Pass
+;
+;individual
;
[xts]
; Set bindir equal to the root of the xts directory
diff --git a/tests/all_cl.py b/tests/all_cl.py
index 45de569..ea48a7a 100644
--- a/tests/all_cl.py
+++ b/tests/all_cl.py
@@ -28,5 +28,5 @@ from tests.cl import profile
from framework.oclconform import add_oclconform_tests
from framework.opencv import add_opencv_tests
-add_opencv_tests(profile, True)
+add_opencv_tests(profile)
add_oclconform_tests(profile)
--
1.8.5.5
More information about the Piglit
mailing list