mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 09:36:41 +00:00
Added syntax checking to xcattest
This commit is contained in:
parent
1076feeedb
commit
b4f8a9797d
@ -1447,6 +1447,11 @@ sub run_case {
|
||||
|| (($op eq '==') && ($lvalue ne $rvalue))
|
||||
|| (($op eq '!=') && ($lvalue eq $rvalue))) {
|
||||
$failflag = 1;
|
||||
} elsif (($op ne '=~') && ($op ne '!~') && ($op ne '==') && ($op ne '!=')) {
|
||||
$failflag = 1;
|
||||
log_this($running_log_fd, "CHECK:output unrecognized operator: $op\t[Failed]");
|
||||
push(@caselog, "CHECK:output unrecognized operator: $op\t[Failed]");
|
||||
last;
|
||||
}
|
||||
if ($failflag) {
|
||||
log_this($running_log_fd, "CHECK:output $op $rvalue\t[Failed]");
|
||||
@ -1491,7 +1496,13 @@ sub run_case {
|
||||
} else {
|
||||
log_this($running_log_fd, "CHECK:output $op $rvalue\t[Pass]");
|
||||
push(@caselog, "CHECK:output $op $rvalue\t[Pass]");
|
||||
} } }
|
||||
}
|
||||
} else {
|
||||
$failflag = 1;
|
||||
log_this($running_log_fd, "Unrecognized testcase syntax: CHECK:$check\t[Failed]");
|
||||
push(@caselog, "Unrecognized testcase syntax: CHECK:$check\t[Failed]");
|
||||
}
|
||||
}
|
||||
foreach my $cmdcheck (@{ $cases_ref->[ $case_name_index_map_ref->{$case} ]->{cmdcheck}->[$j] }) {
|
||||
if ($cmdcheck) {
|
||||
&runcmd($cmdcheck);
|
||||
|
Loading…
x
Reference in New Issue
Block a user