test/runtests: add TestBench result check
This check does not capture output (thus test results will show in console log) and only checks for exit code - zero means success and nonzero means failure. We'll use this check for benchmark tests.
Esse commit está contido em:
@@ -934,6 +934,8 @@ sub get_resultTest {
|
||||
return \&TestStatusNoErrors;
|
||||
} elsif ($resultTest eq "TestErrFatal") {
|
||||
return \&TestErrFatal;
|
||||
} elsif ($resultTest eq "TestBench") {
|
||||
return \&TestBench;
|
||||
} else {
|
||||
die "resultTest $resultTest not defined!\n";
|
||||
}
|
||||
@@ -1112,6 +1114,22 @@ sub TestErrFatal {
|
||||
return ($found_error, $inline);
|
||||
}
|
||||
|
||||
# Only check exit code: 0 means success, non-zero means failure
|
||||
sub TestBench {
|
||||
my ($MPIOUT, $programname) = @_;
|
||||
my ($found_error, $inline);
|
||||
|
||||
while (<$MPIOUT>) {
|
||||
print STDOUT $_;
|
||||
}
|
||||
my $rc = close($MPIOUT);
|
||||
if (!$rc) {
|
||||
expect_status_zero($programname, $?);
|
||||
$found_error = 1;
|
||||
}
|
||||
return ($found_error, $inline);
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Output routines:
|
||||
# OpenOutputs - Open report files and print initial lines
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário