Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 773ea20

Browse filesBrowse files
bnoordhuisMyles Borins
authored andcommitted
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: #6651 PR-URL: #6653 Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 333369e commit 773ea20
Copy full SHA for 773ea20

File tree

Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-1
lines changed
Open diff view settings
Collapse file

‎tools/test.py‎

Copy file name to clipboardExpand all lines: tools/test.py
+9-1Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,15 @@ def AboutToRun(self, case):
269269

270270
def HasRun(self, output):
271271
self._done += 1
272-
command = basename(output.command[-1])
272+
273+
# Print test name as (for example) "parallel/test-assert". Tests that are
274+
# scraped from the addons documentation are all named test.js, making it
275+
# hard to decipher what test is running when only the filename is printed.
276+
prefix = abspath(join(dirname(__file__), '../test')) + '/'
277+
command = output.command[-1]
278+
if command.endswith('.js'): command = command[:-3]
279+
if command.startswith(prefix): command = command[len(prefix):]
280+
273281
if output.UnexpectedOutput():
274282
status_line = 'not ok %i %s' % (self._done, command)
275283
if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.