[Piglit] [PATCH 3/3] all.py: Test any apitraces we find under tests/apitrace/traces.
Eric Anholt
eric at anholt.net
Wed Sep 14 10:03:31 UTC 2016
---
framework/test/piglit_test.py | 1 +
tests/all.py | 22 +++++++++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/framework/test/piglit_test.py b/framework/test/piglit_test.py
index 73bf65344264..571464bee48a 100644
--- a/framework/test/piglit_test.py
+++ b/framework/test/piglit_test.py
@@ -40,6 +40,7 @@ from .base import Test, WindowResizeMixin, ValgrindMixin, TestIsSkip
__all__ = [
'PiglitCLTest',
'PiglitGLTest',
+ 'PiglitBaseTest',
'CL_CONCURRENT',
'TEST_BIN_DIR',
]
diff --git a/tests/all.py b/tests/all.py
index 646b7b16eec7..8f115669e7f8 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -12,8 +12,10 @@ from six.moves import range
from framework import grouptools
from framework.profile import TestProfile
-from framework.test import (PiglitGLTest, GleanTest, ShaderTest,
+from framework.test import (PiglitGLTest, GleanTest, ShaderTest, PiglitBaseTest,
GLSLParserTest, GLSLParserNoConfigError)
+from framework.driver_classifier import DriverClassifier
+
from .py_modules.constants import TESTS_DIR, GENERATED_TESTS_DIR
__all__ = ['profile']
@@ -257,6 +259,24 @@ for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
profile.test_list[group] = PiglitGLTest(
['asmparsertest', type_, os.path.join(dirpath, filename)])
+# Find and add all apitrace tests.
+classifier = DriverClassifier()
+for basedir in [os.path.join(TESTS_DIR, 'apitrace', 'traces')]:
+ for dirpath, _, filenames in os.walk(basedir):
+ base_group = grouptools.from_path(os.path.join(
+ 'apitrace', os.path.relpath(dirpath, basedir)))
+
+ for filename in filenames:
+ if not os.path.splitext(filename)[1] == '.trace':
+ continue
+ group = grouptools.join(base_group, filename)
+
+ profile.test_list[group] = PiglitBaseTest(
+ [os.path.join(TESTS_DIR, 'apitrace', 'test-trace.py'),
+ os.path.join(dirpath, filename),
+ ','.join(classifier.categories)],
+ run_concurrent=True)
+
# List of all of the MSAA sample counts we wish to test
MSAA_SAMPLE_COUNTS = ['2', '4', '6', '8', '16', '32']
--
2.9.3
More information about the Piglit
mailing list