mirror of
				https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
				synced 2025-10-31 02:38:03 +00:00 
			
		
		
		
	cicd: Handle dut-gitlog
Add the DUT's gitlog to the report if it exists.
This commit is contained in:
		| @@ -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" | ||||||
|   | |||||||
| @@ -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`; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Ben Greear
					Ben Greear