2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-31 10:06:39 +00:00

modify pkg testcase

This commit is contained in:
junxiawang 2016-06-22 05:31:25 -04:00
parent f926e81c1c
commit 6e7b7e20dc
2 changed files with 31 additions and 25 deletions

View File

@ -8,6 +8,8 @@ cmd:if echo "__GETNODEATTR($$CN,os)__" | grep ubuntu >/dev/null; then xdsh $$CN
check:rc==0
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -c $$osimage pkglist __GETNODEATTR($$CN,os)__
check:rc==0
cmd:copycds $$ISO
check:rc==0
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -r $$osimage pkglist __GETNODEATTR($$CN,os)__
check:rc==0
cmd:updatenode $$CN -S
@ -60,7 +62,7 @@ cmd:updatenode $$CN -S
check:rc==0
cmd:if echo "__GETNODEATTR($$CN,os)__" | grep ubuntu >/dev/null; then xdsh $$CN dpkg -l |grep xcat ;else xdsh $$CN rpm -qa |grep xCAT-test; fi
check:rc==0
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -c -o $$osimage __GETNODEATTR($$CN,os)__
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -c -o $$osimage otherpkgdir __GETNODEATTR($$CN,os)__
check:rc==0
cmd:if echo "__GETNODEATTR($$CN,os)__" | grep ubuntu >/dev/null; then xdsh $$CN dpkg -r xcat-test; else xdsh $$CN rpm -e xCAT-test; fi
check:rc==0
@ -76,10 +78,14 @@ cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -s -o $$osi
check:rc==0
cmd:updatenode $$CN -S
check:rc==0
cmd:sleep 10
check:rc==0
cmd:if echo "__GETNODEATTR($$CN,os)__" | grep ubuntu >/dev/null; then xdsh $$CN dpkg -l |grep xcat ;else xdsh $$CN rpm -qa |grep xCAT-test; fi
check:rc==0
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -c -o $$osimage otherpkgdir __GETNODEATTR($$CN,os)__
check:rc==0
cmd:copycds $$ISO
check:rc==0
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -r -o $$osimage otherpkgdir __GETNODEATTR($$CN,os)__
check:rc==0
cmd:updatenode $$CN -S
@ -99,7 +105,7 @@ cmd:updatenode $$CN -S
check:rc==0
cmd:if echo "__GETNODEATTR($$CN,os)__" | grep ubuntu >/dev/null; then xdsh $$CN dpkg -l |grep xcat ;else xdsh $$CN rpm -qa |grep xCAT-test; fi
check:rc==0
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -c -o $$osimage __GETNODEATTR($$CN,os)__
cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/pkg/pkgtest.pl -c -o $$osimage otherpkgdir __GETNODEATTR($$CN,os)__
check:rc==0
cmd:if echo "__GETNODEATTR($$CN,os)__" | grep ubuntu >/dev/null; then xdsh $$CN dpkg -r xcat-test; else xdsh $$CN rpm -e xCAT-test; fi
check:rc==0

View File

@ -53,15 +53,15 @@ sub getimgattr
my $pkglistvalue;
print " output is @output \n";
if($?){
print "unkonw";
print "unkonw";
return "Unknown";
}
if($? == 0){
foreach my $output1 (@output){
if($output1 =~ /$ARGV[1]=(.*)/){
if($output1 =~ /$ARGV[1]=(.*)/){
print "output1 is $output1 ,attrs is $ARGV[1] value is $1 \n";
$pkglistvalue = $1 ;
}
$pkglistvalue = $1 ;
}
} }
return $pkglistvalue;
}
@ -71,15 +71,15 @@ sub setupenv
my $int = shift;
if ($ospkg){
`mkdir -p $int`;
`cp -rf /xcat-core $int`;
`cp -rf /xcat-core/* $int`;
}else{
`cp $int /tmp/pkgtest.bak`;
`cat "$int" >> /tmp/pkgtest.bak`;
}
if (($ARGV[2] =~ /ubuntu/)&&($ospkg ==0)){
`echo "rpm" >>/tmp/pkgtest.bak `;
}else{
`echo "xCAT-test" >>/tmp/pkgtest.bak `;
}
if (($ARGV[2] =~ /ubuntu/)&&($ospkg ==0)){
`echo "rpm" >>/tmp/pkgtest.bak `;
}else{
`echo "xCAT-test" >>/tmp/pkgtest.bak `;
}
}
sub clearenv
{
@ -98,15 +98,15 @@ sub setupenvinclude
my $int = shift;
if ($ospkg){
`mkdir -p $int`;
`cp -rf /xcat-core $int`;
}else{
` cp $int /tmp/pkgtest.bak`;
}
`cp -rf /xcat-core/* $int`;
}else{
` cat $int >> /tmp/pkgtest.bak`;
}
if (($ARGV[2] =~ /ubuntu/)&&($ospkg ==0)){
`echo "rpm" >>/tmp/pkgtest.bak `;
}else{
`echo "xCAT-test" >> /tmp/pkgtest.includelist `;
}
`echo "rpm" >>/tmp/pkgtest.bak `;
}else{
`echo "xCAT-test" >> /tmp/pkgtest.includelist `;
}
`echo "#INCLUDE:/tmp/pkgtest.includelist#">>/tmp/pkgtest.bak `;
}
sub removerpm
@ -114,10 +114,10 @@ sub removerpm
my $int = shift;
if ($ospkg){
`mkdir -p $int`;
`cp -rf /xcat-core $int`;
}else{
` cp $int /tmp/pkgtest.bak`;
}
`cp -rf /xcat-core/* $int`;
}else{
`cat "$int" >> /tmp/pkgtest.bak`;
}
if (($ARGV[2] =~ /ubuntu/)&&($ospkg ==0)){
`echo "-rpm" >>/tmp/pkgtest.bak `;
}elsif(($ARGV[2] =~ /ubuntu/)&&($ospkg !=0)){