Skip to content

Commit

Permalink
test/qemu: start building qemu again, and use our built qemu for tests
Browse files Browse the repository at this point in the history
We need to use QEMU_BIN rather than QEMU as the makefiles define
QEMU already.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Jun 27, 2018
1 parent 5235791 commit af1cbe3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
3 changes: 2 additions & 1 deletion opal-ci/build-ubuntu-16.04.sh
Expand Up @@ -9,7 +9,8 @@ MAKE_J=`grep -c processor /proc/cpuinfo`
export CROSS="ccache powerpc64le-linux-gnu-"

make -j${MAKE_J} all
#(cd opal-ci; ./build-qemu-powernv.sh)
(cd opal-ci; ./build-qemu-powernv.sh)
export QEMU_BIN=`pwd`/opal-ci/qemu/ppc64-softmmu/qemu-system-ppc64
./opal-ci/fetch-debian-jessie-installer.sh
make -j${MAKE_J} check
(make clean; cd external/gard && CROSS= make -j${MAKE_J})
Expand Down
10 changes: 5 additions & 5 deletions test/hello_world/run_qemu_hello_world.sh
@@ -1,12 +1,12 @@
#!/bin/bash


if [ -z "$QEMU" ]; then
QEMU="qemu-system-ppc64"
if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
fi

if [ ! `command -v $QEMU` ]; then
echo 'Could not find executable QEMU. Skipping hello_world test';
if [ ! `command -v $QEMU_BIN` ]; then
echo "Could not find executable QEMU_BIN ($QEMU_BIN). Skipping hello_world test";
exit 0;
fi

Expand All @@ -30,7 +30,7 @@ trap "rm -f -- '$t'" EXIT
(
cat <<EOF | expect
set timeout 30
spawn $QEMU -m 1G -M powernv -kernel $SKIBOOT_ZIMAGE -nographic
spawn $QEMU_BIN -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 }
Expand Down
10 changes: 5 additions & 5 deletions test/run_qemu-jessie-debian-installer_boot_test.sh
@@ -1,12 +1,12 @@
#!/bin/bash


if [ -z "$QEMU" ]; then
QEMU="qemu-system-ppc64"
if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
fi

if [ ! `command -v qemu-system-ppc64` ]; then
echo 'Could not find executable QEMU. Skipping hello_world test';
if [ ! `command -v $QEMU_BIN` ]; then
echo "Could not find executable QEMU_BIN ($QEMU_BIN). Skipping hello_world test";
exit 0;
fi

Expand Down Expand Up @@ -39,7 +39,7 @@ T=`mktemp --tmpdir skiboot_qemu_debian-jessie-boot_test.XXXXXXXXXX`

( cat <<EOF | expect
set timeout 600
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
spawn $QEMU_BIN -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
expect {
timeout { send_user "\nTimeout waiting for petitboot\n"; exit 1 }
eof { send_user "\nUnexpected EOF\n;" exit 1 }
Expand Down
10 changes: 5 additions & 5 deletions test/run_qemu_boot_test.sh
@@ -1,12 +1,12 @@
#!/bin/bash


if [ -z "$QEMU" ]; then
QEMU="qemu-system-ppc64"
if [ -z "$QEMU_BIN" ]; then
QEMU_BIN="qemu-system-ppc64"
fi

if [ ! `command -v qemu-system-ppc64` ]; then
echo 'Could not find executable QEMU. Skipping hello_world test';
if [ ! `command -v $QEMU_BIN` ]; then
echo "Could not find executable QEMU_BIN ($QEMU_BIN). Skipping hello_world test";
exit 0;
fi

Expand All @@ -33,7 +33,7 @@ T=`mktemp --tmpdir skiboot_qemu_boot_test.XXXXXXXXXX`

( cat <<EOF | expect
set timeout 600
spawn $QEMU -m 3G -M powernv -kernel $SKIBOOT_ZIMAGE -nographic -device ipmi-bmc-sim,id=ipmi0 -device isa-ipmi-bt,bmc=ipmi0
spawn $QEMU_BIN -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 }
Expand Down

0 comments on commit af1cbe3

Please sign in to comment.