Skip to content

Commit 089dd93

Browse files
bnoordhuisMyles Borins
authored and
Myles Borins
committed
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: #6915 Refs: #6653 Reviewed-By: Anna Henningsen <[email protected]>
1 parent 33274cf commit 089dd93

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/test.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,11 @@ def HasRun(self, output):
273273
# Print test name as (for example) "parallel/test-assert". Tests that are
274274
# scraped from the addons documentation are all named test.js, making it
275275
# hard to decipher what test is running when only the filename is printed.
276-
prefix = abspath(join(dirname(__file__), '../test')) + '/'
276+
prefix = abspath(join(dirname(__file__), '../test')) + os.sep
277277
command = output.command[-1]
278278
if command.endswith('.js'): command = command[:-3]
279279
if command.startswith(prefix): command = command[len(prefix):]
280+
command = command.replace('\\', '/')
280281

281282
if output.UnexpectedOutput():
282283
status_line = 'not ok %i %s' % (self._done, command)

0 commit comments

Comments
 (0)