diff options
| author | cirakg <cirakg@cirakg.xyz> | 2026-10-18 21:10:37 +0200 |
|---|---|---|
| committer | cirakg <cirakg@cirakg.xyz> | 2026-10-18 21:10:37 +0200 |
| commit | 85f1ecabd7f58f306b2a042376209ac8cf49ab9b (patch) | |
| tree | 00a0f3e2717e5c20ce0c427a979ef609a400d326 /docker/scripts/app-diag.sh | |
| parent | 2071e2beda763137416ac386d4bb953711ec995d (diff) | |
build: complete the Docker pipeline for build, test, screenshots and packaging
- Container scripts now run from the mounted project (no image rebuild
per script change): build-app.sh (strict -l 3, warnings fail),
run-unit-tests.sh, screenshots.sh, app-diag.sh (perf/memory),
lint.sh, package.sh and sim-vnc.sh (noVNC on 127.0.0.1:6080).
- Headless simulator helpers: wait for port 1234, remove the stale
single-instance lock (~/Sim-dev) that made later starts hang, show
the simulator log on failure.
- New targets: screenshots-approve, icons; `make lock` re-adds the
requirements header; pytest treats warnings as errors.
- Author/Summary headers on every build file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docker/scripts/app-diag.sh')
| -rwxr-xr-x | docker/scripts/app-diag.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/docker/scripts/app-diag.sh b/docker/scripts/app-diag.sh new file mode 100755 index 0000000..804d68a --- /dev/null +++ b/docker/scripts/app-diag.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Author: cirakg & claude ai +# Summary: Run the debug app on each device in the headless simulator and check start-up time or memory budgets. +# +# Usage: app-diag.sh perf|mem DEVICE [DEVICE ...] +# Output: build/diag/<DEVICE>.log (console with DIAG and HARNESS lines) and +# build/diag/<perf|mem>-summary.json; verdict from tools/check_budgets.py. +set -euo pipefail +# shellcheck source=ciq-env.sh +source "$(dirname "${BASH_SOURCE[0]}")/ciq-env.sh" + +kind="${1:?usage: app-diag.sh perf|mem DEVICE [DEVICE ...]}" +shift +[[ "${kind}" == perf || "${kind}" == mem ]] || die "unknown kind '${kind}' (use perf or mem)" +(($# > 0)) || die "usage: app-diag.sh perf|mem DEVICE [DEVICE ...]" +ciq_require_sdk +ciq_require_key + +for device in "$@"; do + build-app.sh debug "${device}" +done + +ciq_start_display +ciq_start_simulator + +out="${BUILD_DIR}/diag" +mkdir -p "${out}" +logs=() +for device in "$@"; do + log "starting the app on ${device}" + ciq_launch_app "${device}" "${out}/${device}.log" || log "no first frame on ${device} within ${FIRST_FRAME_TIMEOUT_S} s" + ciq_stop_app + logs+=("${out}/${device}.log") +done + +python3 /work/tools/check_budgets.py "${kind}" "${logs[@]}" --summary "${out}/${kind}-summary.json" |
