diff mbox

[05/11] Introduce cirros-pvgrub2-pv test

Message ID 1490381976-22981-6-git-send-email-geza.gemes@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gémes Géza March 24, 2017, 6:59 p.m. UTC
This test verifies booting the cirros image using pvgrub2

Signed-off-by: Géza Gémes <geza.gemes@gmail.com>
---
 tests/cirros-pvgrub2-pv | 24 ++++++++++++++++++++++++
 tests/series            |  1 +
 2 files changed, 25 insertions(+)
 create mode 100644 tests/cirros-pvgrub2-pv
diff mbox

Patch

diff --git a/tests/cirros-pvgrub2-pv b/tests/cirros-pvgrub2-pv
new file mode 100644
index 0000000..f48617e
--- /dev/null
+++ b/tests/cirros-pvgrub2-pv
@@ -0,0 +1,24 @@ 
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pvgrub2-pv-cleanup() {
+    tear_down_cirros_test $testdir
+}
+
+function cirros-pvgrub2-pv-test() {
+    testdir=`mktemp -d`
+    set_up_cirros_disk $testdir grub_install
+    cat >$testdir/cirros-pvgrub2-pv.cfg <<EOF
+name = "raisin-test"
+memory = 128
+vcpus = 2
+kernel = "$PVGRUB"
+disk = [ '${testdir}/${CIRROS_DISK_FILE},raw,xvda,rw' ]
+extra = "$CIRROS_GRUB_CFG"
+vif = [ 'bridge=xenbr1' ]
+EOF
+
+    $SUDO xl create $testdir/cirros-pvgrub2-pv.cfg
+    check_guest_alive
+}
diff --git a/tests/series b/tests/series
index 372fafb..1fec245 100644
--- a/tests/series
+++ b/tests/series
@@ -3,3 +3,4 @@  busybox-hvm
 busybox-hvm-migrate
 cirros-separate-kernel-pv
 cirros-pygrub-pv
+cirros-pvgrub2-pv