summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-09-05 13:56:34 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-09-05 13:56:34 +0100
commit81c682f1295a934d18bd4dc9e42b8e843df0c207 (patch)
tree4e5d07bd8cec0b30172c0b91c661e922bfac6327 /tests
parent3d84ca76fec491015030daa53e9122b03032ddfd (diff)
downloadlibguestfs-81c682f1295a934d18bd4dc9e42b8e843df0c207.tar.gz
libguestfs-81c682f1295a934d18bd4dc9e42b8e843df0c207.tar.xz
libguestfs-81c682f1295a934d18bd4dc9e42b8e843df0c207.zip
extra-tests: Don't use $QEMU as a variable.
Since 'QEMU' is set (overwritten) by the autoconf-generated Makefile, this test would always test installed qemu, not upstream qemu, making it pretty useless. Use another name for this variable.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/extra/test-upstream-qemu-wrapper.sh2
-rwxr-xr-xtests/extra/test-upstream-qemu.sh17
2 files changed, 13 insertions, 6 deletions
diff --git a/tests/extra/test-upstream-qemu-wrapper.sh b/tests/extra/test-upstream-qemu-wrapper.sh
index ab9787e1..bec2bc0b 100755
--- a/tests/extra/test-upstream-qemu-wrapper.sh
+++ b/tests/extra/test-upstream-qemu-wrapper.sh
@@ -15,4 +15,4 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-exec "$QEMU" -L "$QEMUDIR/pc-bios" "$@"
+exec "$upstream_qemu" -L "$QEMUDIR/pc-bios" "$@"
diff --git a/tests/extra/test-upstream-qemu.sh b/tests/extra/test-upstream-qemu.sh
index d8f16f4b..70e0c034 100755
--- a/tests/extra/test-upstream-qemu.sh
+++ b/tests/extra/test-upstream-qemu.sh
@@ -23,17 +23,24 @@ if [ ! -d "$QEMUDIR" ]; then
exit 77
fi
-QEMU="$QEMUDIR/x86_64-softmmu/qemu-system-x86_64"
-if ! "$QEMU" --help >/dev/null 2>&1; then
- echo "$0: $QEMU not executable, tests against upstream qemu skipped"
+# Note that Makefile sets 'QEMU', so we cannot use that variable.
+upstream_qemu="$QEMUDIR/x86_64-softmmu/qemu-system-x86_64"
+if ! "$upstream_qemu" --help >/dev/null 2>&1; then
+ echo "$0: $upstream_qemu not executable, tests against upstream qemu skipped"
exit 77
fi
-"$QEMU" --version
+"$upstream_qemu" --version
LIBGUESTFS_QEMU=$abs_srcdir/test-upstream-qemu-wrapper.sh
+
+if [ ! -f "$LIBGUESTFS_QEMU" ]; then
+ echo "$0: internal error: \$LIBGUESTFS_QEMU not a file"
+ exit 1
+fi
+
export LIBGUESTFS_QEMU
-export QEMU
+export upstream_qemu
$MAKE -C ../.. quickcheck
$MAKE -C ../c-api check