mirror of
https://github.com/nodejs/node.git
synced 2025-04-30 07:19:19 +00:00
test: include component in tap output
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: https://github.com/nodejs/node/issues/6651 PR-URL: https://github.com/nodejs/node/pull/6653 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
5d64ff4f67
commit
084b2ec198
@ -269,7 +269,15 @@ class TapProgressIndicator(SimpleProgressIndicator):
|
||||
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user