deprecated/buildtools/buildsystemtools/scanlog/complog.pl
author jascui
Tue, 16 Nov 2010 15:56:27 +0800
changeset 683 8e0eb519ef53
parent 655 3f65fd25dfd4
permissions -rw-r--r--
Solve incorrect handling of ExportName=SymbolName@Ordinal syntax
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
655
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     1
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     2
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     3
# All rights reserved.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     4
# This component and the accompanying materials are made available
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     5
# under the terms of "Eclipse Public License v1.0"
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     6
# which accompanies this distribution, and is available
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     7
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     8
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
     9
# Initial Contributors:
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    10
# Nokia Corporation - initial contribution.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    11
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    12
# Contributors:
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    13
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    14
# Description: 
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    15
#
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    16
# summarise an automated build log
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    17
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    18
if (@ARGV < 1)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    19
	{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    20
#........1.........2.........3.........4.........5.........6.........7.....
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    21
	print <<USAGE_EOF;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    22
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    23
Usage:
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    24
  complog component [logfile]     -- extract component info from log
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    25
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    26
USAGE_EOF
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    27
	exit 1;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    28
	}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    29
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    30
my $component = shift @ARGV;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    31
my $echoing = 0;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    32
my $line;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    33
my $command;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    34
my $phase;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    35
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    36
while ($line=<>)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    37
	{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    38
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    39
	# ===-------------------------------------------------
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    40
	# === baseline_bldfiles   
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    41
	# ===-------------------------------------------------
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    42
	# === bldfiles started Sat Jul 24 01:38:03 1999.
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    43
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    44
	if ($line =~ /^===------/)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    45
		{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    46
		$line = <>;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    47
		$line =~ /=== (.*)$/;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    48
		$command = $1;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    49
		<>;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    50
		$line = <>;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    51
		$line =~ /^=== (\S+) started ... ... .. (..):(..):(..)/;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    52
		$phase = $1;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    53
		next;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    54
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    55
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    56
	# === resource == gdtran 036
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    57
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    58
	if ($line =~ / == ($component .*$)/)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    59
		{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    60
		$echoing = 1;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    61
		print "\n== $1 === $command\n";
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    62
		next;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    63
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    64
	if ($line =~ /^===/)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    65
		{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    66
		$echoing = 0;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    67
		next;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    68
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    69
	if ($echoing)
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    70
		{
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    71
		print $line;
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    72
		}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    73
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    74
	}
3f65fd25dfd4 sync up SVN codes
kelvzhu
parents:
diff changeset
    75