mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-06 22:24:33 +02:00
Merge branch 'ci/migrate_http_client_unit_test_app' into 'master'
ci: Migrate unit-test for esp_http_client to component-test-apps See merge request espressif/esp-idf!19578
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
idf_component_register(SRC_DIRS "."
|
||||
PRIV_INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES cmock test_utils esp_http_client)
|
||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
7
components/esp_http_client/test_apps/CMakeLists.txt
Normal file
7
components/esp_http_client/test_apps/CMakeLists.txt
Normal file
@@ -0,0 +1,7 @@
|
||||
#This is the project CMakeLists.txt file for the test subproject
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
set(EXTRA_COMPONENT_DIRS "$ENV{IDF_PATH}/tools/unit-test-app/components")
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(esp_http_client_test)
|
3
components/esp_http_client/test_apps/README.md
Normal file
3
components/esp_http_client/test_apps/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
||||
|
3
components/esp_http_client/test_apps/main/CMakeLists.txt
Normal file
3
components/esp_http_client/test_apps/main/CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
idf_component_register(SRC_DIRS "."
|
||||
PRIV_INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES esp_http_client test_utils unity)
|
@@ -145,3 +145,8 @@ TEST_CASE("esp_http_client_init() should return NULL if configured with wrong ur
|
||||
TEST_ASSERT_NULL(client);
|
||||
esp_http_client_cleanup(client);
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
unity_run_menu();
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
|
||||
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
def test_esp_http_client(dut: Dut) -> None:
|
||||
dut.expect_exact('Press ENTER to see the list of tests')
|
||||
dut.write('*')
|
||||
dut.expect_unity_test_output()
|
9
components/esp_http_client/test_apps/sdkconfig.defaults
Normal file
9
components/esp_http_client/test_apps/sdkconfig.defaults
Normal file
@@ -0,0 +1,9 @@
|
||||
# General options for additional checks
|
||||
CONFIG_HEAP_POISONING_COMPREHENSIVE=y
|
||||
CONFIG_COMPILER_WARN_WRITE_STRINGS=y
|
||||
CONFIG_BOOTLOADER_LOG_LEVEL_WARN=y
|
||||
CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK=y
|
||||
CONFIG_COMPILER_STACK_CHECK_MODE_STRONG=y
|
||||
CONFIG_COMPILER_STACK_CHECK=y
|
||||
|
||||
CONFIG_ESP_TASK_WDT=n
|
Reference in New Issue
Block a user