Skip to content

Commit

Permalink
test: include component in tap output
Browse files Browse the repository at this point in the history
Print test name as (for example) "parallel/test-assert".  Tests that are
scraped from the addons documentation are all named test.js, making it
hard to decipher what test is running when only the filename is printed.

Fixes: #6651
PR-URL: #6653
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
bnoordhuis authored and Myles Borins committed May 18, 2016
1 parent 333369e commit 773ea20
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,15 @@ def AboutToRun(self, case):

def HasRun(self, output):
self._done += 1
command = basename(output.command[-1])

# Print test name as (for example) "parallel/test-assert". Tests that are
# scraped from the addons documentation are all named test.js, making it
# hard to decipher what test is running when only the filename is printed.
prefix = abspath(join(dirname(__file__), '../test')) + '/'
command = output.command[-1]
if command.endswith('.js'): command = command[:-3]
if command.startswith(prefix): command = command[len(prefix):]

if output.UnexpectedOutput():
status_line = 'not ok %i %s' % (self._done, command)
if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE:
Expand Down

0 comments on commit 773ea20

Please sign in to comment.