aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtest/hello_world/run_qemu_hello_world.sh14
-rwxr-xr-xtest/run_qemu-jessie-debian-installer_boot_test.sh14
-rwxr-xr-xtest/run_qemu_boot_test.sh14
3 files changed, 15 insertions, 27 deletions
diff --git a/test/hello_world/run_qemu_hello_world.sh b/test/hello_world/run_qemu_hello_world.sh
index e08f851..cc5055e 100755
--- a/test/hello_world/run_qemu_hello_world.sh
+++ b/test/hello_world/run_qemu_hello_world.sh
@@ -1,16 +1,12 @@
#!/bin/bash
-if [ -z "$QEMU_PATH" ]; then
- QEMU_PATH=`pwd`/opal-ci/qemu/ppc64-softmmu/
+if [ -z "$QEMU" ]; then
+ QEMU="qemu-system-ppc64"
fi
-if [ -z "$QEMU_BINARY" ]; then
- QEMU_BINARY="qemu-system-ppc64"
-fi
-
-if [ ! -x "$QEMU_PATH/$QEMU_BINARY" ]; then
- echo 'Could not find executable QEMU_BINARY. Skipping hello_world test';
+if [ ! `command -v $QEMU` ]; then
+ echo 'Could not find executable QEMU. Skipping hello_world test';
exit 0;
fi
@@ -34,7 +30,7 @@ trap "rm -f -- '$t'" EXIT
(
cat <<EOF | expect
set timeout 30
-spawn $QEMU_PATH/$QEMU_BINARY -m 1G -M powernv -kernel $SKIBOOT_ZIMAGE -nographic
+spawn $QEMU -m 1G -M powernv -kernel $SKIBOOT_ZIMAGE -nographic
expect {
timeout { send_user "\nTimeout waiting for hello world\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
diff --git a/test/run_qemu-jessie-debian-installer_boot_test.sh b/test/run_qemu-jessie-debian-installer_boot_test.sh
index ab9ca85..57e9d82 100755
--- a/test/run_qemu-jessie-debian-installer_boot_test.sh
+++ b/test/run_qemu-jessie-debian-installer_boot_test.sh
@@ -1,16 +1,12 @@
#!/bin/bash
-if [ -z "$QEMU_PATH" ]; then
- QEMU_PATH=`pwd`/opal-ci/qemu/ppc64-softmmu/
+if [ -z "$QEMU" ]; then
+ QEMU="qemu-system-ppc64"
fi
-if [ -z "$QEMU_BINARY" ]; then
- QEMU_BINARY="qemu-system-ppc64"
-fi
-
-if [ ! -x "$QEMU_PATH/$QEMU_BINARY" ]; then
- echo 'Could not find executable QEMU_BINARY. Skipping hello_world test';
+if [ ! `command -v qemu-system-ppc64` ]; then
+ echo 'Could not find executable QEMU. Skipping hello_world test';
exit 0;
fi
@@ -44,7 +40,7 @@ $QEMU_PATH/../qemu-img create -f qcow2 $D 128G 2>&1 > $T
( cat <<EOF | expect
set timeout 600
-spawn $QEMU_PATH/$QEMU_BINARY -m 2G -M powernv -kernel debian-jessie-vmlinux -initrd debian-jessie-initrd.gz -nographic -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0 -hda $D
+spawn $QEMU -m 2G -M powernv -kernel debian-jessie-vmlinux -initrd debian-jessie-initrd.gz -nographic -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0 -hda $D
expect {
timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
diff --git a/test/run_qemu_boot_test.sh b/test/run_qemu_boot_test.sh
index b984afc..c3a7933 100755
--- a/test/run_qemu_boot_test.sh
+++ b/test/run_qemu_boot_test.sh
@@ -1,16 +1,12 @@
#!/bin/bash
-if [ -z "$QEMU_PATH" ]; then
- QEMU_PATH=`pwd`/opal-ci/qemu/ppc64-softmmu/
+if [ -z "$QEMU" ]; then
+ QEMU="qemu-system-ppc64"
fi
-if [ -z "$QEMU_BINARY" ]; then
- QEMU_BINARY="qemu-system-ppc64"
-fi
-
-if [ ! -x "$QEMU_PATH/$QEMU_BINARY" ]; then
- echo 'Could not find executable QEMU_BINARY. Skipping hello_world test';
+if [ ! `command -v qemu-system-ppc64` ]; then
+ echo 'Could not find executable QEMU. Skipping hello_world test';
exit 0;
fi
@@ -37,7 +33,7 @@ T=`mktemp --tmpdir skiboot_qemu_boot_test.XXXXXXXXXX`
( cat <<EOF | expect
set timeout 600
-spawn $QEMU_PATH/$QEMU_BINARY -m 3G -M powernv -kernel $SKIBOOT_ZIMAGE -nographic -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0
+spawn $QEMU -m 3G -M powernv -kernel $SKIBOOT_ZIMAGE -nographic -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0
expect {
timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }