diff --git a/gui/basic_regression.bash b/gui/basic_regression.bash index 16000c1f..9bf4b7d8 100755 --- a/gui/basic_regression.bash +++ b/gui/basic_regression.bash @@ -339,7 +339,18 @@ then mv $MY_TMPDIR/dut_console_log.txt $RSLTS_DIR/ 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 "Results-Dir: $RSLTS_DIR" diff --git a/gui/index_template.html b/gui/index_template.html index a8141ca3..c8345d1c 100644 --- a/gui/index_template.html +++ b/gui/index_template.html @@ -45,6 +45,9 @@ ___TR_KPI___ +

+ +___TESTBED_NOTES___

Generated by Candela Technologies LANforge network testing tool.
diff --git a/gui/kpi.java b/gui/kpi.java index 86374434..16e8e49f 100644 --- a/gui/kpi.java +++ b/gui/kpi.java @@ -286,7 +286,7 @@ public class kpi { mplot.append(", "); } 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; } @@ -358,7 +358,7 @@ public class kpi { for (int i = 0; i" + run.getName() + "" + run.getDate() + runs_rows.append("" + i + "" + run.getName() + "" + run.getDate() + "" + run.getDutHwVer() + "" + run.getDutSwVer() + "" + run.getDutModelNum() + "\n"); diff --git a/gui/lf_gui_report_summary.pl b/gui/lf_gui_report_summary.pl index cbc4b0cc..cb17e17f 100755 --- a/gui/lf_gui_report_summary.pl +++ b/gui/lf_gui_report_summary.pl @@ -22,6 +22,8 @@ use lib "./"; use Getopt::Long; our $dir = ""; +our $notes = ""; +our $gitlog = ""; our $title = "Automated test results."; @@ -30,10 +32,10 @@ our $title = "Automated test results."; ######################################################################## our $usage = <<"__EndOfUsage__"; -$0 [ --dir directory-to-process ] +$0 [ --dir directory-to-process --notes testbed-notes-file.html --gitlog gitlog-output.txt ] 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__ my $i = 0; @@ -42,6 +44,8 @@ my $show_help = 0; GetOptions ( 'dir|d=s' => \$::dir, + 'notes|n=s' => \$::notes, + 'gitlog|g=s' => \$::gitlog, 'title|t=s' => \$::title, 'help|h' => \$show_help, ) || die("$::usage"); @@ -51,6 +55,23 @@ if ($show_help) { exit 0; } +my $testbed_notes = ""; +if (-f "$notes") { + $testbed_notes .= "Test Bed Notes.
\n"; + $testbed_notes .= `cat $notes`; +} + +if (-f "$gitlog") { + $testbed_notes .= "

\n"; + $testbed_notes .= `cat $gitlog`; + $testbed_notes .= "

\n"; +} + +$testbed_notes .= "

Top lanforge-scripts commits.

\n";
+$testbed_notes .= `git log -n 8 --oneline`;
+$testbed_notes .= "
\n"; + + chdir($dir); my @files = `ls`; @@ -75,6 +96,8 @@ my $dut_tr = ""; my $kpi_tr = ""; my $tests_tr = ""; +# TODO: Add git commit history for other repositories perhaps? + foreach my $line (@files) { if ( -d $line) { if ( -d "$line/logs") { @@ -120,6 +143,7 @@ while (<>) { $ln =~ s/___TR_DUT___/$dut_tr/g; $ln =~ s/___TR_KPI___/$kpi_tr/g; $ln =~ s/___TR_TESTS___/$tests_tr/g; + $ln =~ s/___TESTBED_NOTES___/$testbed_notes/g; print "$ln\n"; } diff --git a/gui/testbed_template.html b/gui/testbed_template.html index 78ddac08..081a011c 100644 --- a/gui/testbed_template.html +++ b/gui/testbed_template.html @@ -33,7 +33,7 @@

Individual Test Run Details.

- + ___TEST_RUNS___
Test RunDateDUT HardwareDUT SofwareDUT Model
Test IDTest RunDateDUT HardwareDUT SofwareDUT Model