diff --git a/components/freertos/app_startup.c b/components/freertos/app_startup.c index 3550186585..85319806bd 100644 --- a/components/freertos/app_startup.c +++ b/components/freertos/app_startup.c @@ -199,6 +199,10 @@ static void main_task(void* args) ESP_ERROR_CHECK(esp_task_wdt_init(&twdt_config)); #endif // CONFIG_ESP_TASK_WDT + /* + Note: Be careful when changing the "Calling app_main()" log below as multiple pytest scripts expect this log as a + start-of-application marker. + */ ESP_LOGI(MAIN_TAG, "Calling app_main()"); extern void app_main(void); app_main(); diff --git a/examples/build_system/cmake/plugins/pytest_plugins.py b/examples/build_system/cmake/plugins/pytest_plugins.py index dc1d261269..beedccb790 100644 --- a/examples/build_system/cmake/plugins/pytest_plugins.py +++ b/examples/build_system/cmake/plugins/pytest_plugins.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import textwrap @@ -16,7 +16,7 @@ def test_plugins(dut: Dut) -> None: Successfully registered plugin 'Nihao' Hello plugin performing self-registration... Successfully registered plugin 'Hello' - cpu_start: Starting scheduler + main_task: Calling app_main() List of plugins: - Plugin 'Hello' - Plugin 'Nihao' diff --git a/examples/system/efuse/example_test.py b/examples/system/efuse/example_test.py index f586cf838e..8cb760a4ac 100644 --- a/examples/system/efuse/example_test.py +++ b/examples/system/efuse/example_test.py @@ -286,8 +286,8 @@ def test_examples_efuse_with_virt_secure_boot_v1(env, _): # type: (ttfw_idf.Tin dut.expect('Disable ROM BASIC interpreter fallback...') dut.expect('secure_boot_v1: secure boot is now enabled for bootloader image') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -312,8 +312,8 @@ def test_examples_efuse_with_virt_secure_boot_v1_pre_loaded(env, _): # type: (t dut.bootloader_flash() dut.start_app() dut.expect('Loading virtual efuse blocks from real efuses') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -339,8 +339,8 @@ def test_examples_efuse_with_virt_secure_boot_v1_pre_loaded(env, _): # type: (t dut.expect('Disable ROM BASIC interpreter fallback...') dut.expect('secure_boot_v1: secure boot is now enabled for bootloader image') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -527,8 +527,8 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32xx(env, _): # type: (ttfw dut.expect('Disable hardware & software JTAG...') dut.expect('secure_boot_v2: Secure boot permanently enabled') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -554,8 +554,8 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(env, _): # dut.bootloader_flash() dut.start_app() dut.expect('Loading virtual efuse blocks from real efuses') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -595,8 +595,8 @@ def test_examples_efuse_with_virt_secure_boot_v2_esp32xx_pre_loaded(env, _): # dut.expect('Disable hardware & software JTAG...') dut.expect('secure_boot_v2: Secure boot permanently enabled') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') + dut.expect('main_task: Calling app_main()') dut.expect('Start eFuse example') dut.expect('example: Done') @@ -665,7 +665,6 @@ def test_examples_efuse_with_virt_sb_v1_and_fe(env, _): # type: (ttfw_idf.TinyF dut.expect('Checking secure boot...') dut.expect('secure_boot_v1: bootloader secure boot is already enabled, continuing..') - dut.expect('cpu_start: Pro cpu up') dut.expect('Loading virtual efuse blocks from flash') dut.expect('flash_encrypt: Flash encryption mode is DEVELOPMENT (not secure)') dut.expect('Start eFuse example') diff --git a/examples/system/eventfd/pytest_eventfd.py b/examples/system/eventfd/pytest_eventfd.py index 093879a19f..1e37d20d00 100644 --- a/examples/system/eventfd/pytest_eventfd.py +++ b/examples/system/eventfd/pytest_eventfd.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import logging @@ -16,7 +16,7 @@ from pytest_embedded import Dut @pytest.mark.generic def test_eventfd(dut: Dut) -> None: - dut.expect_exact('cpu_start: Starting scheduler') + dut.expect_exact('main_task: Calling app_main()') exp_list_5seconds = [ 'eventfd_example: Select timeouted for 1 times', diff --git a/examples/system/select/pytest_select.py b/examples/system/select/pytest_select.py index c09a176db1..5309493a33 100644 --- a/examples/system/select/pytest_select.py +++ b/examples/system/select/pytest_select.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import logging import os @@ -25,7 +25,7 @@ def get_uart_msgs(i: int) -> List[str]: @pytest.mark.generic def test_examples_select(dut: Dut) -> None: - dut.expect_exact('cpu_start: Starting scheduler', timeout=30) + dut.expect_exact('main_task: Calling app_main()', timeout=30) exp_list = [] for i in range(1, 10):