[espidf] Warn instead of skipping libraries with framework mismatch (#16630)

This commit is contained in:
Jonathan Swoboda
2026-05-25 10:08:16 -04:00
committed by GitHub
parent e7ab78366d
commit 98e7213387
2 changed files with 27 additions and 7 deletions

View File

@@ -261,9 +261,14 @@ def test_check_library_data_invalid_platform(esp32_idf_core):
_check_library_data({"platforms": ["other"], "frameworks": "*"})
def test_check_library_data_invalid_framework(esp32_idf_core):
with pytest.raises(InvalidIDFComponent):
_check_library_data({"platforms": "*", "frameworks": ["other"]})
def test_check_library_data_invalid_framework(
esp32_idf_core: None, caplog: pytest.LogCaptureFixture
) -> None:
# Framework mismatch is a warning, not a hard skip: the library is still
# included so that PIO manifests that only list "arduino" (but actually
# compile under IDF) can be used without forking them.
_check_library_data({"name": "lib", "platforms": "*", "frameworks": ["other"]})
assert "do not include 'espidf'" in caplog.text
def test_extra_script_captures_libpath_libs_and_defines(tmp_path):