diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 9346503e48..2fbcea9a5e 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -1610,7 +1610,6 @@ tools/templates/sample_component/include/main.h tools/templates/sample_component/main.c tools/test_apps/build_system/embed_test/main/test_main.c tools/test_apps/build_system/ldalign_test/main/test_main.c -tools/test_apps/build_system/ldgen_test/check_placements.py tools/test_apps/build_system/ldgen_test/main/src1.c tools/test_apps/build_system/ldgen_test/main/src2.c tools/test_apps/build_system/ldgen_test/main/test_main.c diff --git a/tools/test_apps/.build-test-rules.yml b/tools/test_apps/.build-test-rules.yml index a0d6b22dd5..ab8b54c347 100644 --- a/tools/test_apps/.build-test-rules.yml +++ b/tools/test_apps/.build-test-rules.yml @@ -5,11 +5,11 @@ tools/test_apps/build_system/custom_partition_subtypes: - if: IDF_TARGET in ["esp32", "linux"] reason: the test should be run on ESP32 and linux -tools/test_apps/build_system/ldgen_test: - disable: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: target esp32c2 is not supported yet +tools/test_apps/build_system/embed_test: + enable: + - if: IDF_TARGET in ["esp32", "esp32c3"] + temporary: false + reason: Hardware independent feature, no need to test on all targets tools/test_apps/linux_compatible/driver_mock: enable: @@ -168,14 +168,6 @@ tools/test_apps/system/no_embedded_paths: temporary: true reason: the other targets are not tested yet -tools/test_apps/system/panic: - enable: - - if: INCLUDE_DEFAULT == 1 - disable_test: - - if: IDF_TARGET not in ["esp32", "esp32s2", "esp32c3", "esp32s3", "esp32c2", "esp32c6", "esp32h2"] - temporary: true - reason: test app not ported to this target yet - tools/test_apps/system/ram_loadable_app: disable: - if: IDF_TARGET == "esp32h2" @@ -183,8 +175,8 @@ tools/test_apps/system/ram_loadable_app: reason: lack of runners tools/test_apps/system/startup: - enable: - - if: INCLUDE_DEFAULT == 1 or IDF_TARGET in ["esp32c6"] # preview targets + disable: + - if: CONFIG_NAME == "main_task_cpu1" and IDF_TARGET not in ["esp32", "esp32s3"] tools/test_apps/system/test_watchpoint: enable: diff --git a/tools/test_apps/build_system/embed_test/README.md b/tools/test_apps/build_system/embed_test/README.md index a8b7833fa3..1fb88efd15 100644 --- a/tools/test_apps/build_system/embed_test/README.md +++ b/tools/test_apps/build_system/embed_test/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C3 | +| ----------------- | ----- | -------- | diff --git a/tools/test_apps/build_system/ldgen_test/CMakeLists.txt b/tools/test_apps/build_system/ldgen_test/CMakeLists.txt index 9611218524..bf6fc1bd6a 100644 --- a/tools/test_apps/build_system/ldgen_test/CMakeLists.txt +++ b/tools/test_apps/build_system/ldgen_test/CMakeLists.txt @@ -8,8 +8,12 @@ project(ldgen_test) idf_build_get_property(python PYTHON) idf_build_get_property(elf EXECUTABLE) +if(NOT CONFIG_SOC_RTC_MEM_SUPPORTED) + set(args "--no-rtc") +endif() + add_custom_command( TARGET ${elf} POST_BUILD - COMMAND ${python} ${CMAKE_CURRENT_LIST_DIR}/check_placements.py ${CMAKE_OBJDUMP} $ + COMMAND ${python} ${CMAKE_CURRENT_LIST_DIR}/check_placements.py ${args} ${CMAKE_OBJDUMP} $ ) diff --git a/tools/test_apps/build_system/ldgen_test/README.md b/tools/test_apps/build_system/ldgen_test/README.md index 63d036cfb6..53ca53df9d 100644 --- a/tools/test_apps/build_system/ldgen_test/README.md +++ b/tools/test_apps/build_system/ldgen_test/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | Runs a build test to check ldgen places libraries, objects and symbols correctly as specified in the linker fragments. Specifically, this app diff --git a/tools/test_apps/build_system/ldgen_test/check_placements.py b/tools/test_apps/build_system/ldgen_test/check_placements.py index 49577aea8f..e2dcd93c84 100644 --- a/tools/test_apps/build_system/ldgen_test/check_placements.py +++ b/tools/test_apps/build_system/ldgen_test/check_placements.py @@ -1,18 +1,7 @@ #!/usr/bin/env python # -# Copyright 2020 Espressif Systems (Shanghai) PTE LTD -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# SPDX-FileCopyrightText: 2020-2023 Espressif Systems (Shanghai) CO LTD +# SPDX-License-Identifier: Apache-2.0 # # Check placements in this test app for main @@ -27,6 +16,7 @@ argparser = argparse.ArgumentParser() argparser.add_argument('objdump') argparser.add_argument('elf') +argparser.add_argument('--no-rtc', action='store_true') args = argparser.parse_args() @@ -68,7 +58,8 @@ assert sym1_end % 12 == 0, '_sym1_end is not aligned as specified in linker frag print('check placement pass: _sym1_start < func1 < __sym1_end and alignments checked') # src1:func2 (rtc) - explicit mapping for func2 using 'rtc' scheme -check_location('func2', '.rtc.text') +if not args.no_rtc: + check_location('func2', '.rtc.text') # src1 (default) - only func3 in src1 remains that has not been # mapped using a different scheme diff --git a/tools/test_apps/build_system/rsource_test/CMakeLists.txt b/tools/test_apps/build_system/rsource_test/CMakeLists.txt deleted file mode 100644 index aa2aa5609f..0000000000 --- a/tools/test_apps/build_system/rsource_test/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# The following lines of boilerplate have to be in your project's -# CMakeLists in this exact order for cmake to work correctly -cmake_minimum_required(VERSION 3.16) - -include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(rsource_test) diff --git a/tools/test_apps/build_system/rsource_test/Kconfig.extra b/tools/test_apps/build_system/rsource_test/Kconfig.extra deleted file mode 100644 index 39898bb615..0000000000 --- a/tools/test_apps/build_system/rsource_test/Kconfig.extra +++ /dev/null @@ -1,5 +0,0 @@ -menu "RSOURCE test" - config RSOURCE_EXTRA_CONFIG - bool "rsource extra config" - default y -endmenu diff --git a/tools/test_apps/build_system/rsource_test/README.md b/tools/test_apps/build_system/rsource_test/README.md deleted file mode 100644 index a8b7833fa3..0000000000 --- a/tools/test_apps/build_system/rsource_test/README.md +++ /dev/null @@ -1,2 +0,0 @@ -| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-S2 | ESP32-S3 | -| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | diff --git a/tools/test_apps/build_system/rsource_test/README.txt b/tools/test_apps/build_system/rsource_test/README.txt deleted file mode 100644 index 4f46d42557..0000000000 --- a/tools/test_apps/build_system/rsource_test/README.txt +++ /dev/null @@ -1 +0,0 @@ -This project tests that use of rsource in Kconfig files. The main component will source a Kconfig file depending on the target (IDF_TARGET), which in turn will source a Kconfig file in the project directory -- all specified via relative paths. diff --git a/tools/test_apps/build_system/rsource_test/main/CMakeLists.txt b/tools/test_apps/build_system/rsource_test/main/CMakeLists.txt deleted file mode 100644 index 60667b806e..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -idf_component_register(SRCS "test_main.c" - INCLUDE_DIRS ".") - -if(NOT CONFIG_RSOURCE_EXTRA_CONFIG) - message(FATAL_ERROR "RSOURCE config not included") -endif() diff --git a/tools/test_apps/build_system/rsource_test/main/Kconfig b/tools/test_apps/build_system/rsource_test/main/Kconfig deleted file mode 100644 index de3b8a76c9..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/Kconfig +++ /dev/null @@ -1 +0,0 @@ -rsource "port/$IDF_TARGET/Kconfig.port" diff --git a/tools/test_apps/build_system/rsource_test/main/port/esp32/Kconfig.port b/tools/test_apps/build_system/rsource_test/main/port/esp32/Kconfig.port deleted file mode 100644 index c18c28fd4d..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/port/esp32/Kconfig.port +++ /dev/null @@ -1 +0,0 @@ -rsource "../../../Kconfig.extra" diff --git a/tools/test_apps/build_system/rsource_test/main/port/esp32c2/Kconfig.port b/tools/test_apps/build_system/rsource_test/main/port/esp32c2/Kconfig.port deleted file mode 100644 index c18c28fd4d..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/port/esp32c2/Kconfig.port +++ /dev/null @@ -1 +0,0 @@ -rsource "../../../Kconfig.extra" diff --git a/tools/test_apps/build_system/rsource_test/main/port/esp32c3/Kconfig.port b/tools/test_apps/build_system/rsource_test/main/port/esp32c3/Kconfig.port deleted file mode 100644 index c18c28fd4d..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/port/esp32c3/Kconfig.port +++ /dev/null @@ -1 +0,0 @@ -rsource "../../../Kconfig.extra" diff --git a/tools/test_apps/build_system/rsource_test/main/port/esp32c6/Kconfig.port b/tools/test_apps/build_system/rsource_test/main/port/esp32c6/Kconfig.port deleted file mode 100644 index c18c28fd4d..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/port/esp32c6/Kconfig.port +++ /dev/null @@ -1 +0,0 @@ -rsource "../../../Kconfig.extra" diff --git a/tools/test_apps/build_system/rsource_test/main/port/esp32h2/Kconfig.port b/tools/test_apps/build_system/rsource_test/main/port/esp32h2/Kconfig.port deleted file mode 100644 index c18c28fd4d..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/port/esp32h2/Kconfig.port +++ /dev/null @@ -1 +0,0 @@ -rsource "../../../Kconfig.extra" diff --git a/tools/test_apps/build_system/rsource_test/main/port/esp32s2/Kconfig.port b/tools/test_apps/build_system/rsource_test/main/port/esp32s2/Kconfig.port deleted file mode 100644 index c18c28fd4d..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/port/esp32s2/Kconfig.port +++ /dev/null @@ -1 +0,0 @@ -rsource "../../../Kconfig.extra" diff --git a/tools/test_apps/build_system/rsource_test/main/port/esp32s3/Kconfig.port b/tools/test_apps/build_system/rsource_test/main/port/esp32s3/Kconfig.port deleted file mode 100644 index c18c28fd4d..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/port/esp32s3/Kconfig.port +++ /dev/null @@ -1 +0,0 @@ -rsource "../../../Kconfig.extra" diff --git a/tools/test_apps/build_system/rsource_test/main/test_main.c b/tools/test_apps/build_system/rsource_test/main/test_main.c deleted file mode 100644 index cb05851571..0000000000 --- a/tools/test_apps/build_system/rsource_test/main/test_main.c +++ /dev/null @@ -1,3 +0,0 @@ -void app_main(void) -{ -} diff --git a/tools/test_apps/system/startup/pytest_startup.py b/tools/test_apps/system/startup/pytest_startup.py index 95ca66da87..75dbf1ecbe 100644 --- a/tools/test_apps/system/startup/pytest_startup.py +++ b/tools/test_apps/system/startup/pytest_startup.py @@ -1,22 +1,20 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut -@pytest.mark.supported_targets -@pytest.mark.preview_targets @pytest.mark.generic @pytest.mark.parametrize('config', [ - 'default', - 'flash_80m_qio', - 'no_vfs', - 'no_vfs_partial', - 'opt_o0', - 'opt_o2', - 'stack_check', - 'verbose_log', + pytest.param('flash_80m_qio', marks=[pytest.mark.supported_targets]), + pytest.param('no_vfs', marks=[pytest.mark.supported_targets]), + pytest.param('no_vfs_partial', marks=[pytest.mark.supported_targets]), + pytest.param('opt_o0', marks=[pytest.mark.supported_targets]), + pytest.param('opt_o2', marks=[pytest.mark.supported_targets]), + pytest.param('stack_check_verbose_log', marks=[pytest.mark.supported_targets]), + pytest.param('sram1_iram', marks=[pytest.mark.esp32]), + pytest.param('main_task_cpu1', marks=[pytest.mark.esp32, pytest.mark.esp32s3]), ], indirect=True) def test_sys_startup(dut: Dut) -> None: dut.expect_exact('app_main running') @@ -25,7 +23,9 @@ def test_sys_startup(dut: Dut) -> None: @pytest.mark.esp32 @pytest.mark.esp32s3 @pytest.mark.generic -@pytest.mark.parametrize('config', ['single_core_variant'], indirect=True) +@pytest.mark.parametrize('config', [ + 'single_core_variant', +], indirect=True) def test_sys_startup_single_core_variant(dut: Dut) -> None: dut.expect('Running on single core variant of a chip, but app is built with multi-core support.') dut.expect(r'abort\(\) was called at PC [0-9xa-f]+ on core 0') diff --git a/tools/test_apps/system/startup/sdkconfig.ci.default b/tools/test_apps/system/startup/sdkconfig.ci.default deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tools/test_apps/system/startup/sdkconfig.ci.stack_check b/tools/test_apps/system/startup/sdkconfig.ci.stack_check deleted file mode 100644 index ff2493ddc5..0000000000 --- a/tools/test_apps/system/startup/sdkconfig.ci.stack_check +++ /dev/null @@ -1,2 +0,0 @@ -CONFIG_COMPILER_STACK_CHECK_MODE_ALL=y -CONFIG_COMPILER_STACK_CHECK=y diff --git a/tools/test_apps/system/startup/sdkconfig.ci.verbose_log b/tools/test_apps/system/startup/sdkconfig.ci.stack_check_verbose_log similarity index 70% rename from tools/test_apps/system/startup/sdkconfig.ci.verbose_log rename to tools/test_apps/system/startup/sdkconfig.ci.stack_check_verbose_log index 36a4add1fd..be57fa95e8 100644 --- a/tools/test_apps/system/startup/sdkconfig.ci.verbose_log +++ b/tools/test_apps/system/startup/sdkconfig.ci.stack_check_verbose_log @@ -1,3 +1,5 @@ +CONFIG_COMPILER_STACK_CHECK_MODE_ALL=y +CONFIG_COMPILER_STACK_CHECK=y CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE=y CONFIG_BOOTLOADER_LOG_LEVEL=5 CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y