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