Browse Source

test: fix component printing on windows

Commit 084b2ec ("test: include component in tap output") introduced
an in hindsight glaringly obvious but fortunately not very critical
Windows-specific bug by failing to take the path separator into account.
This commit rectifies that, the prefix is now correctly stripped.

PR-URL: https://github.com/nodejs/node/pull/6915
Refs: https://github.com/nodejs/node/pull/6653
Reviewed-By: Anna Henningsen <anna@addaleax.net>
v6.x
Ben Noordhuis 9 years ago
committed by Rod Vagg
parent
commit
32cc43a1bd
  1. 3
      tools/test.py

3
tools/test.py

@ -273,10 +273,11 @@ class TapProgressIndicator(SimpleProgressIndicator):
# 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')) + '/'
prefix = abspath(join(dirname(__file__), '../test')) + os.sep
command = output.command[-1]
if command.endswith('.js'): command = command[:-3]
if command.startswith(prefix): command = command[len(prefix):]
command = command.replace('\\', '/')
if output.UnexpectedOutput():
status_line = 'not ok %i %s' % (self._done, command)

Loading…
Cancel
Save