diff --git a/components/driver/test_apps/legacy_twai/README.md b/components/driver/test_apps/legacy_twai/README.md index 5edaa3c4ca..2c46f54aa0 100644 --- a/components/driver/test_apps/legacy_twai/README.md +++ b/components/driver/test_apps/legacy_twai/README.md @@ -4,5 +4,5 @@ # Enable Socket CAN Device with bitrate 250Kbps ```bash -sudo ip link set can0 up type can bitrate 250000 restart-ms 100 +sudo ip link set can0 up type can bitrate 250000 ``` diff --git a/components/driver/test_apps/legacy_twai/pytest_twai.py b/components/driver/test_apps/legacy_twai/pytest_twai.py index f8d4b70a7a..e0ab973e77 100644 --- a/components/driver/test_apps/legacy_twai/pytest_twai.py +++ b/components/driver/test_apps/legacy_twai/pytest_twai.py @@ -54,7 +54,7 @@ def esp_reset_and_wait_ready(dut: Dut) -> None: @pytest.fixture(name='socket_can') def fixture_create_socket_can() -> Bus: # Set up the socket CAN with the bitrate - start_command = 'sudo -n ip link set can0 up type can bitrate 250000 restart-ms 100' + start_command = 'sudo -n ip link set can0 up type can bitrate 250000' stop_command = 'sudo -n ip link set can0 down' status_command = 'sudo -n ip -details link show can0' diff --git a/components/esp_driver_twai/test_apps/test_twai/pytest_driver_twai.py b/components/esp_driver_twai/test_apps/test_twai/pytest_driver_twai.py index 62e945d92d..261a0e37a2 100644 --- a/components/esp_driver_twai/test_apps/test_twai/pytest_driver_twai.py +++ b/components/esp_driver_twai/test_apps/test_twai/pytest_driver_twai.py @@ -47,16 +47,10 @@ def esp_enter_flash_mode(dut: Dut) -> None: ser.setDTR(False) # Back RTS/DTR to 1/1 to avoid affect to esptool -def esp_reset_and_wait_ready(dut: Dut) -> None: - dut.serial.hard_reset() - time.sleep(0.5) - dut.expect_exact('Press ENTER to see the list of tests') - - @pytest.fixture(name='socket_can') def fixture_create_socket_can() -> Bus: # Set up the socket CAN with the bitrate - start_command = 'sudo -n ip link set can0 up type can bitrate 250000 restart-ms 100' + start_command = 'sudo -n ip link set can0 up type can bitrate 250000' stop_command = 'sudo -n ip link set can0 down' status_command = 'sudo -n ip -details link show can0' @@ -88,8 +82,7 @@ def fixture_create_socket_can() -> Bus: @pytest.mark.parametrize('config', ['release'], indirect=True) @idf_parametrize('target', soc_filtered_targets('SOC_TWAI_SUPPORTED == 1'), indirect=['target']) def test_driver_twai_listen_only(dut: Dut, socket_can: Bus) -> None: - esp_reset_and_wait_ready(dut) - + dut.expect_exact('Press ENTER to see the list of tests') dut.write('"twai_listen_only"') # wait the DUT to finish initialize @@ -110,8 +103,7 @@ def test_driver_twai_listen_only(dut: Dut, socket_can: Bus) -> None: @pytest.mark.parametrize('config', ['release'], indirect=True) @idf_parametrize('target', soc_filtered_targets('SOC_TWAI_SUPPORTED == 1'), indirect=['target']) def test_driver_twai_remote_request(dut: Dut, socket_can: Bus) -> None: - esp_reset_and_wait_ready(dut) - + dut.expect_exact('Press ENTER to see the list of tests') dut.write('"twai_remote_request"') print('Waiting remote frame ...')