-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change(ccomp_timer): move unit tests to component test app
- Loading branch information
Showing
12 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
ccomp_timer/test_apps: | ||
enable: | ||
- if: IDF_TARGET in ["esp32", "esp32s2", "esp32c3"] | ||
reason: "Testing on these targets is sufficient (xtensa, risc-v, single/dual core)." |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||
set(COMPONENTS main) | ||
project(ccomp_timer_test) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
idf_build_get_property(arch IDF_TARGET_ARCH) | ||
|
||
set(priv_requires esp_timer unity) | ||
if("${arch}" STREQUAL "xtensa") | ||
list(APPEND priv_requires perfmon) | ||
endif() | ||
|
||
idf_component_register(SRCS "ccomp_timer_test.c" | ||
"ccomp_timer_test_api.c" | ||
"ccomp_timer_test_data.c" | ||
"ccomp_timer_test_inst.c" | ||
PRIV_INCLUDE_DIRS "." | ||
PRIV_REQUIRES ${priv_requires} | ||
WHOLE_ARCHIVE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include "unity.h" | ||
#include "unity_test_runner.h" | ||
#include "esp_heap_caps.h" | ||
#include "esp_newlib.h" | ||
#include "unity_test_utils_memory.h" | ||
|
||
void setUp(void) | ||
{ | ||
unity_utils_record_free_mem(); | ||
} | ||
|
||
void tearDown(void) | ||
{ | ||
esp_reent_cleanup(); //clean up some of the newlib's lazy allocations | ||
unity_utils_evaluate_leaks_direct(50); | ||
} | ||
|
||
void app_main(void) | ||
{ | ||
printf("Running ccomp_timer component tests\n"); | ||
unity_run_menu(); | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
dependencies: | ||
espressif/ccomp_timer: | ||
version: "*" | ||
override_path: ../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import pytest | ||
|
||
|
||
@pytest.mark.generic | ||
def test_ccomp_timer(dut) -> None: | ||
dut.run_all_single_board_cases() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file was generated using idf.py save-defconfig. It can be edited manually. | ||
# Espressif IoT Development Framework (ESP-IDF) 5.4.0 Project Minimal Configuration | ||
# | ||
CONFIG_ESP_TASK_WDT_INIT=n |