diff --git a/xCAT-test/xcattest b/xCAT-test/xcattest index 511fcfb43..c159bc9b2 100755 --- a/xCAT-test/xcattest +++ b/xCAT-test/xcattest @@ -477,10 +477,11 @@ sub loadcase $j = -1; $cases[$i]={}; $cases[$i]->{name}=$name; - $cases[$i]->{filename}=$file; + $cases[$i]->{filename}=$file; if(!$needshow){ $cases[$i]->{cmd}=[]; $cases[$i]->{check}=[]; + $cases[$i]->{cmdcheck}=[]; push(@rightcase, $name); }else{ $skip = 1; @@ -545,6 +546,14 @@ sub loadcase return 1; } $z = $z + 1; + }elsif($line =~ /^cmdcheck\s*:\s*(\w.+)/){ + next if $skip; + $cases[$i]->{cmdcheck}->[$j][$z] = &getvar($1); + if($cases[$i]->{cmdcheck}->[$j][$z] eq ''){ + close(FILE); + return 1; + } + $z = $z + 1; }elsif($line =~ /^end/){ next if $skip; $i = $i + 1; @@ -756,6 +765,9 @@ sub runcase } } } + foreach my $cmdcheck (@{$$case{cmdcheck}->[$j]}){ + &runcmd($cmdcheck); + } $j = $j + 1; } my $now2=timelocal(localtime());