[Lsb-messages] /var/www/bzr/lsb/devel/distribution-checker r67: Enable regenerating a test run report using updated problem_db2 (bug 3484)

Stew Benedict stewb at linux-foundation.org
Sun May 6 14:38:00 UTC 2012


------------------------------------------------------------
revno: 67
committer: Stew Benedict <stewb at linux-foundation.org>
branch nick: distribution-checker
timestamp: Sun 2012-05-06 10:38:00 -0400
message:
  Enable regenerating a test run report using updated problem_db2 (bug 3484)
modified:
  package/Makefile
  utils/Report.pm
  webui/public_html/tests_results.pl
-------------- next part --------------
=== modified file 'package/Makefile'
--- a/package/Makefile	2012-04-25 13:59:54 +0000
+++ b/package/Makefile	2012-05-06 14:38:00 +0000
@@ -1,7 +1,7 @@
 BRANCH?=lsb
 PACKAGE=$(BRANCH)-dist-checker
 # export PACKAGE=moblin-dist-checker to make Moblin Distribution Checker package.
-VERSION_LSB=4.1.0.9
+VERSION_LSB=4.1.0.10
 VERSION_MOBLIN=2.0.1.9
 ifeq "$(BRANCH)" "moblin"
 	VERSION=$(VERSION_MOBLIN)

=== modified file 'utils/Report.pm'
--- a/utils/Report.pm	2012-03-01 15:57:49 +0000
+++ b/utils/Report.pm	2012-05-06 14:38:00 +0000
@@ -2412,6 +2412,9 @@
 	
 	# Write the report to file
 	my $report_file = $result_dir."/report.htm";
+	if (-f $report_file) {
+		rename $report_file, $report_file . ".bak";
+	}
 	is_ok write_string_as_file( $report_file, $res)
 		or complain "Failed to write the report to '$report_file'", $Error::Last;
 	

=== modified file 'webui/public_html/tests_results.pl'
--- a/webui/public_html/tests_results.pl	2012-03-22 15:32:05 +0000
+++ b/webui/public_html/tests_results.pl	2012-05-06 14:38:00 +0000
@@ -106,6 +106,13 @@
 	exit;
 }
 
+if ($_GET{'regenerate'}) {
+	system($CONFIG{'TESTS_DIR'}.'/dist-checker.pl --update >/dev/null');
+	system($CONFIG{'TESTS_DIR'}.'/dist-checker.pl --keep --report '.$CONFIG{'RESULTS_DIR'}.'/'.$_GET{'regenerate'}.' >/dev/null');
+	print 'HTTP/1.0 302 Moved' . CRLF . 'Location: tests_results.pl?details='.$_GET{'regenerate'}.'&summary=1' . CRLF . CRLF;
+	exit;
+}
+
 sub print_integration_stuff($$) {
 	my ($file_location, $certification) = @_;
 
@@ -227,6 +234,7 @@
   <tr>
     $line_auto
     <td valign="middle" rowspan="2"><a href="tests_results.pl?details=$_GET{'details'}">View detailed report</a></td>
+    <td valign="middle" rowspan="2"><a href="tests_results.pl?regenerate=$_GET{'details'}">Regenerate report<br>(use updated problem_db2)</a></td>
   </tr>
   <tr>
     $line_man



More information about the lsb-messages mailing list