From: Géza Gémes Date: Sat, 25 Mar 2017 19:28:57 +0000 (+0100) Subject: Introduce cirros-pvgrub2-pv test X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=86e3e706bdd16d351065e06b3007ca6c8689df9a;p=raisin.git Introduce cirros-pvgrub2-pv test This test verifies booting the cirros image using pvgrub2 Signed-off-by: Géza Gémes Reviewed-by: Stefano Stabellini --- diff --git a/tests/cirros-pvgrub2-pv b/tests/cirros-pvgrub2-pv new file mode 100644 index 0000000..4994ea9 --- /dev/null +++ b/tests/cirros-pvgrub2-pv @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +set -e + +function cirros-pvgrub2-pv-cleanup() { + tear_down_cirros_test $testdir +} + +function cirros-pvgrub2-pv-test() { + download_cirros_components + testdir=`mktemp -d` + cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir + # Need to install grub.cfg + local cirros_disk_loop=`$SUDO $BASEDIR/scripts/lopartsetup $testdir/$CIRROS_DISK_FILE | head -1 | cut -d ":" -f 1` + local cirros_disk_mntpt=`mktemp -d` + $SUDO mount $cirros_disk_loop $cirros_disk_mntpt + cirros_grub_cfg $cirros_disk_mntpt + $SUDO umount $cirros_disk_mntpt + $SUDO rmdir $cirros_disk_mntpt + $SUDO losetup -d $cirros_disk_loop + cat >$testdir/cirros-pvgrub2-pv.cfg <