Skip to content

Commit

Permalink
twister: pytest: Log output passthrough
Browse files Browse the repository at this point in the history
Pass Twister pytest plugin's log output, as well as output from
a test image running with pytest, up to Twister log irregardless
of the current verbosity level set at Twister.
This allows to collect full test output and also ensures that
recording data embedded in the test log is passed to the Twister
pytest harness for export.

Signed-off-by: Dmitrii Golovanov <[email protected]>
  • Loading branch information
golowanow authored and nashif committed Jun 14, 2024
1 parent 01dcb94 commit 68bb87b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/pylib/twister/twisterlib/harness.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ def generate_command(self):
if pytest_dut_scope:
command.append(f'--dut-scope={pytest_dut_scope}')

if handler.options.verbose > 1:
command.extend([
'--log-cli-level=DEBUG',
'--log-cli-format=%(levelname)s: %(message)s'
])
# Always pass output from the pytest test and the test image up to Twister log.
command.extend([
'--log-cli-level=DEBUG',
'--log-cli-format=%(levelname)s: %(message)s'
])

if handler.type_str == 'device':
command.extend(
Expand Down

0 comments on commit 68bb87b

Please sign in to comment.