From 4100a8085ca2cf264bf4f1c40b0fc60d3b9ce613 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Tue, 14 Jun 2016 01:28:05 -0400 Subject: [PATCH] modify the way to check the sync file --- .../reg_linux_statelite_installation_hierarchy_by_nfs | 7 +++++-- .../reg_linux_statelite_installation_hierarchy_by_ramdisk | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) 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 7a5ce51da..0c0f1fd51 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 @@ -92,8 +92,11 @@ cmd:xdsh $$CN mount check:rc==0 check:output=~/nodedata/$$CN on /.statelite/persistent check:output=~compute/rootimg on / type nfs -cmd:MNIP=`cat /etc/hosts|grep $$MN|awk '{print $1}'`; result=`xdsh $$CN "cat /etc/resolv.conf|grep $MNIP"`; if [ "$result" = "$$CN: nameserver $MNIP" ]; then echo "sync file works well"; fi; -check:output=~sync file works well +cmd:scp $$CN:/etc/resolv.conf /tmp/resolv.conf +check:rc==0 +cmd:diff /etc/resolv.conf /tmp/resolv.conf +check:rc==0 +cmd:rm -f /tmp/resolv.conf 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 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 a1a1b3dac..0477ac566 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 @@ -94,8 +94,11 @@ cmd:xdsh $$CN mount check:rc==0 check:output=~/nodedata/$$CN on /.statelite/persistent check:output=~rootfs on / type -cmd:MNIP=`cat /etc/hosts|grep $$MN|awk '{print $1}'`; result=`xdsh $$CN "cat /etc/resolv.conf|grep $MNIP"`; if [ "$result" = "$$CN: nameserver $MNIP" ]; then echo "sync file works well"; fi; -check:output=~sync file works well +cmd:scp $$CN:/etc/resolv.conf /tmp/resolv.conf +check:rc==0 +cmd:diff /etc/resolv.conf /tmp/resolv.conf +check:rc==0 +cmd:rm -f /tmp/resolv.conf 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