mirror of
https://github.com/espressif/esp-idf.git
synced 2026-01-19 21:04:48 +00:00
feat(cmakev2): Enabled test_cmake.py for cmakev2 in CI
This commit is contained in:
committed by
Frantisek Hrbata
parent
419ff4568b
commit
514a27073d
@@ -283,6 +283,7 @@ pytest_buildv2_system:
|
||||
test_versions.py
|
||||
test_common.py
|
||||
test_components.py
|
||||
test_cmake.py
|
||||
|
||||
pytest_build_system_macos:
|
||||
extends:
|
||||
|
||||
@@ -12,6 +12,7 @@ from test_build_system_helpers import EnvDict
|
||||
from test_build_system_helpers import IdfPyFunc
|
||||
from test_build_system_helpers import append_to_file
|
||||
from test_build_system_helpers import file_contains
|
||||
from test_build_system_helpers import replace_in_file
|
||||
from test_build_system_helpers import run_cmake
|
||||
from test_build_system_helpers import run_cmake_and_build
|
||||
|
||||
@@ -48,6 +49,7 @@ def test_build_custom_cmake_project_host() -> None:
|
||||
run_cmake_and_build(str(idf_path / 'examples' / 'build_system' / 'cmake' / 'idf_as_lib'), '-G', 'Ninja')
|
||||
|
||||
|
||||
@pytest.mark.buildv2_skip('import_lib example uses cmakev1, not yet updated for buildv2 (IDF-14185)')
|
||||
def test_build_cmake_library_psram_workaround(test_app_copy: Path) -> None:
|
||||
logging.info(
|
||||
'Building a project with CMake library imported and PSRAM workaround, all files compile with workaround'
|
||||
@@ -73,6 +75,14 @@ def test_build_cmake_library_psram_workaround(test_app_copy: Path) -> None:
|
||||
|
||||
|
||||
def test_build_cmake_library_psram_strategies(idf_py: IdfPyFunc, test_app_copy: Path) -> None:
|
||||
# Add explicit REQUIRES for cmakev2 compatibility
|
||||
# Adding a public dependency on esp_psram should propagate the compile options publicly.
|
||||
replace_in_file(
|
||||
test_app_copy / 'main' / 'CMakeLists.txt',
|
||||
'# placeholder_inside_idf_component_register',
|
||||
'REQUIRES esp_psram',
|
||||
)
|
||||
|
||||
for strategy in ['DUPLDST', 'NOPS', 'MEMW']:
|
||||
logging.info(f'Test for external libraries in custom CMake projects with PSRAM strategy {strategy}')
|
||||
(test_app_copy / 'sdkconfig.defaults').write_text(
|
||||
|
||||
Reference in New Issue
Block a user