summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/dotest.py
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-11-05 01:33:54 +0000
committerZachary Turner <zturner@google.com>2015-11-05 01:33:54 +0000
commite6ba053037d5890620d3c3625c978129375d8b38 (patch)
tree5ef3a101653c20ba5ea12300b38d9c04c58ca21d /lldb/packages/Python/lldbsuite/test/dotest.py
parent5167115cf63b88e2139ebf1499d9185cdbeae4ac (diff)
downloadbcm5719-llvm-e6ba053037d5890620d3c3625c978129375d8b38.tar.gz
bcm5719-llvm-e6ba053037d5890620d3c3625c978129375d8b38.zip
Python 3 - Don't use `os.path.walk`, it's removed in Py3.
It was deprecated even in 2.7, but not removed until 3.x. os.walk provides all of the same functionality and is the correct way to do this now. llvm-svn: 252127
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/dotest.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/dotest.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/dotest.py b/lldb/packages/Python/lldbsuite/test/dotest.py
index 313734a0400..aec1762a729 100644
--- a/lldb/packages/Python/lldbsuite/test/dotest.py
+++ b/lldb/packages/Python/lldbsuite/test/dotest.py
@@ -1230,9 +1230,6 @@ def visit(prefix, dir, names):
return
for name in names:
- if os.path.isdir(os.path.join(dir, name)):
- continue
-
if '.py' == os.path.splitext(name)[1] and name.startswith(prefix):
if name in all_tests:
@@ -1555,7 +1552,8 @@ def run_suite():
# Walk through the testdirs while collecting tests.
#
for testdir in testdirs:
- os.path.walk(testdir, visit, 'Test')
+ for (dirpath, dirnames, filenames) in os.walk(testdir):
+ visit('Test', dirpath, filenames)
#
# Now that we have loaded all the test cases, run the whole test suite.
OpenPOWER on IntegriCloud