cicd: Handle dut-gitlog

Add the DUT's gitlog to the report if it exists.
This commit is contained in:
Ben Greear
2020-05-18 12:44:06 -07:00
parent 14197d4d5b
commit f1f3c5c351
2 changed files with 18 additions and 4 deletions

View File

@@ -355,7 +355,13 @@ then
GITLOG=NA GITLOG=NA
fi fi
./lf_gui_report_summary.pl --title "$TEST_RIG_ID: $DUT_SW_VER" --dir $RSLTS_DIR --gitlog $GITLOG --notes $NOTES_HTML < index_template.html > $RSLTS_DIR/index.html if [ "_${DUTGITLOG}" == "_" ]
then
DUTGITLOG=NA
fi
echo "Done with regression test." echo "./lf_gui_report_summary.pl --title \"$TEST_RIG_ID: $DUT_SW_VER\" --dir $RSLTS_DIR --dutgitlog $DUTGITLOG --gitlog $GITLOG --notes $NOTES_HTML"
./lf_gui_report_summary.pl --title "$TEST_RIG_ID: $DUT_SW_VER" --dir $RSLTS_DIR --dutgitlog $DUTGITLOG --gitlog $GITLOG --notes $NOTES_HTML < index_template.html > $RSLTS_DIR/index.html
echo "Done with automated regression test."
echo "Results-Dir: $RSLTS_DIR" echo "Results-Dir: $RSLTS_DIR"

View File

@@ -25,6 +25,7 @@ use HTML::Entities;
our $dir = ""; our $dir = "";
our $notes = ""; our $notes = "";
our $gitlog = ""; our $gitlog = "";
our $dutgitlog = "";
our $title = "Automated test results."; our $title = "Automated test results.";
@@ -33,10 +34,10 @@ our $title = "Automated test results.";
######################################################################## ########################################################################
our $usage = <<"__EndOfUsage__"; our $usage = <<"__EndOfUsage__";
$0 [ --dir directory-to-process --notes testbed-notes-file.html --gitlog gitlog-output.txt ] < html_template.html $0 [ --dir directory-to-process --notes testbed-notes-file.html --dutgitlog dut-gitlog-output.html --gitlog gitlog-output.html ] < html_template.html
Example: Example:
cat html-template | $0 --dir ~/tmp/results --title "My Title" --notes testbeds/my_testbed/testbed_notes.html --gitlog /tmp/gitlog.txt cat html-template | $0 --dir ~/tmp/results --title "My Title" --notes testbeds/my_testbed/testbed_notes.html --dutgitlog /tmp/dgitlog.html --gitlog /tmp/gitlog.html
__EndOfUsage__ __EndOfUsage__
my $i = 0; my $i = 0;
@@ -47,6 +48,7 @@ GetOptions
'dir|d=s' => \$::dir, 'dir|d=s' => \$::dir,
'notes|n=s' => \$::notes, 'notes|n=s' => \$::notes,
'gitlog|g=s' => \$::gitlog, 'gitlog|g=s' => \$::gitlog,
'dutgitlog=s' => \$::dutgitlog,
'title|t=s' => \$::title, 'title|t=s' => \$::title,
'help|h' => \$show_help, 'help|h' => \$show_help,
) || die("$::usage"); ) || die("$::usage");
@@ -62,6 +64,12 @@ if (-f "$notes") {
$testbed_notes .= `cat $notes`; $testbed_notes .= `cat $notes`;
} }
if (-f "$dutgitlog") {
$testbed_notes .= "<P>\n";
$testbed_notes .= `cat $dutgitlog`;
$testbed_notes .= "<p>\n";
}
if (-f "$gitlog") { if (-f "$gitlog") {
$testbed_notes .= "<P>\n"; $testbed_notes .= "<P>\n";
$testbed_notes .= `cat $gitlog`; $testbed_notes .= `cat $gitlog`;