add new check item cmdcheck
This commit is contained in:
parent
c17315bf74
commit
6bf14a8c9a
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user