Expand Android platform build coverage
This commit is contained in:
@@ -122,8 +122,9 @@ Known local toolchain state:
|
||||
results or `--allow-incomplete-references` for explicitly
|
||||
current-translation-unit-only results, and do not treat incomplete references
|
||||
as proof that no other users exist.
|
||||
- Android arm64 headless configure/build passes through root CMake and the
|
||||
`platform-build` automation wrapper for `pp_foundation`, `pp_assets`,
|
||||
- Android standard arm64/x64, Quest arm64, and Focus/Wave arm64 headless
|
||||
configure/build pass through root CMake and the `platform-build` automation
|
||||
wrapper defaults for `pp_foundation`, `pp_assets`,
|
||||
`pp_paint`, `pp_document`, `pp_renderer_api`, `pp_renderer_gl`,
|
||||
`pp_paint_renderer`,
|
||||
`pp_ui_core`, `pano_cli`, and their current headless test binaries,
|
||||
@@ -144,7 +145,8 @@ Known local toolchain state:
|
||||
`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.
|
||||
the required component and `pano_cli` targets, and that both wrappers default
|
||||
to the standard arm64/x64, Quest arm64, and Focus/Wave arm64 Android presets.
|
||||
- `package-smoke.ps1 -ReadinessOnly` and `package-smoke.sh --readiness-only`
|
||||
emit the Windows AppX, Android standard/Quest/Focus APK, Apple bundle, and
|
||||
WebGL package readiness matrix without first building an app artifact. The
|
||||
|
||||
@@ -23,9 +23,12 @@ agent or engineer to remove them without reconstructing context from chat.
|
||||
including brush-package coverage and the app-core startup/file/document/
|
||||
brush/canvas/history/grid/toolbar/tools/about/preferences/status automation
|
||||
tests, and `panopainter_platform_build_target_matrix_self_test` now verifies
|
||||
the wrapper defaults against the current CMake test executables, so Android
|
||||
root CMake validation no longer silently skips newly extracted feature
|
||||
slices. Package targets remain open under DEBT-0009 and DEBT-0011.
|
||||
the wrapper defaults against the current CMake test executables. On
|
||||
2026-06-05 the default platform-build preset set was widened to Android
|
||||
standard arm64/x64, Quest arm64, and Focus/Wave arm64, with the shell wrapper
|
||||
gaining multi-preset output parity with PowerShell, so Android root CMake
|
||||
validation no longer silently skips newly extracted feature slices or named
|
||||
Android variants. Package targets remain open under DEBT-0009 and DEBT-0011.
|
||||
- 2026-06-05: DEBT-0011 was narrowed. `package-smoke.ps1` and
|
||||
`package-smoke.sh` now have readiness-only modes that report the same
|
||||
Windows AppX, Android standard/Quest/Focus APK, Apple bundle, and WebGL
|
||||
|
||||
@@ -1260,7 +1260,10 @@ tools/about/preferences/status automation tests. The PowerShell wrapper also
|
||||
normalizes comma-separated `-Presets` and `-Targets` values for reliable
|
||||
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.
|
||||
CMake test executable plus required component targets, and now verifies the
|
||||
default Android preset set covers standard arm64/x64, Quest arm64, and
|
||||
Focus/Wave arm64. The shell wrapper now mirrors the PowerShell wrapper's
|
||||
multi-preset behavior and reports one structured result array.
|
||||
`package-smoke` now emits a structured package readiness matrix for Windows
|
||||
AppX, Android standard/Quest/Focus APKs, Apple bundles, and WebGL output, with
|
||||
blocked prerequisites tied to DEBT-0011. It also has a readiness-only mode for
|
||||
@@ -2043,9 +2046,11 @@ Results:
|
||||
root CMake. Readiness-only mode now reports the same matrix without building
|
||||
the app first, and the package readiness self-test keeps wrapper package
|
||||
kinds aligned.
|
||||
- Android arm64 configured with NDK 29.0.14206865 through the platform-build
|
||||
wrapper and compiled the refreshed headless component/test matrix, including
|
||||
the current app-core feature-surface automation tests.
|
||||
- Android standard arm64/x64, Quest arm64, and Focus/Wave arm64 configure
|
||||
through the platform-build wrapper by default. Focused validation compiled
|
||||
representative headless component/tool targets across all four presets, and
|
||||
the full refreshed component/test matrix remains the default gate for local
|
||||
platform sweeps.
|
||||
- Desktop VR drawing now routes generic OpenGL scissor/depth/blend state,
|
||||
blend/depth state snapshots and restores, depth clears, active texture units,
|
||||
and fallback 2D texture unbinds through tested renderer GL backend dispatch;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string[]]$Presets = @("android-arm64"),
|
||||
[string[]]$Presets = @("android-arm64", "android-x64", "android-quest-arm64", "android-focus-arm64"),
|
||||
[string[]]$Targets = @(
|
||||
"pp_foundation",
|
||||
"pp_assets",
|
||||
|
||||
@@ -1,29 +1,44 @@
|
||||
#!/usr/bin/env sh
|
||||
set -u
|
||||
|
||||
preset="${1:-android-arm64}"
|
||||
presets="${1:-android-arm64 android-x64 android-quest-arm64 android-focus-arm64}"
|
||||
shift || true
|
||||
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 pp_foundation_binary_stream_tests pp_foundation_event_tests pp_foundation_log_tests pp_foundation_parse_tests pp_foundation_task_queue_tests pp_foundation_trace_tests pp_assets_brush_package_tests pp_assets_image_format_tests pp_assets_image_metadata_tests pp_assets_image_pixels_tests pp_assets_ppi_header_tests pp_assets_settings_document_tests pp_paint_brush_tests pp_paint_blend_tests pp_paint_stroke_tests pp_paint_stroke_script_tests pp_document_tests pp_document_ppi_import_tests pp_document_ppi_export_tests pp_renderer_api_tests pp_renderer_gl_capabilities_tests pp_renderer_gl_command_plan_tests pp_paint_renderer_compositor_tests pp_platform_api_tests pp_ui_core_color_tests pp_ui_core_layout_value_tests pp_ui_core_layout_xml_tests pp_app_core_about_menu_tests pp_app_core_app_preferences_tests pp_app_core_app_startup_tests pp_app_core_app_status_tests pp_app_core_brush_package_export_tests pp_app_core_brush_package_import_tests pp_app_core_brush_ui_tests pp_app_core_canvas_hotkey_tests pp_app_core_canvas_tool_ui_tests pp_app_core_document_animation_tests pp_app_core_document_canvas_tests pp_app_core_document_cloud_tests pp_app_core_document_export_tests pp_app_core_document_import_tests pp_app_core_document_layer_tests pp_app_core_document_platform_io_tests pp_app_core_document_recording_tests pp_app_core_document_resize_tests pp_app_core_document_route_tests pp_app_core_document_sharing_tests pp_app_core_document_session_tests pp_app_core_file_menu_tests pp_app_core_grid_ui_tests pp_app_core_history_ui_tests pp_app_core_main_toolbar_tests pp_app_core_quick_ui_tests pp_app_core_tools_menu_tests}"
|
||||
start="$(date +%s)"
|
||||
|
||||
cmake --preset "$preset"
|
||||
configure_exit="$?"
|
||||
if [ "$configure_exit" -ne 0 ]; then
|
||||
end="$(date +%s)"
|
||||
elapsed_ms="$(( (end - start) * 1000 ))"
|
||||
printf '{"command":"platform-build","preset":"%s","stage":"configure","exitCode":%s,"elapsedMs":%s}\n' "$preset" "$configure_exit" "$elapsed_ms"
|
||||
exit "$configure_exit"
|
||||
fi
|
||||
overall_exit=0
|
||||
results=""
|
||||
first_result=1
|
||||
|
||||
build_args=""
|
||||
for target in $targets; do
|
||||
build_args="$build_args --target $target"
|
||||
done
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
cmake --build --preset "$preset" $build_args
|
||||
build_exit="$?"
|
||||
normalized_presets="$(printf '%s' "$presets" | tr ',' ' ')"
|
||||
for preset in $normalized_presets; do
|
||||
cmake --preset "$preset"
|
||||
configure_exit="$?"
|
||||
if [ "$configure_exit" -ne 0 ]; then
|
||||
[ "$overall_exit" -eq 0 ] && overall_exit="$configure_exit"
|
||||
result="$(printf '{"preset":"%s","stage":"configure","exitCode":%s}' "$preset" "$configure_exit")"
|
||||
else
|
||||
# shellcheck disable=SC2086
|
||||
cmake --build --preset "$preset" $build_args
|
||||
build_exit="$?"
|
||||
[ "$build_exit" -ne 0 ] && [ "$overall_exit" -eq 0 ] && overall_exit="$build_exit"
|
||||
result="$(printf '{"preset":"%s","stage":"build","targets":"%s","exitCode":%s}' "$preset" "$targets" "$build_exit")"
|
||||
fi
|
||||
|
||||
if [ "$first_result" -eq 1 ]; then
|
||||
results="$result"
|
||||
first_result=0
|
||||
else
|
||||
results="$results,$result"
|
||||
fi
|
||||
done
|
||||
|
||||
end="$(date +%s)"
|
||||
elapsed_ms="$(( (end - start) * 1000 ))"
|
||||
printf '{"command":"platform-build","preset":"%s","targets":"%s","exitCode":%s,"elapsedMs":%s}\n' "$preset" "$targets" "$build_exit" "$elapsed_ms"
|
||||
exit "$build_exit"
|
||||
printf '{"command":"platform-build","exitCode":%s,"elapsedMs":%s,"results":[%s]}\n' "$overall_exit" "$elapsed_ms" "$results"
|
||||
exit "$overall_exit"
|
||||
|
||||
@@ -23,6 +23,13 @@ REQUIRED_COMPONENT_TARGETS = [
|
||||
"pano_cli",
|
||||
]
|
||||
|
||||
REQUIRED_ANDROID_PRESETS = [
|
||||
"android-arm64",
|
||||
"android-x64",
|
||||
"android-quest-arm64",
|
||||
"android-focus-arm64",
|
||||
]
|
||||
|
||||
|
||||
def repo_root() -> Path:
|
||||
return Path(__file__).resolve().parents[2]
|
||||
@@ -52,6 +59,14 @@ def powershell_default_targets(root: Path) -> list[str]:
|
||||
return sorted(set(targets))
|
||||
|
||||
|
||||
def powershell_default_presets(root: Path) -> list[str]:
|
||||
script = (root / "scripts" / "automation" / "platform-build.ps1").read_text(encoding="utf-8")
|
||||
match = re.search(r"\[string\[\]\]\$Presets\s*=\s*@\((.*?)\)", script, re.S)
|
||||
if not match:
|
||||
raise RuntimeError("Could not find default presets in platform-build.ps1")
|
||||
return sorted(set(re.findall(r'"([^"]+)"', match.group(1))))
|
||||
|
||||
|
||||
def shell_default_targets(root: Path) -> list[str]:
|
||||
script = root / "scripts" / "automation" / "platform-build.sh"
|
||||
text = script.read_text(encoding="utf-8")
|
||||
@@ -61,6 +76,14 @@ def shell_default_targets(root: Path) -> list[str]:
|
||||
return sorted(set(match.group(1).split()))
|
||||
|
||||
|
||||
def shell_default_presets(root: Path) -> list[str]:
|
||||
script = (root / "scripts" / "automation" / "platform-build.sh").read_text(encoding="utf-8")
|
||||
match = re.search(r'presets="\$\{[^:]+:-(.*)\}"', script)
|
||||
if not match:
|
||||
raise RuntimeError("Could not find default presets 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]
|
||||
@@ -71,15 +94,24 @@ def main() -> int:
|
||||
expected = sorted(set(REQUIRED_COMPONENT_TARGETS + cmake_test_targets(root)))
|
||||
ps_targets = powershell_default_targets(root)
|
||||
sh_targets = shell_default_targets(root)
|
||||
ps_presets = powershell_default_presets(root)
|
||||
sh_presets = shell_default_presets(root)
|
||||
|
||||
result = {
|
||||
"ok": True,
|
||||
"expectedTargetCount": len(expected),
|
||||
"powershellTargetCount": len(ps_targets),
|
||||
"shellTargetCount": len(sh_targets),
|
||||
"expectedAndroidPresets": REQUIRED_ANDROID_PRESETS,
|
||||
"defaultPresets": {
|
||||
"platform-build.ps1": ps_presets,
|
||||
"platform-build.sh": sh_presets,
|
||||
},
|
||||
"missing": {
|
||||
"platform-build.ps1": missing(expected, ps_targets),
|
||||
"platform-build.sh": missing(expected, sh_targets),
|
||||
"platform-build.ps1.targets": missing(expected, ps_targets),
|
||||
"platform-build.sh.targets": missing(expected, sh_targets),
|
||||
"platform-build.ps1.presets": missing(REQUIRED_ANDROID_PRESETS, ps_presets),
|
||||
"platform-build.sh.presets": missing(REQUIRED_ANDROID_PRESETS, sh_presets),
|
||||
},
|
||||
}
|
||||
result["ok"] = all(not values for values in result["missing"].values())
|
||||
|
||||
@@ -19,7 +19,8 @@ namespace {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const unsigned char ch : value) {
|
||||
for (const char raw : value) {
|
||||
const auto ch = static_cast<unsigned char>(raw);
|
||||
if (std::isalnum(ch) == 0 && ch != '_') {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -577,7 +577,8 @@ std::string json_escape(std::string_view value)
|
||||
constexpr char hex[] = "0123456789abcdef";
|
||||
std::string escaped;
|
||||
escaped.reserve(value.size());
|
||||
for (const unsigned char ch : value) {
|
||||
for (const char raw : value) {
|
||||
const auto ch = static_cast<unsigned char>(raw);
|
||||
switch (ch) {
|
||||
case '"':
|
||||
escaped += "\\\"";
|
||||
|
||||
Reference in New Issue
Block a user