Merge branch 'esp8266-native-framework-installer' into esp8266-native-library-backend

This commit is contained in:
J. Nick Koston
2026-08-23 14:31:34 -05:00
2 changed files with 14 additions and 8 deletions
+4 -2
View File
@@ -978,10 +978,12 @@ def _prefetch_wave(
# A warm build must stay silent
continue
components.append(component)
if len(components) < 2:
if not components:
return
# Single-item waves (a dependency chain discovers one archive per
# wave) go through the same runner: one download method, one bar
_LOGGER.info(
"Downloading %d libraries: %s",
"Downloading %d library archive(s): %s",
len(components),
", ".join(c.name for c in components),
)
+10 -6
View File
@@ -766,16 +766,18 @@ def test_prefetch_wave_warm_cache_is_silent(
assert "Downloading" not in caplog.text
def test_prefetch_wave_single_archive_skips_the_pool(
monkeypatch: pytest.MonkeyPatch,
def test_prefetch_wave_single_archive_uses_the_batch(
monkeypatch: pytest.MonkeyPatch, caplog: pytest.LogCaptureFixture
) -> None:
"""One archive gains nothing from a pool; the sequential call keeps its
progress bar."""
"""A dependency chain discovers one archive per wave; it downloads
through the same runner so there is one download method and one bar."""
caplog.set_level("INFO")
calls: list[str] = []
monkeypatch.setattr(
URLSource,
"download",
lambda self, dir_suffix, **kw: (_ for _ in ()).throw(
AssertionError("prefetched")
lambda self, dir_suffix, force=False, salt="", namespace="", progress=None: (
calls.append(self.url)
),
)
lib._prefetch_wave(
@@ -783,6 +785,8 @@ def test_prefetch_wave_single_archive_skips_the_pool(
"",
"idf",
)
assert calls == ["https://x/a.tar.gz"]
assert "Downloading 1 library archive(s): a" in caplog.text
def test_normalize_dependencies_forms(caplog) -> None: