parent
c29c218b85
commit
6584060296
@ -0,0 +1,33 @@ |
|||||||
|
# For more information about build system see |
||||||
|
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/build-system.html |
||||||
|
set(CMAKE_CXX_STANDARD 17) |
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON) |
||||||
|
|
||||||
|
# ESP-ADF clobbers EXTRA_COMPONENT_DIRS, so include it first. |
||||||
|
include($ENV{ADF_PATH}/CMakeLists.txt) |
||||||
|
|
||||||
|
# Build only the subset of components that we actually depend on. |
||||||
|
set(COMPONENTS "") |
||||||
|
|
||||||
|
# External dependencies |
||||||
|
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{PROJ_PATH}/lib/result") |
||||||
|
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{PROJ_PATH}/lib/lvgl") |
||||||
|
|
||||||
|
# Project components |
||||||
|
list(APPEND EXTRA_COMPONENT_DIRS "$ENV{PROJ_PATH}/src") |
||||||
|
|
||||||
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake) |
||||||
|
|
||||||
|
# Additional warnings used when compiling our components. |
||||||
|
# Unable to be used due to issues in ESP-IDF includes are: -Wpedantic |
||||||
|
# -Wuseless-cast -Wconversion -Wold-style-cast -Wsign-conversion -Wcast-align |
||||||
|
set(EXTRA_WARNINGS "-Wshadow" "-Wnon-virtual-dtor" "-Wunused" |
||||||
|
"-Woverloaded-virtual" "-Wmisleading-indentation" "-Wduplicated-cond" |
||||||
|
"-Wduplicated-branches" "-Wlogical-op" "-Wnull-dereference" |
||||||
|
"-Wdouble-promotion" "-Wformat=2" "-Wimplicit-fallthrough") |
||||||
|
|
||||||
|
# Extra build flags that should apply to the entire build. This should mostly |
||||||
|
# just be used to setting flags that our external dependencies requires. |
||||||
|
# Otherwise, prefer adding per-component build flags to keep things neat. |
||||||
|
idf_build_set_property( |
||||||
|
COMPILE_OPTIONS "-DRESULT_DISABLE_EXCEPTIONS -DLV_CONF_INCLUDE_SIMPLE" APPEND) |
@ -0,0 +1 @@ |
|||||||
|
idf_component_register(SRC_DIRS "." INCLUDE_DIRS "." REQUIRES cmock drivers) |
@ -0,0 +1,9 @@ |
|||||||
|
#include "unity.h" |
||||||
|
|
||||||
|
TEST_CASE("Example test case", "[cooltag]") { |
||||||
|
TEST_ASSERT_EQUAL(0, 0); |
||||||
|
} |
||||||
|
|
||||||
|
TEST_CASE("test that doesn't run", "[cooltag][ignore]") { |
||||||
|
TEST_ASSERT_EQUAL(0, 1); |
||||||
|
} |
@ -0,0 +1,10 @@ |
|||||||
|
cmake_minimum_required(VERSION 3.16) |
||||||
|
include(../common.cmake) |
||||||
|
|
||||||
|
# Treat warnings as errors for test purposes. |
||||||
|
list(APPEND EXTRA_WARNINGS "-Werror") |
||||||
|
|
||||||
|
# List all components that include tests here. |
||||||
|
set(TEST_COMPONENTS "drivers") |
||||||
|
|
||||||
|
project(device_tests) |
@ -0,0 +1 @@ |
|||||||
|
idf_component_register(SRCS "main.c" INCLUDE_DIRS ".") |
@ -0,0 +1,22 @@ |
|||||||
|
#include <stdio.h> |
||||||
|
#include <string.h> |
||||||
|
#include "unity.h" |
||||||
|
|
||||||
|
static void print_banner(const char* text); |
||||||
|
|
||||||
|
void app_main(void) |
||||||
|
{ |
||||||
|
print_banner("Running tests without [ignore] tag"); |
||||||
|
UNITY_BEGIN(); |
||||||
|
unity_run_tests_by_tag("[ignore]", true); |
||||||
|
UNITY_END(); |
||||||
|
|
||||||
|
print_banner("Starting interactive test menu"); |
||||||
|
unity_run_menu(); |
||||||
|
} |
||||||
|
|
||||||
|
static void print_banner(const char* text) |
||||||
|
{ |
||||||
|
printf("\n#### %s #####\n\n", text); |
||||||
|
} |
||||||
|
|
@ -0,0 +1,2 @@ |
|||||||
|
CONFIG_ESP_TASK_WDT=n |
||||||
|
|
Loading…
Reference in new issue