File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
tests/subsys/west_debug/pytest Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff 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 -- --dev-id { SEGGER_ID } --gdb-port { gdb_port } "
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 (),
You can’t perform that action at this time.
0 commit comments