#!/bin/sh
set -e

# Skip the test on amd64v3
if apt-config dump | grep -q 'Architecture-Variants.*amd64v3'; then
    echo "Skipping: found amd64v3 enabled. Test without AVX not relevant here."
    exit 77
fi

# Skip the test in the absence of KVM acceleration
if ! kvm-ok > /dev/null 2>&1; then
    echo "Skipping: KVM acceleration not available."
    exit 77
fi

qemu-x86_64 -cpu Haswell,-avx,-avx2 /usr/bin/ghostty +version
