mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 03:07:56 +00:00
kpi: Support adding git-log info to the Run report.
This commit is contained in:
@@ -339,7 +339,18 @@ then
|
|||||||
mv $MY_TMPDIR/dut_console_log.txt $RSLTS_DIR/
|
mv $MY_TMPDIR/dut_console_log.txt $RSLTS_DIR/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./lf_gui_report_summary.pl --title "TIP Test Bed Results" --dir $RSLTS_DIR < index_template.html > $RSLTS_DIR/index.html
|
RPT_ARGS=
|
||||||
|
if [ "_${NOTES_HTML}" == "_" ]
|
||||||
|
then
|
||||||
|
NOTES_HTML=NA
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "_${GITLOG}" == "_" ]
|
||||||
|
then
|
||||||
|
GITLOG=NA
|
||||||
|
fi
|
||||||
|
|
||||||
|
./lf_gui_report_summary.pl --title "TIP Test Bed Results" --dir $RSLTS_DIR --gitlog $GITLOG --notes $NOTES_HTML < index_template.html > $RSLTS_DIR/index.html
|
||||||
|
|
||||||
echo "Done with regression test."
|
echo "Done with regression test."
|
||||||
echo "Results-Dir: $RSLTS_DIR"
|
echo "Results-Dir: $RSLTS_DIR"
|
||||||
|
|||||||
@@ -45,6 +45,9 @@
|
|||||||
<!-- <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><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_KPI___
|
___TR_KPI___
|
||||||
</table>
|
</table>
|
||||||
|
<P>
|
||||||
|
|
||||||
|
___TESTBED_NOTES___
|
||||||
|
|
||||||
</div><!--end content-div -->
|
</div><!--end content-div -->
|
||||||
<div class='FooterStyle'><span class='Gradient'>Generated by Candela Technologies LANforge network testing tool.<br/>
|
<div class='FooterStyle'><span class='Gradient'>Generated by Candela Technologies LANforge network testing tool.<br/>
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ public class kpi {
|
|||||||
mplot.append(", ");
|
mplot.append(", ");
|
||||||
}
|
}
|
||||||
plot.append("\'" + csv.getFname() + "\' using 1:2 with lines title \'" + csv.getName().replace("_", " ") + "\'");
|
plot.append("\'" + csv.getFname() + "\' using 1:2 with lines title \'" + csv.getName().replace("_", " ") + "\'");
|
||||||
mplot.append("\'" + csv.getFname() + "\' using 1:2 notitle");
|
mplot.append("\'" + csv.getFname() + "\' using 1:2 with lines notitle");
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -358,7 +358,7 @@ public class kpi {
|
|||||||
for (int i = 0; i<runs.size(); i++) {
|
for (int i = 0; i<runs.size(); i++) {
|
||||||
Run run = runs.elementAt(i);
|
Run run = runs.elementAt(i);
|
||||||
test_bed = run.getTestRig();
|
test_bed = run.getTestRig();
|
||||||
runs_rows.append("<tr><td><a href=\"" + run.getName() + "/index.html\">" + run.getName() + "</a></td><td>" + run.getDate()
|
runs_rows.append("<tr><td>" + i + "</td><td><a href=\"" + run.getName() + "/index.html\">" + run.getName() + "</a></td><td>" + run.getDate()
|
||||||
+ "</td><td>" + run.getDutHwVer() + "</td><td>" + run.getDutSwVer()
|
+ "</td><td>" + run.getDutHwVer() + "</td><td>" + run.getDutSwVer()
|
||||||
+ "</td><td>" + run.getDutModelNum() + "</td></tr>\n");
|
+ "</td><td>" + run.getDutModelNum() + "</td></tr>\n");
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ use lib "./";
|
|||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
||||||
our $dir = "";
|
our $dir = "";
|
||||||
|
our $notes = "";
|
||||||
|
our $gitlog = "";
|
||||||
our $title = "Automated test results.";
|
our $title = "Automated test results.";
|
||||||
|
|
||||||
|
|
||||||
@@ -30,10 +32,10 @@ our $title = "Automated test results.";
|
|||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
our $usage = <<"__EndOfUsage__";
|
our $usage = <<"__EndOfUsage__";
|
||||||
$0 [ --dir directory-to-process ]
|
$0 [ --dir directory-to-process --notes testbed-notes-file.html --gitlog gitlog-output.txt ]
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
$0 --dir ~/tmp/results --title "My Title"
|
$0 --dir ~/tmp/results --title "My Title" --notes testbeds/my_testbed/testbed_notes.html --gitlog /tmp/gitlog.txt
|
||||||
__EndOfUsage__
|
__EndOfUsage__
|
||||||
|
|
||||||
my $i = 0;
|
my $i = 0;
|
||||||
@@ -42,6 +44,8 @@ my $show_help = 0;
|
|||||||
GetOptions
|
GetOptions
|
||||||
(
|
(
|
||||||
'dir|d=s' => \$::dir,
|
'dir|d=s' => \$::dir,
|
||||||
|
'notes|n=s' => \$::notes,
|
||||||
|
'gitlog|g=s' => \$::gitlog,
|
||||||
'title|t=s' => \$::title,
|
'title|t=s' => \$::title,
|
||||||
'help|h' => \$show_help,
|
'help|h' => \$show_help,
|
||||||
) || die("$::usage");
|
) || die("$::usage");
|
||||||
@@ -51,6 +55,23 @@ if ($show_help) {
|
|||||||
exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $testbed_notes = "";
|
||||||
|
if (-f "$notes") {
|
||||||
|
$testbed_notes .= "<b>Test Bed Notes.</b><br>\n";
|
||||||
|
$testbed_notes .= `cat $notes`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-f "$gitlog") {
|
||||||
|
$testbed_notes .= "<P>\n";
|
||||||
|
$testbed_notes .= `cat $gitlog`;
|
||||||
|
$testbed_notes .= "<p>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
$testbed_notes .= "<p><b>Top lanforge-scripts commits.</b><br><pre>\n";
|
||||||
|
$testbed_notes .= `git log -n 8 --oneline`;
|
||||||
|
$testbed_notes .= "</pre>\n";
|
||||||
|
|
||||||
|
|
||||||
chdir($dir);
|
chdir($dir);
|
||||||
|
|
||||||
my @files = `ls`;
|
my @files = `ls`;
|
||||||
@@ -75,6 +96,8 @@ my $dut_tr = "";
|
|||||||
my $kpi_tr = "";
|
my $kpi_tr = "";
|
||||||
my $tests_tr = "";
|
my $tests_tr = "";
|
||||||
|
|
||||||
|
# TODO: Add git commit history for other repositories perhaps?
|
||||||
|
|
||||||
foreach my $line (@files) {
|
foreach my $line (@files) {
|
||||||
if ( -d $line) {
|
if ( -d $line) {
|
||||||
if ( -d "$line/logs") {
|
if ( -d "$line/logs") {
|
||||||
@@ -120,6 +143,7 @@ while (<>) {
|
|||||||
$ln =~ s/___TR_DUT___/$dut_tr/g;
|
$ln =~ s/___TR_DUT___/$dut_tr/g;
|
||||||
$ln =~ s/___TR_KPI___/$kpi_tr/g;
|
$ln =~ s/___TR_KPI___/$kpi_tr/g;
|
||||||
$ln =~ s/___TR_TESTS___/$tests_tr/g;
|
$ln =~ s/___TR_TESTS___/$tests_tr/g;
|
||||||
|
$ln =~ s/___TESTBED_NOTES___/$testbed_notes/g;
|
||||||
print "$ln\n";
|
print "$ln\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
<h3>Individual Test Run Details.</h3>
|
<h3>Individual Test Run Details.</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">
|
<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><th>Test Run</th><th>Date</th><th>DUT Hardware</th><th>DUT Sofware</th><th>DUT Model</th></tr>
|
<tr><th>Test ID</th><th>Test Run</th><th>Date</th><th>DUT Hardware</th><th>DUT Sofware</th><th>DUT Model</th></tr>
|
||||||
___TEST_RUNS___
|
___TEST_RUNS___
|
||||||
</table>
|
</table>
|
||||||
<P>
|
<P>
|
||||||
|
|||||||
Reference in New Issue
Block a user