forked from espressif/esp-idf
ci(log): upgrade to Catch2 as a component
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
idf_component_register(SRCS "log_test.cpp"
|
idf_component_register(SRCS "log_test.cpp"
|
||||||
INCLUDE_DIRS
|
INCLUDE_DIRS "."
|
||||||
"."
|
REQUIRES log
|
||||||
$ENV{IDF_PATH}/tools/catch
|
WHOLE_ARCHIVE)
|
||||||
REQUIRES log)
|
|
||||||
|
# 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/log/host_test/log_test/main/idf_component.yml
Normal file
2
components/log/host_test/log_test/main/idf_component.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
dependencies:
|
||||||
|
espressif/catch2: "^3.4.0"
|
@@ -6,13 +6,12 @@
|
|||||||
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||||
CONDITIONS OF ANY KIND, either express or implied.
|
CONDITIONS OF ANY KIND, either express or implied.
|
||||||
*/
|
*/
|
||||||
#define CATCH_CONFIG_MAIN
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <regex>
|
#include <regex>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include "esp_log.h"
|
#include "esp_log.h"
|
||||||
|
|
||||||
#include "catch.hpp"
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user