Skip to content

Commit 4627d47

Browse files
committed
add west debug --context
Signed-off-by: Sebastian Głąb <[email protected]>
1 parent b38ae6d commit 4627d47

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

tests/subsys/west_debug/pytest/test_west_debug.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,24 @@ def test_west_debug(dut: DeviceAdapter):
4343
time.sleep(4)
4444

4545
gdb_port = int(SEGGER_ID) % 1000 + 2331
46-
cmd = f"west debug -d {BUILD_DIR} -- --dev-id {SEGGER_ID} --gdb-port {gdb_port}"
4746

47+
# Check west debug configuration
48+
cmd = f"west debug -d {BUILD_DIR} --context"
49+
logger.info(f"Executing:\n{cmd}")
50+
proc = subprocess.Popen(
51+
cmd.split(),
52+
stdin=subprocess.PIPE,
53+
stdout=subprocess.PIPE,
54+
stderr=subprocess.STDOUT,
55+
encoding='UTF-8',
56+
text=True,
57+
)
58+
time.sleep(2)
59+
outs, errs = proc.communicate(timeout=5)
60+
logger.info(f"{outs=}\n{errs=}")
61+
62+
# Check if west debug works
63+
cmd = f"west debug -d {BUILD_DIR} -- --dev-id {SEGGER_ID} --gdb-port {gdb_port}"
4864
logger.info(f"Executing:\n{cmd}")
4965
proc = subprocess.Popen(
5066
cmd.split(),

0 commit comments

Comments
 (0)