ci(esp_rom): upgrade to Catch2 as a component, enable CI build

pull/12732/head
Ivan Grokhotkov 2023-11-27 14:31:16 +01:00
rodzic 79a2c15477
commit 8e81bbe014
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 1E050E141B280628
4 zmienionych plików z 15 dodań i 9 usunięć

Wyświetl plik

@ -1,6 +1,10 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
components/esp_rom/test_apps:
components/esp_rom/test_apps/linux_rom_apis:
enable:
- if: IDF_TARGET == "linux"
components/esp_rom/test_apps/rom_tests:
disable_test:
- if: IDF_TARGET in ["esp32", "esp32c2"]
temporary: false

Wyświetl plik

@ -1,5 +1,8 @@
idf_component_register(SRCS "rom_test.cpp"
INCLUDE_DIRS
"."
$ENV{IDF_PATH}/tools/catch
REQUIRES esp_rom)
INCLUDE_DIRS "."
REQUIRES esp_rom
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)

Wyświetl plik

@ -0,0 +1,2 @@
dependencies:
espressif/catch2: "^3.4.0"

Wyświetl plik

@ -15,7 +15,6 @@
Note that the printf function is roughly tested in the log host test.
*/
#define CATCH_CONFIG_MAIN
#include <cstdio>
#include <regex>
#include <cstring>
@ -24,12 +23,10 @@
#include "esp_rom_crc.h"
#include "esp_rom_md5.h"
#include "catch.hpp"
#include <catch2/catch_test_macros.hpp>
using namespace std;
static const char *TEST_TAG = "test";
// ESP_LOG_EARLY functions are tested in the log host tests and also test rom printf.
TEST_CASE("esp_rom printf returns correct char num")
{