blob: 597ab96ed8a8742005853fbeb334c4e77642ca1c [file] [log] [blame]
#!/usr/bin/env bash
if [ -z "$STANDALONE" ]; then
if [ ! -f config.mak ]; then
echo "run ./configure && make first. See ./configure -h"
exit 2
source config.mak
source scripts/arch-run.bash
ACCEL=$(get_qemu_accelerator) ||
exit $?
qemu=$(search_qemu_binary) ||
exit $?
if ! $qemu -machine '?' 2>&1 | grep 'pseries' > /dev/null; then
echo "$qemu doesn't support pSeries ('-machine pseries'). Exiting."
exit 2
M='-machine pseries'
command="$qemu -nodefaults $M -bios $FIRMWARE"
command+=" -display none -serial stdio -kernel"
command="$(migration_cmd) $(timeout_cmd) $command"
# powerpc tests currently exit with rtas-poweroff, which exits with 0.
# run_qemu treats that as a failure exit and returns 1, so we need
# to fixup the fixup below by parsing the true exit code from the output.
# The second fixup is also a FIXME, because once we add chr-testdev
# support for powerpc, we won't need the second fixup.
run_qemu_status $command "$@"