tools/grab_gcc_errors.pl
changeset 1 fd0863fd52e5
equal deleted inserted replaced
0:fe474e3b08fb 1:fd0863fd52e5
       
     1 #! perl
       
     2 
       
     3 # Copyright (c) 2010 Symbian Foundation Ltd
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of the License "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Symbian Foundation Ltd - initial contribution.
       
    11 # 
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 # Grab the GCC package build logs from the Symbian build publishing machine
       
    16 # NB. This doesn't do the HTTP access, so it only works inside the Symbian network
       
    17 
       
    18 use strict;
       
    19 use Getopt::Long;
       
    20 
       
    21 my @failures_files = ();
       
    22 my $line;
       
    23 
       
    24 while ($line =<>)
       
    25 	{
       
    26 	# <tr><td>adaptation/beagleboard</td><td><span style='background-color:red'>R</span> <a href='http://developer.symbian.org/main/source/packages/package/build_details.php?id=4576'>beagleboard_CompilerCompatibility.007</a><br/><span style='font-size:small'>(gcce4_4_1)</span><br/><span style='font-size:small'>2010-03-16 20:15:26</span></td><td><span style='background-color:red'>R</span> <a href='http://developer.symbian.org/main/source/packages/package/build_details.php?id=4197'>beagleboard_CompilerCompatibility.003</a><br/><span style='font-size:small'>(gcce4_4_1)</span><br/><span style='font-size:small'>2010-03-11 18:11:05</span></td><td>-</td><td>-</td><td>-</td><td>-</td></tr>
       
    27 
       
    28 	if ($line =~/^<tr><td>([^<]+)<\/td><td>.*?>([^<]+)<\/a>/)
       
    29 		{
       
    30 		my $layer_package = $1;
       
    31 		my $buildname = $2;
       
    32 		
       
    33 		my ($layer,$package) = split /\//, $layer_package;
       
    34 		
       
    35 		my $location = sprintf "SF_builds/%s/builds/CompilerCompatibility/%s/html/%s_%s_failures.html", $package, $buildname, $layer, $package;
       
    36 		
       
    37 		my $url = "http://cdn.symbian.org/" . $location;
       
    38 		my $unc = "//v800020/" . $location;
       
    39 		
       
    40 		print "$layer_package, $buildname, $location\n";
       
    41 		if (-f $unc)
       
    42 			{
       
    43 			open FILE, "<$unc" or die("Cannot open $unc: $!\n");
       
    44 			my @html = <FILE>;
       
    45 			close FILE;
       
    46 			print @html;
       
    47 			}
       
    48 		}
       
    49 	}