diff --git a/test-all-native.sh b/test-all-native.sh index 1585cf1..78cc8ae 100755 --- a/test-all-native.sh +++ b/test-all-native.sh @@ -824,20 +824,40 @@ manifest_core = [ for line in Path("linuxcnc-rs274-source-files.txt").read_text(encoding="utf-8").splitlines() if line.startswith("core:") ] +manifest_bindings = [ + Path(line.split(":", 2)[1]).name + for line in Path("linuxcnc-rs274-source-files.txt").read_text(encoding="utf-8").splitlines() + if line.startswith("binding:") +] source_map_core = [] +source_map_bindings = [] in_core_section = False +in_binding_section = False for line in source_map.splitlines(): if line == "### Interpreter core": in_core_section = True + in_binding_section = False + continue + if line == "### Python binding modules": + in_core_section = False + in_binding_section = True continue if in_core_section and line.startswith("### "): break + if in_binding_section and line.startswith("### "): + in_binding_section = False if in_core_section and line.startswith("- `"): source_map_core.append(line.split("`", 2)[1]) + if in_binding_section and line.startswith("- `"): + source_map_bindings.append(line.split("`", 2)[1]) if source_map_core != manifest_core: raise SystemExit( "docs/linuxcnc-rs274-source-map.md interpreter core list no longer matches linuxcnc-rs274-source-files.txt core manifest" ) +if source_map_bindings != manifest_bindings: + raise SystemExit( + "docs/linuxcnc-rs274-source-map.md Python binding module list no longer matches linuxcnc-rs274-source-files.txt binding manifest" + ) PY for script in \