[Piglit] [PATCH 4/4] all.py: move assignment to groupname out of loop

Brian Paul brianp at vmware.com
Fri Oct 13 04:22:11 UTC 2017


It's loop invariant.
---
 tests/all.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/all.py b/tests/all.py
index fdb4a3e..54346d4 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -213,9 +213,9 @@ shader_tests = collections.defaultdict(list)
 # Find and add all shader tests.
 for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]:
     for dirpath, _, filenames in os.walk(basedir):
+        groupname = grouptools.from_path(os.path.relpath(dirpath, basedir))
         for filename in filenames:
             testname, ext = os.path.splitext(filename)
-            groupname = grouptools.from_path(os.path.relpath(dirpath, basedir))
             if ext == '.shader_test':
                 if PROCESS_ISOLATION:
                     test = ShaderTest(os.path.join(dirpath, filename))
-- 
1.9.1



More information about the Piglit mailing list