[Piglit] [PATCH 2/3] tests/all.py: Search generated_tests directory for asmparsertest files

Dylan Baker baker.dylan.c at gmail.com
Mon Feb 29 22:15:44 UTC 2016


Currently only the tests directory is searched, when the generator is
turned on that wont be sufficient.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/all.py | 27 ++++++++++++++-------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/tests/all.py b/tests/all.py
index f5b84bd..9ec1c47 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -236,19 +236,20 @@ for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
             profile.test_list[group] = test
 
 # Collect and add all asmparsertests
-_basedir = os.path.join(TESTS_DIR, 'asmparsertest', 'shaders')
-for dirpath, _, filenames in os.walk(_basedir):
-    base_group = grouptools.from_path(os.path.join(
-        'asmparsertest', os.path.relpath(dirpath, _basedir)))
-    type_ = os.path.basename(dirpath)
-
-    for filename in filenames:
-        if not os.path.splitext(filename)[1] == '.txt':
-            continue
-
-        group = grouptools.join(base_group, filename)
-        profile.test_list[group] = PiglitGLTest(
-            ['asmparsertest', type_, os.path.join(dirpath, filename)])
+for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
+    _basedir = os.path.join(basedir, 'asmparsertest', 'shaders')
+    for dirpath, _, filenames in os.walk(_basedir):
+        base_group = grouptools.from_path(os.path.join(
+            'asmparsertest', os.path.relpath(dirpath, _basedir)))
+        type_ = os.path.basename(dirpath)
+
+        for filename in filenames:
+            if not os.path.splitext(filename)[1] == '.txt':
+                continue
+
+            group = grouptools.join(base_group, filename)
+            profile.test_list[group] = PiglitGLTest(
+                ['asmparsertest', type_, os.path.join(dirpath, filename)])
 
 # List of all of the MSAA sample counts we wish to test
 MSAA_SAMPLE_COUNTS = (2, 4, 6, 8, 16, 32)
-- 
2.7.2



More information about the Piglit mailing list