mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
ci: Migrate esp_http_server unit tests from unit-test-app to component-test-app
This commit is contained in:
parent
1d95823b83
commit
cae004a815
@ -1,4 +0,0 @@
|
||||
idf_component_register(SRC_DIRS "."
|
||||
PRIV_INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES cmock test_utils esp_http_server)
|
||||
target_compile_options(${COMPONENT_LIB} PRIVATE "-Wno-format")
|
7
components/esp_http_server/test_apps/CMakeLists.txt
Normal file
7
components/esp_http_server/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_server_test)
|
2
components/esp_http_server/test_apps/README.md
Normal file
2
components/esp_http_server/test_apps/README.md
Normal file
@ -0,0 +1,2 @@
|
||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-S2 | ESP32-S3 |
|
||||
| ----------------- | ----- | -------- | -------- | -------- | -------- |
|
3
components/esp_http_server/test_apps/main/CMakeLists.txt
Normal file
3
components/esp_http_server/test_apps/main/CMakeLists.txt
Normal file
@ -0,0 +1,3 @@
|
||||
idf_component_register(SRC_DIRS "."
|
||||
PRIV_INCLUDE_DIRS "."
|
||||
PRIV_REQUIRES esp_http_server test_utils unity)
|
@ -243,3 +243,8 @@ TEST_CASE("Max Allowed Sockets Test", "[HTTP SERVER]")
|
||||
config.max_open_sockets += 1;
|
||||
TEST_ASSERT(httpd_start(&hd, &config) != ESP_OK);
|
||||
}
|
||||
|
||||
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_server(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_server/test_apps/sdkconfig.defaults
Normal file
9
components/esp_http_server/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
|
Loading…
x
Reference in New Issue
Block a user