From 66d9c1b05c12475e94d61587efa6792295d02828 Mon Sep 17 00:00:00 2001 From: junxiawang Date: Mon, 5 Dec 2016 05:08:29 -0500 Subject: [PATCH] modify statelite testcase --- .../testcase/installation/Diskless_installation_flat_p8_le | 7 +++++++ .../reg_linux_statelite_installation_hierarchy_by_nfs | 2 -- .../reg_linux_statelite_installation_hierarchy_by_ramdisk | 2 -- .../testcase/installation/ubuntu_diskless_installation_vm | 4 +++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le index cdd4e875d..42b35a1cf 100644 --- a/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le +++ b/xCAT-test/autotest/testcase/installation/Diskless_installation_flat_p8_le @@ -17,6 +17,9 @@ cmd:makedhcp -a check:rc==0 cmd:makeconservercf $$CN check:rc==0 +cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi +check:rc==0 + cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -d /install/custom/netboot/sles ]; then mkdir -p /install/custom/netboot/sles; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -d /install/custom/netboot/rh ]; then mkdir -p /install/custom/netboot/rh; fi; elif cat /etc/*release |grep "Ubuntu" >/dev/null;then if [ ! -d /install/custom/netboot/ubuntu ]; then mkdir -p /install/custom/netboot/ubuntu; fi; fi check:rc==0 cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -e /install/custom/netboot/sles/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/sles/compute.synclist; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -e /install/custom/netboot/rh/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/rh/compute.synclist; fi; elif cat /etc/*release |grep "Ubuntu" >/dev/null;then if [ ! -e /install/custom/netboot/ubuntu/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/ubuntu/compute.synclist;fi; fi @@ -61,4 +64,8 @@ check:output=~booted cmd:xdsh $$CN date check:rc==0 check:output=~\d\d:\d\d:\d\d +check:rc==0 +cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi +check:rc==0 + end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs index d33cc5b1c..6d5a07282 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs @@ -93,6 +93,4 @@ check:output=~compute/rootimg on / type nfs cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then rm -rf $rootimgdir;fi check:rc==0 -cmd:rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -check:rc==0 end diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk index b0b3094c2..9531d7c4e 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk @@ -95,6 +95,4 @@ check:output=~rootfs on / type cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi check:rc==0 -cmd:rmdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute -check:rc==0 end diff --git a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm index abf14d1c8..1ac941c80 100644 --- a/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm +++ b/xCAT-test/autotest/testcase/installation/ubuntu_diskless_installation_vm @@ -17,7 +17,7 @@ cmd:makedhcp -a check:rc==0 cmd:makeconservercf $$CN check:rc==0 -cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/x86_64/compute +cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak -f;fi check:rc==0 cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute check:rc==0 @@ -44,4 +44,6 @@ check:output=~booted cmd:xdsh $$CN date check:rc==0 check:output=~\d\d:\d\d:\d\d +cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi +check:rc==0 end