|
62 | 62 | # Case 15: Thread network formation and attaching with TREL |
63 | 63 | # A TREL device forms a Thread network, other TREL devices attach to it, then test ping connection between them. |
64 | 64 |
|
| 65 | +# Case 16: Thread network BR lib check |
| 66 | +# Check BR library compatibility |
| 67 | + |
65 | 68 |
|
66 | 69 | @pytest.fixture(scope='module', name='Init_avahi') |
67 | 70 | def fixture_Init_avahi() -> bool: |
@@ -928,3 +931,34 @@ def test_trel_connect(dut: Tuple[IdfDut, IdfDut]) -> None: |
928 | 931 | for trel in trel_list: |
929 | 932 | ocf.execute_command(trel, 'factoryreset') |
930 | 933 | time.sleep(3) |
| 934 | + |
| 935 | + |
| 936 | +# Case 16: Thread network BR lib check |
| 937 | +@pytest.mark.supported_targets |
| 938 | +@pytest.mark.openthread_br |
| 939 | +@pytest.mark.flaky(reruns=1, reruns_delay=1) |
| 940 | +@pytest.mark.parametrize( |
| 941 | + 'config, count, app_path, target, port', |
| 942 | + [ |
| 943 | + pytest.param( |
| 944 | + 'rcp_uart|br_libcheck', |
| 945 | + 2, |
| 946 | + f'{os.path.join(os.path.dirname(__file__), "ot_rcp")}' |
| 947 | + f'|{os.path.join(os.path.dirname(__file__), "ot_br")}', |
| 948 | + 'esp32c6|esp32s3', |
| 949 | + f'{ESPPORT3}|{ESPPORT2}', |
| 950 | + id='c6-s3' |
| 951 | + ), |
| 952 | + ], |
| 953 | + indirect=True, |
| 954 | +) |
| 955 | +def test_br_lib_check(dut: Tuple[IdfDut, IdfDut]) -> None: |
| 956 | + br = dut[1] |
| 957 | + dut[0].serial.stop_redirect_thread() |
| 958 | + try: |
| 959 | + time.sleep(3) |
| 960 | + ocf.execute_command(br, 'brlibcheck') |
| 961 | + br.expect('The br library compatibility checking passed', timeout=10) |
| 962 | + finally: |
| 963 | + ocf.execute_command(br, 'factoryreset') |
| 964 | + time.sleep(3) |
0 commit comments