Skip to content

Commit e3f552c

Browse files
committed
DNM testing
Signed-off-by: Sebastian Głąb <[email protected]>
1 parent 1e841e3 commit e3f552c

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ def _nrfutil_dictionary_from_serial(
110110
collect_time: float = 60.0,
111111
) -> None:
112112
UART_PATH = dut.device_config.serial
113-
UART_BAUDRATE = dut.device_config.baud
114113
dut.close()
115114

116115
logger.debug(f"Using serial: {UART_PATH}")
@@ -132,19 +131,21 @@ def _nrfutil_dictionary_from_serial(
132131
cmd = (
133132
"nrfutil trace stm --database-config "
134133
f"{config_str} "
135-
f"--input-serialport {UART_PATH} --baudrate {UART_BAUDRATE} "
134+
f"--input-serialport {UART_PATH} "
136135
f"--output-ascii {decoded_file_name}"
137136
)
138137
try:
139138
# run nrfutil trace in background non-blocking
140139
logger.info(f"Executing:\n{cmd}")
141-
proc = subprocess.Popen(cmd.split(), stdout=subprocess.DEVNULL)
140+
proc = subprocess.run(cmd.split(), shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=collect_time)
141+
logger.info(f'out: {proc.stdout}\n')
142+
logger.info(f'err: {proc.stderr}\n')
142143
except OSError as exc:
143144
logger.error(f"Unable to start nrfutil trace:\n{cmd}\n{exc}")
144-
try:
145-
proc.wait(collect_time)
146-
except subprocess.TimeoutExpired:
147-
pass
145+
# try:
146+
# proc.wait(collect_time)
147+
# except subprocess.TimeoutExpired:
148+
# pass
148149
finally:
149150
_kill(proc)
150151

0 commit comments

Comments
 (0)