Skip to content

Commit 6b9e296

Browse files
nordic-piksnordic-segl
authored andcommitted
[nrf fromtree] samples: boards: nordic: coresight_stm: more logs from nrfutil
Make easier debugging nrfutil call. Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no> (cherry picked from commit de1d79b)
1 parent ded163a commit 6b9e296

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

samples/boards/nordic/coresight_stm/pytest/test_stm.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,12 @@ def nrfutil_dictionary_from_serial(
203203
try:
204204
# run nrfutil trace in background non-blocking
205205
logger.info(f"Executing:\n{cmd}")
206-
proc = subprocess.Popen(cmd.split(), stdout=subprocess.DEVNULL)
206+
proc = subprocess.Popen(cmd.split(),
207+
stdin=subprocess.PIPE,
208+
stdout=subprocess.PIPE,
209+
stderr=subprocess.STDOUT,
210+
encoding='UTF-8',
211+
errors='replace')
207212
except OSError as exc:
208213
logger.error(f"Unable to start nrfutil trace:\n{cmd}\n{exc}")
209214
try:
@@ -212,6 +217,8 @@ def nrfutil_dictionary_from_serial(
212217
pass
213218
finally:
214219
_kill(proc)
220+
outs, errs = proc.communicate()
221+
logger.info(f"{outs=}\n{errs=}")
215222

216223

217224
def test_sample_STM_decoded(dut: DeviceAdapter):

0 commit comments

Comments
 (0)