]> xenbits.xensource.com Git - raisin.git/commitdiff
Introduce cirros-pygrub-pv test
authorGéza Gémes <geza.gemes@gmail.com>
Sat, 25 Mar 2017 19:28:56 +0000 (20:28 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 27 Mar 2017 18:44:27 +0000 (11:44 -0700)
This test verifies booting the cirros image using pygrub

Signed-off-by: Géza Gémes <geza.gemes@gmail.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
tests/cirros-pygrub-pv [new file with mode: 0644]
tests/series

diff --git a/tests/cirros-pygrub-pv b/tests/cirros-pygrub-pv
new file mode 100644 (file)
index 0000000..37e288c
--- /dev/null
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+set -e
+
+function cirros-pygrub-pv-cleanup() {
+    tear_down_cirros_test $testdir
+}
+
+function cirros-pygrub-pv-test() {
+    download_cirros_components
+    testdir=`mktemp -d`
+    cp $CIRROS_DOWNLOADS/$CIRROS_DISK_FILE $testdir
+    cat >$testdir/cirros-pygrub-pv.cfg <<EOF
+name = "raisin-test"
+memory = 128
+vcpus = 2
+bootloader = "pygrub"
+disk = [ '$testdir/$CIRROS_DISK_FILE,raw,xvda,rw' ]
+extra = "root=/dev/xvda1"
+vif = [ 'bridge=xenbr1' ]
+EOF
+
+    $SUDO xl create $testdir/cirros-pygrub-pv.cfg
+    check_guest_alive
+}
index 38ee35a1b74e67bf1062831d62f598a3928b0e73..372fafba6de9637f6564f3a2c5cefe42b6141790 100644 (file)
@@ -2,3 +2,4 @@ busybox-pv
 busybox-hvm
 busybox-hvm-migrate
 cirros-separate-kernel-pv
+cirros-pygrub-pv