Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/qemu/ot/pyot/executer.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def run(self, debug: bool, allow_no_test: bool) -> int:
err = exec_info.context.first_error
if not tret:
context = 'post'
exec_info.context.execute(context, 'post')
exec_info.context.execute(context, tret)
# pylint: disable=broad-except
except Exception as exc:
self._log.critical('%s', str(exc))
Expand Down Expand Up @@ -470,7 +470,7 @@ def _build_test_args(self, test_name: str) \
kwargs = dict(self._args.__dict__)
test_cfg = tests_cfg.get(test_name, {})
if test_cfg is None:
# does not default to an empty dict to differenciate empty from
# does not default to an empty dict to differentiate empty from
# inexistent test configuration
self._log.debug('No configuration for test %s', test_name)
opts = None
Expand Down
4 changes: 2 additions & 2 deletions python/qemu/ot/pyot/qemu/executer.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from ot.util.misc import EasyDict

from ..executer import Executer
from .wrapper import Wrapper
from .wrapper import QEMUWrapper


class QEMUExecuter(Executer):
Expand All @@ -36,7 +36,7 @@ class QEMUExecuter(Executer):
}
"""Shortcut names for QEMU log sources."""

WRAPPER = Wrapper
WRAPPER = QEMUWrapper
"""QEMU wrapper."""

def _build_fw_args(self, args: Namespace) \
Expand Down
15 changes: 13 additions & 2 deletions python/qemu/ot/pyot/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import sys

from ot.util.log import ColorLogFormatter
from ot.util.misc import EasyDict
from ot.util.misc import EasyDict, split_map_join

from .util import ExecTime, LogMessageClassifier

Expand Down Expand Up @@ -137,7 +137,8 @@ def trig_match(bline):
app_exec=host_app_exec)
try:
workdir = dirname(tdef.command[0])
log.debug('Executing %s as %s', self.NAME, ' '.join(tdef.command))
tdef_cli = self._simplify_cli(tdef.command)
log.debug('Executing %s as %s', self.NAME, tdef_cli)
env = dict(environ)
if tdef.asan:
# note cannot use a FileManager temp file here, as the full
Expand Down Expand Up @@ -386,6 +387,16 @@ def classify_log(cls, line: str, default: int = logging.ERROR,
return logging.DEBUG
return default

def _simplify_cli(self, args: list[str]) -> str:
"""Shorten the test execution command line."""
if self._debug:
# do not simplify the argument line if debug mode is enabled
return ' '.join(args)
return ' '.join(split_map_join(',', arg,
lambda part: split_map_join('=', part,
basename))
for arg in args)

def _colorize_vcp_log(self, vcplogname: str, lognames: list[str]) -> None:
vlog = logging.getLogger(vcplogname)
clr_fmt = None
Expand Down
Loading