summaryrefslogtreecommitdiffstats
path: root/scripts/tests/test-gfx.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xscripts/tests/test-gfx.sh37
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#
11set -euo pipefail
12TNAME="gfx"
13# shellcheck source=../lib.sh
14source "$(dirname "$0")/../lib.sh"
15
16echo "==> 1/5 build (kernel + bins)"
17build_all
18
19echo "==> 2/5 stage system image"
20stage_image --force
21
22echo "==> 3/5 boot QEMU (headless)"
23test_boot
24wait_log "$LOG" "cursor: task " 10 || fail "cursor task did not spawn"
25
26echo "==> 4/5 in-kernel pixel self-test (gfx check)"
27sendkeys "gfx check"
28wait_log "$LOG" "gfx check: PASS" 30 || fail "gfx check did not run"
29
30echo "==> 5/5 gfx demo (draw scene)"
31sendkeys "gfx" "poweroff"
32wait_qemu_exit 30 || fail "QEMU did not exit after poweroff"
33
34grep -aq "gfx: drew status bar" "$LOG" || fail "gfx demo did not draw"
35
36echo ""
37echo "PASS — gfx round trip"