ci(log): upgrade to Catch2 as a component

This commit is contained in:
Ivan Grokhotkov 2023-11-27 14:34:10 +01:00
parent 88e77ba1ed
commit 33896fe67e
No known key found for this signature in database
GPG Key ID: 1E050E141B280628
3 changed files with 10 additions and 6 deletions

View File

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

View File

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

View File

@ -6,13 +6,12 @@
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#define CATCH_CONFIG_MAIN
#include <cstdio>
#include <regex>
#include <iostream>
#include "esp_log.h"
#include "catch.hpp"
#include <catch2/catch_test_macros.hpp>
using namespace std;