Answer the region screen in the ISO acceptance harness

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 01:49:27 -04:00
1 parent 8f3bdc1fb9
commit a63d090407
1 file changed
+16 -1
+16 -1
View File
@@ -14,6 +14,7 @@
# Usage: omarchy-iso-test [release/omarchy.iso] [options]
#
# --encrypt Drive the encrypted install flow (default: unencrypted)
# --region REGION Pick global (default) or china on the first screen
# --provision Drive the deferred-provisioning install flow: no user during install, the
# first boot runs omarchy-provision-owner and creates it there
# --reuse-base Skip the install phase if a base image already exists
@@ -39,6 +40,7 @@ MEMORY=8192
INSTALL_TIMEOUT=2400
BOOT_TIMEOUT=600
ENCRYPT=false
REGION=global
PROVISION=false
REUSE_BASE=false
INSTALL_ONLY=false
@@ -54,6 +56,7 @@ GUEST_HOSTNAME="omarchy-test"
while (($#)); do
case "$1" in
--encrypt) ENCRYPT=true ;;
--region) REGION="$2"; shift ;;
--provision) PROVISION=true ;;
--reuse-base) REUSE_BASE=true ;;
--install-only) INSTALL_ONLY=true ;;
@@ -84,6 +87,11 @@ if [[ ! -f ${ISO:-} ]]; then
exit 1
fi
if [[ $REGION != "global" && $REGION != "china" ]]; then
echo "--region must be global or china, not $REGION" >&2
exit 1
fi
omarchy-pkg-add qemu-full edk2-ovmf socat imagemagick tesseract tesseract-data-eng
OVMF_CODE="/usr/share/edk2/x64/OVMF_CODE.4m.fd"
@@ -91,6 +99,7 @@ OVMF_VARS_TEMPLATE="/usr/share/edk2/x64/OVMF_VARS.4m.fd"
BASE_NAME="$(basename "$ISO" .iso)"
$ENCRYPT && BASE_NAME+="-encrypted"
[[ $REGION == "china" ]] && BASE_NAME+="-china"
$PROVISION && BASE_NAME+="-provision"
BASE_DIR="$REPO_DIR/test-runs/$BASE_NAME"
RUN_DIR="$BASE_DIR/runs/$(date +%Y%m%d-%H%M%S)"
@@ -618,7 +627,13 @@ drive_configurator() {
capture_console "success-installer-00-greeter"
press ret
# Keyboard is the first screen. Ctrl+C there is the hidden entry into deferred provisioning
# Region comes first, Global preselected and China one row below.
wait_for_screen "Select region" 300
capture_console "success-installer-01-region"
[[ $REGION == "china" ]] && press down
press ret
# Keyboard follows. Ctrl+C there is the hidden entry into deferred provisioning
# mode; a normal install just selects the layout.
wait_for_screen "keyboard layout" 300
capture_console "success-installer-01-keyboard-layout"