Files
xen/automation/scripts/qemu-smoke-x86-64.sh
T
Stefano Stabellini c36efb7fce automation: use expect to run QEMU
Use expect to invoke QEMU so that we can terminate the test as soon as
we get the right string in the output instead of waiting until the
final timeout.

For timeout, instead of an hardcoding the value, use a Gitlab CI
variable "QEMU_TIMEOUT" that can be changed depending on the latest
status of the Gitlab CI runners.

Signed-off-by: Stefano Stabellini <stefano.stabellini@amd.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
2024-08-13 16:05:05 -07:00

28 lines
683 B
Bash
Executable File

#!/bin/bash
set -ex
# variant should be either pv or pvh
variant=$1
# Clone and build XTF
git clone https://xenbits.xen.org/git-http/xtf.git
cd xtf && make -j$(nproc) && cd -
case $variant in
pvh) k=test-hvm64-example extra="dom0-iommu=none dom0=pvh" ;;
*) k=test-pv64-example extra= ;;
esac
rm -f smoke.serial
set +e
export QEMU_CMD="qemu-system-x86_64 -nographic -kernel binaries/xen \
-initrd xtf/tests/example/$k \
-append \"loglvl=all console=com1 noreboot console_timestamps=boot $extra\" \
-m 512 -monitor none -serial stdio"
export QEMU_LOG="smoke.serial"
export PASSED="Test result: SUCCESS"
./automation/scripts/qemu-key.exp