diff options
Diffstat (limited to '')
| -rwxr-xr-x | scripts/tests/test-gfx.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/tests/test-gfx.sh b/scripts/tests/test-gfx.sh new file mode 100755 index 0000000..613318f --- /dev/null +++ b/scripts/tests/test-gfx.sh | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | #!/usr/bin/env bash | ||
| 2 | # | ||
| 3 | # scripts/tests/test-gfx.sh — automated graphics round-trip test. | ||
| 4 | # | ||
| 5 | # Builds, boots headless, runs the in-kernel gfx self-test and the | ||
| 6 | # status-bar demo, then powers off. | ||
| 7 | # | ||
| 8 | # Usage: ./scripts/tests/test-gfx.sh | ||
| 9 | # Env: SYSTEM_IMG, OVMF, QEMU (see scripts/lib.sh) | ||
| 10 | # | ||
| 11 | set -euo pipefail | ||
| 12 | TNAME="gfx" | ||
| 13 | # shellcheck source=../lib.sh | ||
| 14 | source "$(dirname "$0")/../lib.sh" | ||
| 15 | |||
| 16 | echo "==> 1/5 build (kernel + bins)" | ||
| 17 | build_all | ||
| 18 | |||
| 19 | echo "==> 2/5 stage system image" | ||
| 20 | stage_image --force | ||
| 21 | |||
| 22 | echo "==> 3/5 boot QEMU (headless)" | ||
| 23 | test_boot | ||
| 24 | wait_log "$LOG" "cursor: task " 10 || fail "cursor task did not spawn" | ||
| 25 | |||
| 26 | echo "==> 4/5 in-kernel pixel self-test (gfx check)" | ||
| 27 | sendkeys "gfx check" | ||
| 28 | wait_log "$LOG" "gfx check: PASS" 30 || fail "gfx check did not run" | ||
| 29 | |||
| 30 | echo "==> 5/5 gfx demo (draw scene)" | ||
| 31 | sendkeys "gfx" "poweroff" | ||
| 32 | wait_qemu_exit 30 || fail "QEMU did not exit after poweroff" | ||
| 33 | |||
| 34 | grep -aq "gfx: drew status bar" "$LOG" || fail "gfx demo did not draw" | ||
| 35 | |||
| 36 | echo "" | ||
| 37 | echo "PASS — gfx round trip" | ||
