forked from espressif/esp-idf
fix(driver_twai): test app add pytest script
This commit is contained in:
@@ -19,9 +19,9 @@ repos:
|
||||
files: 'pytest_.*\.py$'
|
||||
require_serial: true
|
||||
additional_dependencies:
|
||||
- pytest-embedded-idf[serial]~=1.14
|
||||
- pytest-embedded-jtag~=1.14
|
||||
- pytest-embedded-qemu~=1.14
|
||||
- pytest-embedded-idf[serial]~=1.16
|
||||
- pytest-embedded-jtag~=1.16
|
||||
- pytest-embedded-qemu~=1.16
|
||||
- pytest-ignore-test-results~=0.3
|
||||
- pytest-rerunfailures
|
||||
- pytest-timeout
|
||||
|
@@ -9,7 +9,8 @@
|
||||
#include "unity_test_utils_memory.h"
|
||||
#include "esp_heap_caps.h"
|
||||
|
||||
#define LEAKS (200)
|
||||
// lazy install of mutex and pm_lock occupied memorys
|
||||
#define LEAKS (250)
|
||||
|
||||
void setUp(void)
|
||||
{
|
||||
|
@@ -173,7 +173,9 @@ TEST_CASE("twai transmit stop resume (loopback)", "[TWAI]")
|
||||
TEST_ESP_OK(twai_node_enable(node_hdl));
|
||||
|
||||
//waiting pkg receive finish
|
||||
while (rx_frame.buffer < recv_pkg_ptr + TEST_TRANS_LEN);
|
||||
while (rx_frame.buffer < recv_pkg_ptr + TEST_TRANS_LEN) {
|
||||
vTaskDelay(1);
|
||||
}
|
||||
free(tx_msgs);
|
||||
|
||||
// check if pkg receive correct
|
||||
|
@@ -0,0 +1,14 @@
|
||||
# SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
from pytest_embedded_idf.utils import idf_parametrize
|
||||
from pytest_embedded_idf.utils import soc_filtered_targets
|
||||
|
||||
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', ['release'], indirect=True)
|
||||
@idf_parametrize('target', soc_filtered_targets('SOC_TWAI_SUPPORT_FD == 1'), indirect=['target'])
|
||||
def test_driver_twai_loopbk(dut: Dut) -> None:
|
||||
dut.run_all_single_board_cases(reset=True)
|
@@ -0,0 +1,7 @@
|
||||
CONFIG_PM_ENABLE=y
|
||||
CONFIG_FREERTOS_USE_TICKLESS_IDLE=y
|
||||
CONFIG_PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP=y
|
||||
CONFIG_PM_DFS_INIT_AUTO=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
|
Reference in New Issue
Block a user