GeezerVison is showing github.com — test: include component in tap output · nodejs/node@773ea20
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: tools/test.py +9-1Lines changed: 9 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -269,7 +269,15 @@ def AboutToRun(self, case): |
269 | 269 |
|
270 | 270 | def HasRun(self, output): |
271 | 271 | 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 | + |
273 | 281 | if output.UnexpectedOutput(): |
274 | 282 | status_line = 'not ok %i %s' % (self._done, command) |
275 | 283 | if FLAKY in output.test.outcomes and self.flaky_tests_mode == DONTCARE: |
|