Skip to content

Commit

Permalink
Update testreporter to work with updated ESMCI CIME
Browse files Browse the repository at this point in the history
Test suite: populated testing database for yellowstone prealpha test
Test baseline:
Test namelist changes:
Test status: bit for bit

Fixes [CIME Github issue #]

User interface changes?:

Code review:
  • Loading branch information
fischer-ncar committed Jul 21, 2016
1 parent b7ed88f commit 6d29a93
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions scripts/Testing/testreporter.pl
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ sub getTestStatus
{
warn("$statusfile does not exist, skipping to next test.");
$teststatushash{$testcase}{'status'} = "TFAIL";
$tetstatushash{$testcase}{'comment'} = "TestStatus file could not be found!";
$teststatushash{$testcase}{'comment'} = "TestStatus file could not be found!";
next;
}
&Debug( "Status file: $statusfile\n");
Expand All @@ -285,9 +285,11 @@ sub getTestStatus

# If the 'test functionality summary' is not PASS, then report the
# test functionality summary as the teststatus field.

# Namelist compare
my @testsummarylines = grep { /nlcomp/ } @statuslines;
$testsummary = (split(/\s+/, $testsummarylines[0]))[0];
if ($testsummary =~ "NLFAIL") {$testsummary = "FAIL";}
$teststatushash{$testcase}{'nlcomp'} = (length($testsummary) > 0) ? $testsummary : "----";

# Memory leak
Expand All @@ -305,6 +307,12 @@ sub getTestStatus
$teststatushash{$testcase}{'memcomp'} = (length($testsummary) > 0) ? $testsummary : "----";
}

#Compare to baseline
my ( $index ) = grep { $statuslines[$_] =~ /baseline compare summary/ } 0..$#statuslines;
my @testsummarylines = $statuslines[$index-1];
$testsummary = (split(/\s+/, $testsummarylines[0]))[0];
$teststatushash{$testcase}{'compare'} = (length($index) > 0) ? $testsummary : "----";

# Compare through put to baseline
my @testsummarylines = grep { /Throughput/} grep { /baseline/} @statuslines;
my $testsummary = (split(/\s+/, $testsummarylines[0]))[0];
Expand All @@ -313,14 +321,14 @@ sub getTestStatus
my @testsummarylines = grep { /tputcomp/} @statuslines;
my $testsummary = (split(/\s+/, $testsummarylines[0]))[0];
$teststatushash{$testcase}{'tputcomp'} = (length($testsummary) > 0) ? $testsummary : "----";
if ($testcase =~ "PFS" && $testsummary =~ "FAIL")
{
$teststatushash{$testcase}{'status'} = "FAIL";
$teststatushash{$testcase}{'comment'} = "Performance failure!";
next;
}
}

#Compare to baseline
my ( $index ) = grep { $statuslines[$_] =~ /baseline compare summary/ } 0..$#statuslines;
my @testsummarylines = $statuslines[$index-1];
$testsummary = (split(/\s+/, $testsummarylines[0]))[0];
$teststatushash{$testcase}{'compare'} = (length($index) > 0) ? $testsummary : "----";

# Check for INIT failure
my @testsummarylines = grep { /INIT/ } @statuslines;
$testsummary = (split(/\s+/, $testsummarylines[0]))[0];
Expand Down Expand Up @@ -391,7 +399,7 @@ sub getTestStatus
}

#Compare for functionality
my ( $index ) = grep { $statuslines[$_] =~ /functionality summary \(restart/ } 0..$#statuslines;
my ( $index ) = grep { $statuslines[$_] =~ /functionality summary \(Compare base and rest/ } 0..$#statuslines;
my @testsummarylines = $statuslines[$index-1];
$testsummary = (split(/\s+/, $testsummarylines[0]))[0];
if(length($index) > 0 &&defined $testsummary && $testsummary !~ /PASS/)
Expand All @@ -401,7 +409,7 @@ sub getTestStatus
next;
}

my ( $index ) = grep { $statuslines[$_] =~ /functionality summary \(hybrid/ } 0..$#statuslines;
my ( $index ) = grep { $statuslines[$_] =~ /unctionality summary \(Compare base and hybrid/ } 0..$#statuslines;
my @testsummarylines = $statuslines[$index-1];
$testsummary = (split(/\s+/, $testsummarylines[0]))[0];
if(length($index) > 0 && defined $testsummary && $testsummary !~ /PASS/)
Expand All @@ -411,7 +419,7 @@ sub getTestStatus
next;
}

my ( $index ) = grep { $statuslines[$_] =~ /functionality/ } 0..$#statuslines;
my ( $index ) = grep { $statuslines[$_] =~ /functionality summary/ } 0..$#statuslines;
my @testsummarylines = $statuslines[$index-1];
$testsummary = (split(/\s+/, $testsummarylines[0]))[0];
if(length($index) > 0 && defined $testsummary && $testsummary !~ /PASS/)
Expand Down

0 comments on commit 6d29a93

Please sign in to comment.