Allow the i386 ramdisk to be used on x86_64. Part of a patch from Yu Ping Y.
authorEwan Mellor <ewan@xensource.com>
Wed, 1 Nov 2006 09:21:27 +0000 (09:21 +0000)
committerEwan Mellor <ewan@xensource.com>
Wed, 1 Nov 2006 09:21:27 +0000 (09:21 +0000)
Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/xm-test/runtest.sh

index 7008972faeeaeb1cbee839f2b512a9fdf32a474e..f882b0400782f976ed904b6f4289f4c7fd03f961 100755 (executable)
@@ -78,7 +78,13 @@ runnable_tests() {
     eval $(./lib/XmTestReport/xmtest.py)
     ARCH=$(uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/')
     rrdver="initrd-${XM_TEST_MAJ}.${XM_TEST_MIN}-${ARCH}.img"
-    if [ "$realrd" != "$rrdver" ]; then
+    exp_flag=0
+    realarch=`echo $realrd | awk -F- '{print $3}' | awk -F. '{print $1}'`
+    rrdarch=`echo $rrdver | awk -F- '{print $3}' | awk -F. '{print $1}'`
+    if [ "$realarch" = "i386" -a "$rrdarch" = "x86_64" ]; then
+       exp_flag=1
+    fi
+    if [ $exp_flag -eq 0 -a "$realrd" != "$rrdver" ]; then
        echo "Error: ramdisk/initrd.img is from an old version, or is not for this "
         echo "architecture ($ARCH)."
        echo "You need to build a ramdisk from at least ${XM_TEST_MAJ}.${XM_TEST_MIN}"