|
1 # Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 # All rights reserved. |
|
3 # This component and the accompanying materials are made available |
|
4 # under the terms of "Eclipse Public License v1.0" |
|
5 # which accompanies this distribution, and is available |
|
6 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 # |
|
8 # Initial Contributors: |
|
9 # Nokia Corporation - initial contribution. |
|
10 # |
|
11 # Contributors: |
|
12 # |
|
13 # Description: |
|
14 # Script to get version of various tools |
|
15 # |
|
16 # |
|
17 |
|
18 use strict; |
|
19 use FindBin; |
|
20 use lib "$FindBin::Bin"; |
|
21 use GenResult; |
|
22 use Getopt::Long; |
|
23 |
|
24 # Process the commandline |
|
25 my ($iDir, $iSnapshot, $iProduct, $iLinkPath, $iStage, $iBrag, $imail) = ProcessCommandLine(); |
|
26 |
|
27 &GenResult::main($iDir, $iSnapshot, $iProduct, $iLinkPath, $iStage, $iBrag, $imail); |
|
28 |
|
29 # ProcessCommandLine |
|
30 # Description |
|
31 # This function processes the commandline |
|
32 |
|
33 sub ProcessCommandLine { |
|
34 my ($iHelp); |
|
35 |
|
36 GetOptions('h' => \$iHelp, 'd=s' => \$iDir, 's=s' => \$iSnapshot, 'p=s' => \$iProduct, 'l=s' => \$iLinkPath, 't=s' => \$iStage, 'b=s' => \$iBrag, 'm' => \$imail); |
|
37 |
|
38 if (($iHelp) || (!defined $iDir) || (!defined $iSnapshot) || (!defined $iProduct) || (!defined $iStage)) { |
|
39 Usage(); |
|
40 } |
|
41 return ($iDir, $iSnapshot, $iProduct, $iLinkPath, $iStage, $iBrag, $imail); |
|
42 } |
|
43 |
|
44 # Usage |
|
45 # |
|
46 # Output Usage Information. |
|
47 |
|
48 sub Usage { |
|
49 print <<USAGE_EOF; |
|
50 |
|
51 Usage: GenResult.pl [switches] |
|
52 |
|
53 [Switches] |
|
54 -d directory (e.g. \\builds01\\devbuilds\\master\\03445_Symbian_OS_v9.1\\logs) |
|
55 -s snapshot number (e.g. 03445) |
|
56 -p product (e.g. 9.1) |
|
57 -t Stage (e.g. GT|TV|ROM|CBR|CDB|BUILD|ALL) |
|
58 |
|
59 [Optional] |
|
60 -h help |
|
61 -l link path (\\builds01\\devbuilds\\master\\logs\\03445_Symbian_OS_v9.1) |
|
62 -b Brag status (FINAL|TBA[default]) |
|
63 -m Sends CDB break notification mail to cdb support |
|
64 |
|
65 It is possible to generate the logs based upon a local copy, but also link them to |
|
66 a different (remote) location. This will be useful when copying the report into another |
|
67 application such as Lotus Notes. |
|
68 |
|
69 USAGE_EOF |
|
70 exit 1; |
|
71 } |