cat / goq
clone

turns a linux box into a private steam streaming appliance: plug in, tap your key, play from another computer

fix/website-download-wiring
goq / scripts / tests / bazzite-hardware-uat-native-mode.sh
bazzite-hardware-uat-native-mode.sh 2.2K executable
1#!/usr/bin/env bash23set -euo pipefail45script_dir="$(CDPATH='' cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"6runner="$script_dir/../run-bazzite-hardware-uat.sh"78export SIGIL_HARDWARE_UAT_SOURCE_ONLY=19# shellcheck source=../run-bazzite-hardware-uat.sh10# shellcheck disable=SC109111source "$runner"1213fail() {14 printf 'FAIL: %s\n' "$1" >&215 exit 116}1718native_mode_relation=stale19classify_native_uat_mode 1280x800 1280x80020[[ "$native_mode_relation" == identical-to-fixed ]] \21 || fail 'a native 1280x800 panel was not accepted as identical to the fixed leg'2223classify_native_uat_mode 2560x1600 1280x80024[[ "$native_mode_relation" == distinct-from-fixed ]] \25 || fail 'a larger native panel was not classified as distinct from the fixed leg'2627for invalid_native in '' 1280 0x800 1280x0 -1x800; do28 native_mode_relation=stale29 if classify_native_uat_mode "$invalid_native" 1280x800; then30 fail "an invalid native mode was accepted: $invalid_native"31 fi32 [[ -z "$native_mode_relation" ]] \33 || fail 'failed native classification retained stale relation state'34done3536native_mode_relation=stale37if classify_native_uat_mode 1280x800 invalid; then38 fail 'an invalid fixed mode was accepted'39fi40[[ -z "$native_mode_relation" ]] \41 || fail 'failed fixed classification retained stale relation state'4243grep -Fq "classify_native_uat_mode \"\$native_size\" 1280x800" "$runner" \44 || fail 'the resolved native mode does not use the tested classifier'45grep -Fq "echo \"native_mode_relation=\$native_mode_relation\"" "$runner" \46 || fail 'the evidence summary omits the native mode relation'47if grep -Fq 'native UAT resolved to the fixed 1280x800 mode' "$runner"; then48 fail 'the runner still rejects a native mode identical to the fixed leg'49fi50grep -Fq "run_capture_probe native \"\$native_config\" \"\$native_size\"" "$runner" \51 || fail 'the native capture leg was collapsed into the fixed leg'52grep -Fq "start_candidate native \"\$native_config\"" "$runner" \53 || fail 'the native daemon leg was collapsed into the fixed leg'54grep -Fq "run_probe_cycle native iroh-moq \"\$native_size\"" "$runner" \55 || fail 'the native session leg was collapsed into the fixed leg'5657printf 'bazzite_hardware_uat_native_mode_tests=ok\n'