mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-19 14:26:01 -04:00
ci(fatfs): upgrade to Catch2 as a component, enable CI build
This commit is contained in:
parent
8e81bbe014
commit
047e50615e
3
components/fatfs/host_test/.build-test-rules.yml
Normal file
3
components/fatfs/host_test/.build-test-rules.yml
Normal file
@ -0,0 +1,3 @@
|
||||
components/fatfs/host_test:
|
||||
enable:
|
||||
- if: IDF_TARGET == "linux"
|
@ -2,9 +2,7 @@ cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
set(COMPONENTS main)
|
||||
# Freertos is included via common components. However, CATCH isn't compatible with the FreeRTOS component yet, hence
|
||||
# using the FreeRTOS mock component.
|
||||
# target.
|
||||
# This test doesn't require FreeRTOS, uses a mock instead
|
||||
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/mocks/freertos/")
|
||||
|
||||
project(fatfs_host_test)
|
||||
|
@ -1,6 +1,8 @@
|
||||
idf_component_register(SRCS "main.cpp"
|
||||
"test_fatfs.cpp"
|
||||
INCLUDE_DIRS "$ENV{IDF_PATH}/tools/catch"
|
||||
idf_component_register(SRCS "test_fatfs.cpp"
|
||||
REQUIRES fatfs
|
||||
WHOLE_ARCHIVE
|
||||
)
|
||||
|
||||
# Currently 'main' for IDF_TARGET=linux is defined in freertos component.
|
||||
# Since we are using a freertos mock here, need to let Catch2 provide 'main'.
|
||||
target_link_libraries(${COMPONENT_LIB} PRIVATE Catch2WithMain)
|
||||
|
2
components/fatfs/host_test/main/idf_component.yml
Normal file
2
components/fatfs/host_test/main/idf_component.yml
Normal file
@ -0,0 +1,2 @@
|
||||
dependencies:
|
||||
espressif/catch2: "^3.4.0"
|
@ -1,7 +0,0 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include "catch.hpp"
|
@ -12,7 +12,7 @@
|
||||
#include "diskio_impl.h"
|
||||
#include "diskio_wl.h"
|
||||
|
||||
#include "catch.hpp"
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
TEST_CASE("Create volume, open file, write and read back data", "[fatfs]")
|
||||
{
|
||||
@ -158,7 +158,6 @@ TEST_CASE("Test mounting 2 volumes, writing data and formating the 2nd one, read
|
||||
FATFS fs1;
|
||||
wl_handle_t wl_handle1 = WL_INVALID_HANDLE;
|
||||
|
||||
size_t allocation_unit_size = CONFIG_WL_SECTOR_SIZE;
|
||||
size_t data_size = 10;
|
||||
|
||||
|
||||
|
@ -40,6 +40,7 @@ warning: unknown kconfig symbol 'ESPTOOLPY_FLASHSIZE_4MB' assigned to 'y' in /bu
|
||||
warning: unknown kconfig symbol 'ESPTOOLPY_FLASHSIZE' assigned to '"4MB"' in /builds/espressif/esp-idf/components/esp_partition/host_test/partition_api_test/sdkconfig.defaults
|
||||
warning: unknown kconfig symbol 'ESPTOOLPY_FLASHSIZE' assigned to '"4MB"' in /builds/espressif/esp-idf/components/spiffs/host_test/sdkconfig.defaults
|
||||
warning: unknown kconfig symbol 'ESPTOOLPY_FLASHSIZE' assigned to '"8MB"' in /builds/espressif/esp-idf/components/wear_levelling/host_test/sdkconfig.defaults
|
||||
warning: unknown kconfig symbol 'ESPTOOLPY_FLASHSIZE' assigned to '"8MB"' in /builds/espressif/esp-idf/components/fatfs/host_test/sdkconfig.defaults
|
||||
warning: unknown kconfig symbol 'ESPTOOLPY_MONITOR_BAUD_921600B' assigned to 'y' in /builds/espressif/esp-idf/examples/bluetooth/esp_ble_mesh/vendor_models/*
|
||||
warning: unknown kconfig symbol 'FMB_TIMER_GROUP' assigned to '0' in /builds/espressif/esp-idf/examples/protocols/modbus/tcp/*
|
||||
warning: unknown kconfig symbol 'FMB_TIMER_INDEX' assigned to '0' in /builds/espressif/esp-idf/examples/protocols/modbus/tcp/*
|
||||
|
Loading…
Reference in New Issue
Block a user