kpi: Support subtests passed/failed.

This commit is contained in:
Ben Greear
2020-05-22 12:52:59 -07:00
parent 2ff0069f3b
commit 5e8c9dd3b2
3 changed files with 46 additions and 4 deletions

View File

@@ -27,7 +27,7 @@
<h3>Individual test results and logs.</h3>
<table border="1" cellpadding="6" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
<!-- <tr><td><a href=ap_auto_basic_cx/index.html>AP AUto Basic CX Report</a></td><td><a href=ap_auto_basic_cx/logs>Logs</a></td></tr> -->
<!-- <tr><td><a href=ap_auto_basic_cx/index.html>AP Auto Basic CX Report</a></td><td><a href=ap_auto_basic_cx/logs>Logs</a></td></tr> -->
___TR_TESTS___
</table>
<P>
@@ -41,8 +41,8 @@
<P>
<table border="1" cellpadding="2" cellspacing="0" style="border-top-color: gray; border-top-style: solid; border-top-width: 1px; border-right-color: gray; border-right-style: solid; border-right-width: 1px; border-bottom-color: gray; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: gray; border-left-style: solid; border-left-width: 1px">
<tr><th>Test-ID</th><th>Short Description</th><th>Pass/Fail</th><th>Numeric Result</th><th>Test Details</th></tr>
<!-- <tr><td>AP AUtomated Test</td><td>Daul Band Performance</td><td>PASS</td><td>86.44</td><td>Dual-Concurrent vs 90% of Sum: 435.68 Mbps / 558.84 Mbps Dual-Concurrent vs 90% of Sum: 598.17 Mbps / 630.11 Mbps</td></tr> -->
<tr><th>Test-ID</th><th>Short Description</th><th>Pass/Fail</th><th>Subtest-Passed</th><th>Subtest-Failed</th><th>Numeric Result</th><th>Test Details</th></tr>
<!-- <tr><td>AP AUtomated Test</td><td>Daul Band Performance</td><td>PASS</td><td>1</td><td>2</td><td>86.44</td><td>Dual-Concurrent vs 90% of Sum: 435.68 Mbps / 558.84 Mbps Dual-Concurrent vs 90% of Sum: 598.17 Mbps / 630.11 Mbps</td></tr> -->
___TR_KPI___
</table>
<P>

View File

@@ -42,6 +42,8 @@ public class kpi {
public static int NOTES_IDX = 11;
public static int UNITS_IDX = 12;
public static int GRAPH_GROUP_IDX = 13;
public static int SUBTEST_PASS_IDX = 14;
public static int SUBTEST_FAIL_IDX = 15;
public static String TESTBED_TEMPLATE = "testbed_template.html";
public static String AP_AUTO_BASIC_CX = "ap_auto_basic_cx";
@@ -684,6 +686,18 @@ class Row {
return rdata.elementAt(kpi.NOTES_IDX);
}
String getSubtestPassed() {
if (rdata.size() > kpi.SUBTEST_PASS_IDX)
return rdata.elementAt(kpi.SUBTEST_PASS_IDX);
return "";
}
String getSubtestFailed() {
if (rdata.size() > kpi.SUBTEST_FAIL_IDX)
return rdata.elementAt(kpi.SUBTEST_FAIL_IDX);
return "";
}
String getUnits() {
try {
return rdata.elementAt(kpi.UNITS_IDX);
@@ -928,6 +942,26 @@ class Test {
fail++;
}
String spass = row.getSubtestPassed();
try {
if (!spass.equals("")) {
pass += Long.valueOf(spass).longValue();
}
}
catch (Exception ee) {
ee.printStackTrace();
}
String sfail = row.getSubtestFailed();
try {
if (!sfail.equals("")) {
fail += Long.valueOf(sfail).longValue();
}
}
catch (Exception ee) {
ee.printStackTrace();
}
row.setShortDescKey(row.getShortDesc().replace(" ", "_"));
//System.out.println("Row: " + row);
descs.put(row.getShortDesc(), row.getShortDesc());

View File

@@ -148,7 +148,15 @@ foreach my $line (@files) {
if ( $nval =~ /^[+-]?(?=\.?\d)\d*\.?\d*(?:e[+-]?\d+)?\z/i ) {
$nval = sprintf("%.2f", $nval);
}
$kpi_tr .= "<tr><td>$cols[7]</td><td>$cols[8]</td><td>$cols[9]</td><td>$nval</td><td>$cols[11]</td></tr>\n";
my $s_passed = "0";
my $s_failed = "0";
if (@cols >= 16) {
$s_passed = $cols[14];
$s_failed = $cols[15];
}
$kpi_tr .= "<tr><td>$cols[7]</td><td>$cols[8]</td><td>$cols[9]</td><td>$s_passed</td><td>$s_failed</td><td>$nval</td><td>$cols[11]</td></tr>\n";
}
}
}