Signed-off-by: Dylan Baker <[email protected]>
---
 framework/test/shader_test.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/framework/test/shader_test.py b/framework/test/shader_test.py
index ee44ddb..16d813f 100644
--- a/framework/test/shader_test.py
+++ b/framework/test/shader_test.py
@@ -107,8 +107,7 @@ def add_shader_test_dir(group, dirpath):
         if path.isdir(filepath):
             add_shader_test_dir(group[filename], filepath)
         else:
-            ext = filename.rsplit('.')[-1]
-            if ext != 'shader_test':
+            testname, ext = os.path.splitext(filename)
+            if ext != '.shader_test':
                 continue
-            testname = filename[0:-(len(ext) + 1)]  # +1 for '.'
             group[testname] = ShaderTest(filepath)
-- 
2.2.2

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to