blob: 623c4aabfe1e48078b254c4d4f0d9f9a05b065b5 [file] [log] [blame]
#!/bin/bash
# Note: this assumes that the images have all been built and the current working
# directory is the root of the repo.
# Fail on any error.
set -e
# Display commands being run.
set -x
TIMEOUT="timeout --foreground"
QEMU="./prebuilts/linux-x64/qemu/qemu-system-aarch64 -M virt -cpu cortex-a57 -m 8M -machine virtualization=true -nographic -nodefaults -serial stdio"
HAFNIUM="out/aarch64/qemu/clang_aarch64/hafnium.bin"
INITRD="out/aarch64/qemu/clang_aarch64/initrd"
# Run the QEMU tests with a timeout so they can't loop forever.
$TIMEOUT 5s $QEMU -kernel $HAFNIUM -initrd $INITRD/primary_only_test.img
$TIMEOUT 5s $QEMU -kernel $HAFNIUM -initrd $INITRD/primary_with_secondary_test.img