|
22 | 22 | import sys |
23 | 23 |
|
24 | 24 | from ot.util.log import ColorLogFormatter |
25 | | -from ot.util.misc import EasyDict |
| 25 | +from ot.util.misc import EasyDict, split_map_join |
26 | 26 |
|
27 | 27 | from .util import ExecTime, LogMessageClassifier |
28 | 28 |
|
@@ -137,7 +137,8 @@ def trig_match(bline): |
137 | 137 | app_exec=host_app_exec) |
138 | 138 | try: |
139 | 139 | workdir = dirname(tdef.command[0]) |
140 | | - log.debug('Executing %s as %s', self.NAME, ' '.join(tdef.command)) |
| 140 | + tdef_cli = self._simplify_cli(tdef.command) |
| 141 | + log.debug('Executing %s as %s', self.NAME, tdef_cli) |
141 | 142 | env = dict(environ) |
142 | 143 | if tdef.asan: |
143 | 144 | # note cannot use a FileManager temp file here, as the full |
@@ -386,6 +387,16 @@ def classify_log(cls, line: str, default: int = logging.ERROR, |
386 | 387 | return logging.DEBUG |
387 | 388 | return default |
388 | 389 |
|
| 390 | + def _simplify_cli(self, args: list[str]) -> str: |
| 391 | + """Shorten the test execution command line.""" |
| 392 | + if self._debug: |
| 393 | + # do not simplify the argument line if debug mode is enabled |
| 394 | + return ' '.join(args) |
| 395 | + return ' '.join(split_map_join(',', arg, |
| 396 | + lambda part: split_map_join('=', part, |
| 397 | + basename)) |
| 398 | + for arg in args) |
| 399 | + |
389 | 400 | def _colorize_vcp_log(self, vcplogname: str, lognames: list[str]) -> None: |
390 | 401 | vlog = logging.getLogger(vcplogname) |
391 | 402 | clr_fmt = None |
|
0 commit comments