feat(uart): support uart module sleep retention on c6/h2

This commit is contained in:
Song Ruo Jing
2024-06-18 15:04:20 +08:00
parent f81b598d10
commit 707aebc607
27 changed files with 489 additions and 51 deletions

View File

@@ -26,12 +26,14 @@ input_argv = {
def test_uart_single_dev(case_tester) -> None: # type: ignore
dut = case_tester.dut
chip_type = dut.app.target
for uart_port in input_argv.get(chip_type, []):
for case in case_tester.test_menu:
dut.serial.hard_reset()
dut._get_ready()
dut.confirm_write(case.index, expect_str=f'Running {case.name}...')
dut.expect("select to test 'uart' or 'lp_uart' port", timeout=10)
dut.write(f'{uart_port}')
dut.expect_unity_test_output()
for case in case_tester.test_menu:
if 'hp-uart-only' not in case.groups:
for uart_port in input_argv.get(chip_type, []):
dut.serial.hard_reset()
dut._get_ready()
dut.confirm_write(case.index, expect_str=f'Running {case.name}...')
dut.expect("select to test 'uart' or 'lp_uart' port", timeout=10)
dut.write(f'{uart_port}')
dut.expect_unity_test_output()
else:
dut._run_normal_case(case, reset=True)