mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
driver: register test app component by WHOLE_ARCHIVE
This commit is contained in:
parent
a7d380c80a
commit
0a36cad9e0
@ -1,18 +1,15 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_gpio.c")
|
||||
|
||||
set(include_tests "-u test_app_include_gpio")
|
||||
|
||||
if(CONFIG_SOC_DEDICATED_GPIO_SUPPORTED)
|
||||
list(APPEND srcs "test_dedicated_gpio.c")
|
||||
list(APPEND include_tests "-u test_app_include_dedicated_gpio")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_SIGMADELTA_SUPPORTED)
|
||||
list(APPEND srcs "test_sigmadelta.c")
|
||||
list(APPEND include_tests "-u test_app_include_sigmadelta")
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE ${include_tests})
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -15,10 +15,6 @@
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/dedic_gpio.h"
|
||||
|
||||
void test_app_include_dedicated_gpio(void)
|
||||
{
|
||||
}
|
||||
|
||||
TEST_CASE("Dedicated_GPIO_bundle_install/uninstall", "[dedic_gpio]")
|
||||
{
|
||||
const int test_gpios[SOC_DEDIC_GPIO_OUT_CHANNELS_NUM / 2] = {0};
|
||||
|
@ -32,10 +32,6 @@
|
||||
#include "esp_spi_flash.h"
|
||||
#include "esp_attr.h"
|
||||
|
||||
void test_app_include_gpio(void)
|
||||
{
|
||||
}
|
||||
|
||||
// Enable internal routing for the output and input gpio pins
|
||||
#define TEST_GPIO_INTERNAL_ROUTING 1
|
||||
|
||||
|
@ -10,10 +10,6 @@
|
||||
#include "soc/soc_caps.h"
|
||||
#include "driver/sigmadelta.h"
|
||||
|
||||
void test_app_include_sigmadelta(void)
|
||||
{
|
||||
}
|
||||
|
||||
TEST_CASE("SigmaDelta_config_test", "[sigma_delta]")
|
||||
{
|
||||
sigmadelta_config_t sigmadelta_cfg = {
|
||||
|
@ -2,6 +2,7 @@ set(srcs "test_app_main.c"
|
||||
"test_gptimer.c"
|
||||
"test_gptimer_iram.c")
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_gptimer" "-u test_app_include_gptimer_iram")
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -19,10 +19,6 @@
|
||||
#define TEST_ALARM_CALLBACK_ATTR
|
||||
#endif // CONFIG_GPTIMER_ISR_IRAM_SAFE
|
||||
|
||||
void test_app_include_gptimer(void)
|
||||
{
|
||||
}
|
||||
|
||||
TEST_CASE("gptimer_set_get_raw_count", "[gptimer]")
|
||||
{
|
||||
gptimer_config_t config = {
|
||||
|
@ -14,10 +14,6 @@
|
||||
#include "esp_spi_flash.h"
|
||||
#include "soc/soc_caps.h"
|
||||
|
||||
void test_app_include_gptimer_iram(void)
|
||||
{
|
||||
}
|
||||
|
||||
#if CONFIG_GPTIMER_ISR_IRAM_SAFE
|
||||
|
||||
typedef struct {
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_legacy_pcnt.c")
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_legacy_pcnt")
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -666,7 +666,3 @@ TEST_CASE("PCNT_counting_mode_test", "[pcnt]")
|
||||
printf("PCNT mode test for negative count\n");
|
||||
count_mode_test(PCNT_CTRL_GND_IO);
|
||||
}
|
||||
|
||||
void test_app_include_legacy_pcnt(void)
|
||||
{
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
def test_gptimer(dut: Dut) -> None:
|
||||
def test_legacy_pcnt(dut: Dut) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
dut.write('*')
|
||||
dut.expect_unity_test_output(timeout=240)
|
||||
|
@ -1,7 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_rtc_temp_driver.c")
|
||||
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
PRIV_REQUIRES driver unity)
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_rtc_temp_driver")
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -9,10 +9,6 @@
|
||||
#include "unity.h"
|
||||
#include "driver/temp_sensor.h"
|
||||
|
||||
void test_app_include_rtc_temp_driver(void)
|
||||
{
|
||||
}
|
||||
|
||||
TEST_CASE("Temperature_legacy_workflow_test", "[hw_timer]")
|
||||
{
|
||||
printf("Initializing Temperature sensor\n");
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_legacy_timer.c")
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_legacy_timer")
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -1007,7 +1007,3 @@ TEST_CASE("Timer_check_reinitialization_sequence", "[hw_timer]")
|
||||
// The pending timer interrupt should not be triggered
|
||||
TEST_ASSERT_EQUAL(0, timer_group_get_intr_status_in_isr(TIMER_GROUP_0) & TIMER_INTR_T0);
|
||||
}
|
||||
|
||||
void test_app_include_legacy_timer(void)
|
||||
{
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_pulse_cnt.c")
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_pulse_cnt")
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -402,7 +402,3 @@ TEST_CASE("pcnt_zero_cross_mode", "[pcnt]")
|
||||
TEST_ESP_OK(pcnt_del_channel(channelB));
|
||||
TEST_ESP_OK(pcnt_del_unit(unit));
|
||||
}
|
||||
|
||||
void test_app_include_pulse_cnt(void)
|
||||
{
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ from pytest_embedded import Dut
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
def test_gptimer(dut: Dut) -> None:
|
||||
def test_pulse_cnt(dut: Dut) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
dut.write('*')
|
||||
dut.expect_unity_test_output()
|
||||
|
@ -2,4 +2,4 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(test_app_include_temperature_sensor)
|
||||
project(test_temperature_sensor)
|
||||
|
@ -1,7 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_temperature_sensor.c")
|
||||
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
PRIV_REQUIRES driver unity)
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_temperature_sensor")
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -9,10 +9,6 @@
|
||||
#include "unity.h"
|
||||
#include "driver/temperature_sensor.h"
|
||||
|
||||
void test_app_include_temperature_sensor(void)
|
||||
{
|
||||
}
|
||||
|
||||
TEST_CASE("Temperature_sensor_driver_workflow_test", "[temperature_sensor]")
|
||||
{
|
||||
printf("Initializing Temperature sensor\n");
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_i2c_lcd_panel.c")
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_i2c_lcd")
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -14,10 +14,6 @@
|
||||
#include "esp_system.h"
|
||||
#include "test_i2c_board.h"
|
||||
|
||||
void test_app_include_i2c_lcd(void)
|
||||
{
|
||||
}
|
||||
|
||||
TEST_CASE("lcd_panel_with_i2c_interface_(ssd1306)", "[lcd]")
|
||||
{
|
||||
const uint8_t pattern[][16] = {{
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_i80_lcd_panel.c")
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_i80_lcd")
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -17,10 +17,6 @@
|
||||
#include "driver/gpio.h"
|
||||
#include "test_i80_board.h"
|
||||
|
||||
void test_app_include_i80_lcd(void)
|
||||
{
|
||||
}
|
||||
|
||||
#if SOC_I2S_LCD_I80_VARIANT
|
||||
#include "driver/i2s.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_rgb_panel.c")
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_rgb_lcd")
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -23,10 +23,6 @@
|
||||
|
||||
#define TEST_IMG_SIZE (100 * 100 * sizeof(uint16_t))
|
||||
|
||||
void test_app_include_rgb_lcd(void)
|
||||
{
|
||||
}
|
||||
|
||||
static esp_lcd_panel_handle_t test_rgb_panel_initialization(bool stream_mode, esp_lcd_rgb_panel_frame_trans_done_cb_t cb, void *user_data)
|
||||
{
|
||||
esp_lcd_panel_handle_t panel_handle = NULL;
|
||||
|
@ -1,6 +1,7 @@
|
||||
set(srcs "test_app_main.c"
|
||||
"test_spi_lcd_panel.c")
|
||||
|
||||
idf_component_register(SRCS ${srcs})
|
||||
|
||||
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_spi_lcd")
|
||||
# In order for the cases defined by `TEST_CASE` to be linked into the final elf,
|
||||
# the component can be registered as WHOLE_ARCHIVE
|
||||
idf_component_register(SRCS ${srcs}
|
||||
WHOLE_ARCHIVE)
|
||||
|
@ -18,10 +18,6 @@
|
||||
|
||||
#define TEST_SPI_HOST_ID SPI2_HOST
|
||||
|
||||
void test_app_include_spi_lcd(void)
|
||||
{
|
||||
}
|
||||
|
||||
void test_spi_lcd_common_initialize(esp_lcd_panel_io_handle_t *io_handle, esp_lcd_panel_io_color_trans_done_cb_t on_color_trans_done,
|
||||
void *user_data, int cmd_bits, int param_bits, bool oct_mode)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user