Guard platform build target matrix
This commit is contained in:
@@ -81,6 +81,7 @@ python scripts/dev/clangd_nav.py symbols --file src/app_core/document_export.h -
|
|||||||
python scripts/dev/clangd_nav.py definition --file src/node_panel_brush.cpp --line 511 --column 39
|
python scripts/dev/clangd_nav.py definition --file src/node_panel_brush.cpp --line 511 --column 39
|
||||||
python scripts/dev/clangd_nav.py references --file src/app_core/brush_ui.h --line 783 --column 45 --path-regex "src[\\/]app_core"
|
python scripts/dev/clangd_nav.py references --file src/app_core/brush_ui.h --line 783 --column 45 --path-regex "src[\\/]app_core"
|
||||||
python scripts/dev/clangd_nav.py self-test
|
python scripts/dev/clangd_nav.py self-test
|
||||||
|
python scripts/dev/check_platform_build_targets.py
|
||||||
```
|
```
|
||||||
|
|
||||||
Known local toolchain state:
|
Known local toolchain state:
|
||||||
@@ -138,6 +139,10 @@ Known local toolchain state:
|
|||||||
and app status planning. The PowerShell wrapper accepts repeated, array, or
|
and app status planning. The PowerShell wrapper accepts repeated, array, or
|
||||||
comma-separated `-Presets`/`-Targets` values so scripted callers can narrow
|
comma-separated `-Presets`/`-Targets` values so scripted callers can narrow
|
||||||
the same matrix without accidentally passing a single combined target.
|
the same matrix without accidentally passing a single combined target.
|
||||||
|
`scripts/dev/check_platform_build_targets.py`, registered as
|
||||||
|
`panopainter_platform_build_target_matrix_self_test`, verifies the PowerShell
|
||||||
|
and shell wrapper defaults include every current CMake test executable plus
|
||||||
|
the required component and `pano_cli` targets.
|
||||||
- Root CMake exposes named `fuzz` and `stress` CTest presets. `fuzz` currently
|
- Root CMake exposes named `fuzz` and `stress` CTest presets. `fuzz` currently
|
||||||
runs deterministic parser/serializer edge tests for binary streams, image
|
runs deterministic parser/serializer edge tests for binary streams, image
|
||||||
metadata, PPI, stroke scripts, and layout XML; `stress` currently runs the
|
metadata, PPI, stroke scripts, and layout XML; `stress` currently runs the
|
||||||
|
|||||||
@@ -22,9 +22,10 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
`platform-build.sh` now include the current headless component/test matrix,
|
`platform-build.sh` now include the current headless component/test matrix,
|
||||||
including brush-package coverage and the app-core startup/file/document/
|
including brush-package coverage and the app-core startup/file/document/
|
||||||
brush/canvas/history/grid/toolbar/tools/about/preferences/status automation
|
brush/canvas/history/grid/toolbar/tools/about/preferences/status automation
|
||||||
tests, so Android root CMake validation no longer silently skips newly
|
tests, and `panopainter_platform_build_target_matrix_self_test` now verifies
|
||||||
extracted feature slices. Package targets remain open under DEBT-0009 and
|
the wrapper defaults against the current CMake test executables, so Android
|
||||||
DEBT-0011.
|
root CMake validation no longer silently skips newly extracted feature
|
||||||
|
slices. Package targets remain open under DEBT-0009 and DEBT-0011.
|
||||||
- 2026-06-04: DEBT-0036 was narrowed again. Canvas stroke commit,
|
- 2026-06-04: DEBT-0036 was narrowed again. Canvas stroke commit,
|
||||||
thumbnail, and object-draw history paths now query saved blend state through
|
thumbnail, and object-draw history paths now query saved blend state through
|
||||||
tested `pp_renderer_gl` capability-state dispatch; CanvasLayer equirect
|
tested `pp_renderer_gl` capability-state dispatch; CanvasLayer equirect
|
||||||
|
|||||||
@@ -1258,7 +1258,9 @@ automation now builds the current headless component matrix, including
|
|||||||
the current app-core startup/file/document/brush/canvas/history/grid/toolbar/
|
the current app-core startup/file/document/brush/canvas/history/grid/toolbar/
|
||||||
tools/about/preferences/status automation tests. The PowerShell wrapper also
|
tools/about/preferences/status automation tests. The PowerShell wrapper also
|
||||||
normalizes comma-separated `-Presets` and `-Targets` values for reliable
|
normalizes comma-separated `-Presets` and `-Targets` values for reliable
|
||||||
machine-driven partial matrix checks.
|
machine-driven partial matrix checks. `panopainter_platform_build_target_matrix_self_test`
|
||||||
|
keeps the PowerShell and shell wrapper defaults aligned with every current
|
||||||
|
CMake test executable plus required component targets.
|
||||||
`package-smoke` now emits a structured package readiness matrix for Windows
|
`package-smoke` now emits a structured package readiness matrix for Windows
|
||||||
AppX, Android standard/Quest/Focus APKs, Apple bundles, and WebGL output, with
|
AppX, Android standard/Quest/Focus APKs, Apple bundles, and WebGL output, with
|
||||||
blocked prerequisites tied to DEBT-0011. App/package entrypoints still need to
|
blocked prerequisites tied to DEBT-0011. App/package entrypoints still need to
|
||||||
|
|||||||
92
scripts/dev/check_platform_build_targets.py
Normal file
92
scripts/dev/check_platform_build_targets.py
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Verify platform-build wrappers include the current headless target matrix."""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import json
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
REQUIRED_COMPONENT_TARGETS = [
|
||||||
|
"pp_foundation",
|
||||||
|
"pp_assets",
|
||||||
|
"pp_paint",
|
||||||
|
"pp_document",
|
||||||
|
"pp_renderer_api",
|
||||||
|
"pp_renderer_gl",
|
||||||
|
"pp_paint_renderer",
|
||||||
|
"pp_ui_core",
|
||||||
|
"pp_platform_api",
|
||||||
|
"pp_app_core",
|
||||||
|
"pano_cli",
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def repo_root() -> Path:
|
||||||
|
return Path(__file__).resolve().parents[2]
|
||||||
|
|
||||||
|
|
||||||
|
def cmake_test_targets(root: Path) -> list[str]:
|
||||||
|
cmake_lists = root / "tests" / "CMakeLists.txt"
|
||||||
|
text = cmake_lists.read_text(encoding="utf-8")
|
||||||
|
return sorted(set(re.findall(r"^\s*add_executable\(([^\s\)]+)", text, re.MULTILINE)))
|
||||||
|
|
||||||
|
|
||||||
|
def powershell_default_targets(root: Path) -> list[str]:
|
||||||
|
script = root / "scripts" / "automation" / "platform-build.ps1"
|
||||||
|
targets: list[str] = []
|
||||||
|
in_targets = False
|
||||||
|
|
||||||
|
for line in script.read_text(encoding="utf-8").splitlines():
|
||||||
|
if "[string[]]$Targets" in line:
|
||||||
|
in_targets = True
|
||||||
|
if not in_targets:
|
||||||
|
continue
|
||||||
|
|
||||||
|
targets.extend(re.findall(r'"([^"]+)"', line))
|
||||||
|
if in_targets and line.strip() == ")":
|
||||||
|
break
|
||||||
|
|
||||||
|
return sorted(set(targets))
|
||||||
|
|
||||||
|
|
||||||
|
def shell_default_targets(root: Path) -> list[str]:
|
||||||
|
script = root / "scripts" / "automation" / "platform-build.sh"
|
||||||
|
text = script.read_text(encoding="utf-8")
|
||||||
|
match = re.search(r'targets="\$\{[^:]+:-(.*)\}"', text)
|
||||||
|
if not match:
|
||||||
|
raise RuntimeError("Could not find default targets in platform-build.sh")
|
||||||
|
return sorted(set(match.group(1).split()))
|
||||||
|
|
||||||
|
|
||||||
|
def missing(expected: list[str], actual: list[str]) -> list[str]:
|
||||||
|
actual_set = set(actual)
|
||||||
|
return [target for target in expected if target not in actual_set]
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
root = repo_root()
|
||||||
|
expected = sorted(set(REQUIRED_COMPONENT_TARGETS + cmake_test_targets(root)))
|
||||||
|
ps_targets = powershell_default_targets(root)
|
||||||
|
sh_targets = shell_default_targets(root)
|
||||||
|
|
||||||
|
result = {
|
||||||
|
"ok": True,
|
||||||
|
"expectedTargetCount": len(expected),
|
||||||
|
"powershellTargetCount": len(ps_targets),
|
||||||
|
"shellTargetCount": len(sh_targets),
|
||||||
|
"missing": {
|
||||||
|
"platform-build.ps1": missing(expected, ps_targets),
|
||||||
|
"platform-build.sh": missing(expected, sh_targets),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
result["ok"] = all(not values for values in result["missing"].values())
|
||||||
|
|
||||||
|
print(json.dumps(result, separators=(",", ":")))
|
||||||
|
return 0 if result["ok"] else 1
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
sys.exit(main())
|
||||||
@@ -5,6 +5,11 @@ add_test(NAME panopainter_clangd_nav_regex_self_test
|
|||||||
set_tests_properties(panopainter_clangd_nav_regex_self_test PROPERTIES
|
set_tests_properties(panopainter_clangd_nav_regex_self_test PROPERTIES
|
||||||
LABELS "tooling;desktop-fast")
|
LABELS "tooling;desktop-fast")
|
||||||
|
|
||||||
|
add_test(NAME panopainter_platform_build_target_matrix_self_test
|
||||||
|
COMMAND "${Python3_EXECUTABLE}" "${PROJECT_SOURCE_DIR}/scripts/dev/check_platform_build_targets.py")
|
||||||
|
set_tests_properties(panopainter_platform_build_target_matrix_self_test PROPERTIES
|
||||||
|
LABELS "tooling;desktop-fast")
|
||||||
|
|
||||||
add_library(pp_test_harness INTERFACE)
|
add_library(pp_test_harness INTERFACE)
|
||||||
target_include_directories(pp_test_harness INTERFACE
|
target_include_directories(pp_test_harness INTERFACE
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}")
|
"${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|||||||
Reference in New Issue
Block a user