You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sm...@apache.org on 2008/01/29 11:50:34 UTC

svn commit: r616247 - in /harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table: snapshots.pl testsuites_table.tpl

Author: smishura
Date: Tue Jan 29 02:50:33 2008
New Revision: 616247

URL: http://svn.apache.org/viewvc?rev=616247&view=rev
Log:
Add API completeness report

Modified:
    harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/snapshots.pl
    harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/testsuites_table.tpl

Modified: harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/snapshots.pl
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/snapshots.pl?rev=616247&r1=616246&r2=616247&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/snapshots.pl (original)
+++ harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/snapshots.pl Tue Jan 29 02:50:33 2008
@@ -92,6 +92,9 @@
 #testsuites summary file
 $test_results_output_file = "index.html";
 
+# API completeness report location
+$api_report_path="Linux_x86/japi/index.html";
+
 #################### Subroutines ####################
 
 sub get_result {
@@ -270,6 +273,27 @@
 }
 
 
+sub get_api_report {
+
+    # TODO: search reports on all platforms
+    my $rev = $_[0];
+
+    my $i = 0;
+    my @test_results_links_list = keys(%test_results_links);
+    while (defined($test_results_links_list[$i])) {
+        $snapshot_api_report="$test_results_links_list[$i]/$api_report_path";
+        $snapshot_api_report=~ s/\{SNAPSHOT\}/$rev/g;
+        $request = HTTP::Request->new(GET => "$snapshot_api_report");
+        $response = $ua->request($request);
+        if ($response->is_success) {
+            $api_report = $snapshot_api_report;
+            $data_updated = 1;
+            return;
+        }
+        $i++;
+    }
+}
+
 #################### Main script ####################
 
 # Undef variable to put file one variable.
@@ -344,6 +368,7 @@
 
     $cur_timestamp = time;
 
+    undef $api_report;
     if ($snapshot_cache_data) {
         if (defined($verbose)) {
             print "Cache file loaded: $snapshot_cache_file\n";
@@ -356,6 +381,10 @@
         if (($snapshot_cache_data =~ /SNAPSHOT_DATE\:\s*(.*?)\;/g) && $1) {
             $snapshots{$snapshot} = $1;
         }
+        #Find API completeness report
+        if (($snapshot_cache_data =~ /API_REPORT\:\s*(.*?)\;/g) && $1) {
+            $api_report = $1;
+        }
         #Parse cachefile data if cache is older than $cache_lag
         if ($cache_timestamp && (($cur_timestamp - $cache_timestamp) > $cache_lag)) {
             while ($snapshot_cache_data =~ /PLATFORM:(.*?);TESTSUITE:(.*?);STATUS:(.*?);TEXT:(.*?);/gsmi) {
@@ -395,6 +424,9 @@
         $snapshots_row =~ s/\{$platform\_PASSED\}/$passed/g;
         $snapshots_row =~ s/\{$platform\_FAILED\}/$failed/g;
     }
+    if (!defined($api_report)) {
+        get_api_report($snapshot);
+    }
 
     #We needd to update snapshot testing results table and cache file only if 
     #some new data was downloaded or if table or cachefile were removed
@@ -431,6 +463,12 @@
             if (!defined ($hide_no_results) || $row_has_results) {
                 $testsuites_table =~ s/\{TABLE_ROW\}/$testsuites_row\n\{TABLE_ROW\}/g;
             }
+        }
+        if (defined($api_report)) {
+            $testsuites_table =~ s/\{API_REPORT\}/<i><small><a href=\"$api_report\">API completeness report<a> (without endorsed packages)<small><i>/g;
+            $snapshot_cache_data .= "API_REPORT:$api_report;\n";
+        } else {
+            $testsuites_table =~ s/\{API_REPORT\}//g;
         }
         $testsuites_table =~ s/\{TABLE_ROW\}//g;
         $time = gmtime;

Modified: harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/testsuites_table.tpl
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/testsuites_table.tpl?rev=616247&r1=616246&r2=616247&view=diff
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/testsuites_table.tpl (original)
+++ harmony/enhanced/buildtest/branches/2.0/tools/snapshot/snapshots-table/testsuites_table.tpl Tue Jan 29 02:50:33 2008
@@ -10,6 +10,7 @@
     <span style="font-weight: bold;">
       Harmony snapshot r{SNAPSHOT_NUM} status page
     </span><br>
+    {API_REPORT}
   </big>
 
 <table style="text-align: left; width: 1008px;" border="1" cellpadding="2" cellspacing="2">