Skip to content

Commit

Permalink
runner: handle more the one directory depth in test name
Browse files Browse the repository at this point in the history
Display only. For tests nested in sub-directories, only 2 levels of
directories were considered. Instead print the full path to the test.
  • Loading branch information
jasonish committed Nov 20, 2023
1 parent 841eec0 commit ba695f8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,11 @@ def run(self, outdir):

if not check_value["failure"] and not check_value["skipped"]:
if not self.quiet:
if os.path.basename(os.path.dirname(self.directory)) != "tests":
path_name = os.path.join(os.path.basename(os.path.dirname(self.directory)), self.name)
test_name_offset = self.directory.find("tests/")
if test_name_offset > -1:
path_name = self.directory[test_name_offset + len("tests/"):]
else:
path_name = (os.path.basename(self.directory))
path_name = os.path.basename(self.directory)
print("===> %s: OK%s" % (path_name, " (%dx)" % count if count > 1 else ""))
elif not check_value["failure"]:
if not self.quiet:
Expand Down

0 comments on commit ba695f8

Please sign in to comment.