[Libvirt-cim] [PATCH] [TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Mon Aug 18 21:09:49 UTC 2008


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1219093729 25200
# Node ID 0ffa5529fe3bc599cba875ac3927efe9e56b8626
# Parent  4cbb5bea5f3b72a7a716bb9d3c4b6e8d9c3f4596
[TEST] Fix xmt-makefvt.sh to work with systems with no non-Xen kernel.

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r 4cbb5bea5f3b -r 0ffa5529fe3b suites/libvirt-cim/images/xmt-makefv.sh
--- a/suites/libvirt-cim/images/xmt-makefv.sh	Mon Aug 18 13:18:16 2008 -0700
+++ b/suites/libvirt-cim/images/xmt-makefv.sh	Mon Aug 18 14:08:49 2008 -0700
@@ -85,7 +85,18 @@
 kernel_path() {
     local prefix=$1
 
-    find /boot | grep vmlinuz | grep -v xen | tail -n1
+    local image=`find /boot | grep vmlinuz | grep -v xen | tail -n1`
+
+    if [ -z $image ]; then
+        local dummy_path="cimtest-dummy-image"
+
+        echo "No non-Xen kernel found.  Creating a fake image.\n"
+        touch /boot/vmlinuz-$(dummy_path)
+        mkdir /lib/modules/$(dummy_path)
+        image="/boot/vmlinuz-$(dummy_path)"
+    fi
+
+    echo $image
 }
 
 copy_in_kernel() {




More information about the Libvirt-cim mailing list