test(usb_serial_jtag): pin console uart to ttyUSBx port

This commit is contained in:
Erhan Kurubas
2026-07-15 22:48:16 +02:00
parent ca8dfaa2cb
commit 1f580af991
7 changed files with 11 additions and 0 deletions
+4
View File
@@ -2,6 +2,7 @@
# SPDX-License-Identifier: Unlicense OR CC0-1.0
import os
import re
import time
import typing
import pexpect
@@ -21,6 +22,8 @@ def _test_idf_gdb(openocd_dut: 'OpenOCD', dut: IdfDut) -> None:
# Don't need to have output from UART anymore
dut.serial.stop_redirect_thread()
time.sleep(1) # Wait for the USJ port to be ready
with (
openocd_dut.run(),
open(os.path.join(dut.logdir, 'gdb.txt'), 'w') as gdb_log,
@@ -47,5 +50,6 @@ def test_idf_gdb(openocd_dut: 'OpenOCD', dut: IdfDut) -> None:
@pytest.mark.usb_serial_jtag
@idf_parametrize('target', ['esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'], indirect=['target'])
@idf_parametrize('port', ['/dev/serial_ports/ttyUSB-esp32'], indirect=['port'])
def test_idf_gdb_usj(openocd_dut: 'OpenOCD', dut: IdfDut) -> None:
_test_idf_gdb(openocd_dut, dut)