mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-03 19:41:55 +02:00
unity: separate common and IDF specific functionality
New unity component can be used for testing other applications. Upstream version of Unity is included as a submodule. Utilities specific to ESP-IDF unit tests (partitions, leak checking setup/teardown functions, etc) are kept only in unit-test-app. Kconfig options are added to allow disabling certain Unity features.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
// limitations under the License.
|
||||
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
* @file esp_clk.h
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
set(COMPONENT_SRCDIRS ".")
|
||||
set(COMPONENT_ADD_INCLUDEDIRS ". ${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
||||
set(COMPONENT_REQUIRES unity nvs_flash ulp)
|
||||
set(COMPONENT_REQUIRES unity test_utils nvs_flash ulp)
|
||||
|
||||
register_component()
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "freertos/xtensa_timer.h"
|
||||
#include "soc/cpu.h"
|
||||
#include "unity.h"
|
||||
#include "test_utils.h"
|
||||
#include "rom/uart.h"
|
||||
#include "rom/sha.h"
|
||||
#include "soc/uart_reg.h"
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
#include "freertos/xtensa_timer.h"
|
||||
#include "soc/cpu.h"
|
||||
#include "unity.h"
|
||||
#include "test_utils.h"
|
||||
#include "rom/uart.h"
|
||||
#include "soc/uart_reg.h"
|
||||
#include "soc/dport_reg.h"
|
||||
#include "soc/rtc.h"
|
||||
|
||||
#define MHZ (1000000)
|
||||
static volatile bool exit_flag;
|
||||
static bool dport_test_result;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "soc/soc.h" // for direct register read macros
|
||||
#include "rom/rtc.h"
|
||||
#include "esp_newlib.h"
|
||||
#include "test_utils.h"
|
||||
|
||||
#define ESP_EXT0_WAKEUP_LEVEL_LOW 0
|
||||
#define ESP_EXT0_WAKEUP_LEVEL_HIGH 1
|
||||
|
||||
Reference in New Issue
Block a user