mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
Add an opt_os_lto configuration to the startup test app that enables size optimization together with link-time and compile-time LTO, and run it across the supported targets so the LTO build is exercised on real hardware in CI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
|
# SPDX-License-Identifier: CC0-1.0
|
|
import pytest
|
|
from pytest_embedded import Dut
|
|
from pytest_embedded_idf.utils import idf_parametrize
|
|
|
|
|
|
@pytest.mark.generic
|
|
@idf_parametrize(
|
|
'config,target',
|
|
[
|
|
('flash_80m_qio', 'supported_targets'),
|
|
('no_vfs', 'supported_targets'),
|
|
('no_vfs_partial', 'supported_targets'),
|
|
('opt_o0', 'supported_targets'),
|
|
('opt_o2', 'supported_targets'),
|
|
('opt_os_lto', 'supported_targets'),
|
|
('stack_check_verbose_log', 'supported_targets'),
|
|
('sram1_iram', 'esp32'),
|
|
('main_task_cpu1', 'esp32'),
|
|
('main_task_cpu1', 'esp32s3'),
|
|
],
|
|
indirect=['config', 'target'],
|
|
)
|
|
def test_sys_startup(dut: Dut) -> None:
|
|
dut.expect_exact('app_main running')
|
|
|
|
|
|
@pytest.mark.generic
|
|
@pytest.mark.parametrize(
|
|
'config',
|
|
[
|
|
'single_core_variant',
|
|
],
|
|
indirect=True,
|
|
)
|
|
@idf_parametrize('target', ['esp32', 'esp32s3'], indirect=['target'])
|
|
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')
|