ci(common): Add clang tidy check to esp-protocols

This commit is contained in:
David Cermak
2024-04-26 12:39:52 +02:00
parent 06d013b20b
commit eb84eed8d3
7 changed files with 130 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
# The following lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.5)
include($ENV{IDF_PATH}/tools/cmake/version.cmake)
# Add newly added components to one of these lines:
set(EXTRA_COMPONENT_DIRS
../components/eppp_link
../components/esp_modem
../components/esp_mqtt_cxx
../components/esp_websocket_client
../components/console_cmd_ifconfig
../components/console_cmd_ping
../components/console_cmd_wifi
../components/console_simple_init
../components/mbedtls_cxx
../components/mdns)
# !This section should NOT be touched when adding new component!
# Take all components in EXTRA_COMPONENT_DIRS, strip leading '../' and add it to TEST_COMPONENTS
# The build system will build and link unit tests, if the component contains 'test' subdirectory
set(TEST_COMPONENTS "" CACHE STRING "List of components to test")
foreach (CMP_DIR ${EXTRA_COMPONENT_DIRS})
string(SUBSTRING ${CMP_DIR} 3 100 STRIPPED_CMP) # There should be no component name longer than 100 bytes...
list(APPEND TEST_COMPONENTS ${STRIPPED_CMP})
endforeach()
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp_protocols_test_app)
+3
View File
@@ -0,0 +1,3 @@
idf_component_register(SRCS "test_app_main.c"
INCLUDE_DIRS ""
REQUIRES unity)
+14
View File
@@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "unity.h"
void app_main(void)
{
UNITY_BEGIN();
unity_run_all_tests();
UNITY_END();
}
+5
View File
@@ -0,0 +1,5 @@
# Name, Type, SubType, Offset, Size, Flags
# Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
nvs, data, nvs, , 0x6000,
phy_init, data, phy, , 0x1000,
factory, app, factory, , 2M,
1 # Name, Type, SubType, Offset, Size, Flags
2 # Note: if you have increased the bootloader size, make sure to update the offsets to avoid overlap
3 nvs, data, nvs, , 0x6000,
4 phy_init, data, phy, , 0x1000,
5 factory, app, factory, , 2M,
+4
View File
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
def test_app(dut):
dut.expect_unity_test_output(timeout=240)
+15
View File
@@ -0,0 +1,15 @@
CONFIG_ESP_INT_WDT=n
CONFIG_ESP_TASK_WDT=n
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
# Run-time checks of Heap and Stack
CONFIG_HEAP_POISONING_COMPREHENSIVE=y
CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=y
CONFIG_COMPILER_STACK_CHECK=y
CONFIG_ESP_MAIN_TASK_STACK_SIZE=16000
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL=y