Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,15 +1247,16 @@ def main():
if dirpath == tdir:
continue
basename = os.path.basename(dirpath)
parent = dirpath.replace(tdir, "")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strip prefix dirty like parent = dirpath[len(tdir):] ?

if args.skip_tests:
skip_tests_opt = False
patterns = args.skip_tests.split(",")
for pattern in patterns:
if args.exact:
if pattern == basename:
if pattern == parent or pattern == basename:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure we should change the exact logic with parent name

skip_tests_opt = True
break
elif basename.find(pattern) > -1:
elif parent.find(pattern) > -1:
skip_tests_opt = True
break
if skip_tests_opt:
Expand All @@ -1273,9 +1274,10 @@ def main():
else:
for pattern in args.patterns:
if args.exact:
if pattern == basename:
if pattern == parent or pattern == basename:
tests.append(dirpath)
elif basename.find(pattern) > -1:
# also check the parent dir of the test for pattern
elif parent.find(pattern) > -1:
tests.append(dirpath)

# Sort alphabetically.
Expand Down
Loading