Skip to content

Commit fd14116

Browse files
committed
Arm backend: Fix public API manifest test
Ignore unstable lazy imports when checking top-level manifest entries. Signed-off-by: Martin Lindström <Martin.Lindstroem@arm.com> Change-Id: Ia6c9d14a3a2f21cf534f90fcf1dc12f9d36eab59
1 parent ada8e35 commit fd14116

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

backends/arm/test/misc/test_public_api_manifest.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55

66
from pathlib import Path
77

8+
import executorch.backends.arm as arm
89
from executorch.backends.arm import LAZY_IMPORTS
910
from executorch.backends.arm.scripts.generate_public_api_manifest import (
1011
_collect_entry,
1112
_collect_public_api,
13+
_is_unstable_api,
1214
_render_manifest,
1315
)
1416
from executorch.exir._warnings import deprecated
@@ -32,9 +34,12 @@ def _entry_block(path: str, entry: dict[str, str]) -> str:
3234

3335
def test_public_api_manifest_entries_are_well_formed():
3436
entries = _collect_public_api()
37+
expected_top_level_entries = {
38+
name for name in LAZY_IMPORTS if not _is_unstable_api(getattr(arm, name))
39+
}
3540

3641
assert entries
37-
assert {path.split(".")[0] for path in entries} == set(LAZY_IMPORTS)
42+
assert {path.split(".")[0] for path in entries} == expected_top_level_entries
3843

3944
for path, entry in entries.items():
4045
assert entry["kind"] in {"class", "enum", "function"}

0 commit comments

Comments
 (0)