1#!/usr/bin/env bash 2 3if [ -z "$KUT_STANDALONE" ]; then 4 if [ ! -f config.mak ]; then 5 echo "run ./configure && make first. See ./configure -h" 6 exit 2 7 fi 8 source config.mak 9 source scripts/arch-run.bash 10fi 11 12set_qemu_accelerator || exit $? 13 14qemu=$(search_qemu_binary) || 15 exit $? 16 17if ! $qemu -machine '?' 2>&1 | grep 'pseries' > /dev/null; then 18 echo "$qemu doesn't support pSeries ('-machine pseries'). Exiting." 19 exit 2 20fi 21 22M='-machine pseries' 23M+=",accel=$ACCEL$ACCEL_PROPS" 24command="$qemu -nodefaults $M -bios $FIRMWARE" 25command+=" -display none -serial stdio -kernel" 26command="$(migration_cmd) $(timeout_cmd) $command" 27 28# powerpc tests currently exit with rtas-poweroff, which exits with 0. 29# run_qemu treats that as a failure exit and returns 1, so we need 30# to fixup the fixup below by parsing the true exit code from the output. 31# The second fixup is also a FIXME, because once we add chr-testdev 32# support for powerpc, we won't need the second fixup. 33run_qemu_status $command "$@" 34