[Piglit] [PATCH v2] tests/igt.py: debugfs subdir check

Matthew Atwood matthew.s.atwood at intel.com
Mon Aug 11 10:31:28 PDT 2014


From: Matt Atwood <matthew.s.atwood at intel.com>

Check if subdir variable is an actual subdirectory. In Chromium OS the
debug fs file path used to test the environment for igt contains both
subdirectories and files.
---
 tests/igt.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/igt.py b/tests/igt.py
index 58226a4..22250ce 100644
--- a/tests/igt.py
+++ b/tests/igt.py
@@ -56,6 +56,8 @@ def checkEnvironment():
         print "Test Environment check: debugfs not mounted properly!"
         return False
     for subdir in os.listdir(debugfs_path):
+        if not os.path.isdir(os.path.join(debugfs_path, subdir)):
+            continue
         clients = open(os.path.join(debugfs_path, subdir, "clients"), 'r')
         lines = clients.readlines()
         if len(lines) > 2:
-- 
1.8.3.2



More information about the Piglit mailing list