655
|
1 |
#
|
|
2 |
# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
# All rights reserved.
|
|
4 |
# This component and the accompanying materials are made available
|
|
5 |
# under the terms of "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 |
# Nokia Corporation - initial contribution.
|
|
11 |
#
|
|
12 |
# Contributors:
|
|
13 |
#
|
|
14 |
# Description:
|
|
15 |
#
|
|
16 |
# summarise an automated build log
|
|
17 |
|
|
18 |
if (@ARGV < 1)
|
|
19 |
{
|
|
20 |
#........1.........2.........3.........4.........5.........6.........7.....
|
|
21 |
print <<USAGE_EOF;
|
|
22 |
|
|
23 |
Usage:
|
|
24 |
complog component [logfile] -- extract component info from log
|
|
25 |
|
|
26 |
USAGE_EOF
|
|
27 |
exit 1;
|
|
28 |
}
|
|
29 |
|
|
30 |
my $component = shift @ARGV;
|
|
31 |
my $echoing = 0;
|
|
32 |
my $line;
|
|
33 |
my $command;
|
|
34 |
my $phase;
|
|
35 |
|
|
36 |
while ($line=<>)
|
|
37 |
{
|
|
38 |
|
|
39 |
# ===-------------------------------------------------
|
|
40 |
# === baseline_bldfiles
|
|
41 |
# ===-------------------------------------------------
|
|
42 |
# === bldfiles started Sat Jul 24 01:38:03 1999.
|
|
43 |
|
|
44 |
if ($line =~ /^===------/)
|
|
45 |
{
|
|
46 |
$line = <>;
|
|
47 |
$line =~ /=== (.*)$/;
|
|
48 |
$command = $1;
|
|
49 |
<>;
|
|
50 |
$line = <>;
|
|
51 |
$line =~ /^=== (\S+) started ... ... .. (..):(..):(..)/;
|
|
52 |
$phase = $1;
|
|
53 |
next;
|
|
54 |
}
|
|
55 |
|
|
56 |
# === resource == gdtran 036
|
|
57 |
|
|
58 |
if ($line =~ / == ($component .*$)/)
|
|
59 |
{
|
|
60 |
$echoing = 1;
|
|
61 |
print "\n== $1 === $command\n";
|
|
62 |
next;
|
|
63 |
}
|
|
64 |
if ($line =~ /^===/)
|
|
65 |
{
|
|
66 |
$echoing = 0;
|
|
67 |
next;
|
|
68 |
}
|
|
69 |
if ($echoing)
|
|
70 |
{
|
|
71 |
print $line;
|
|
72 |
}
|
|
73 |
|
|
74 |
}
|
|
75 |
|