|
1 ########################################################################################## |
|
2 # |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 @ARGV; |
|
8 $milestone = $ARGV[0]; |
|
9 print ($milestone); |
|
10 |
|
11 $bldRoot = $ARGV[1]; |
|
12 print(" BuildRoot: $bldRoot\n"); |
|
13 $cnt = 0; |
|
14 |
|
15 # Backup the history file |
|
16 system( ("copy", "history.txt", "history.bak" ) ); |
|
17 |
|
18 # Delete the average.txt file so we don;t get old values in the averages |
|
19 if (-e "average.txt") |
|
20 { |
|
21 system( ("del", "average.txt") ); |
|
22 } |
|
23 |
|
24 # Run the Header script |
|
25 system( ("perl", "header.pl", "$bldRoot", "$milestone", "$ARGV[2]" ) ); |
|
26 |
|
27 # |
|
28 # now run the average2 script for each file in the logs directory |
|
29 # |
|
30 while( <Logs\\*.txt> ){ |
|
31 $line = $_; |
|
32 $cnt++; |
|
33 if ($line =~ /-log.txt/ ){ |
|
34 print( "File $cnt: $line\t" ); |
|
35 @nameParts = split( /-/, $line ); |
|
36 @nameNoDir = split( /\\/, $nameParts[0] ); |
|
37 print( "Name: $nameNoDir[1]\n" ); |
|
38 if ($nameNoDir[1] eq "") { |
|
39 print ("Skipping $line\n"); |
|
40 } else { |
|
41 system( ("perl", "Averagetable2.pl", "$nameNoDir[1]", "$line", "$cnt", "$bldRoot", "$nameNoDir[1]", "$ARGV[2]" ) ); |
|
42 } |
|
43 } else { |
|
44 print ("Skipping file $line\n"); |
|
45 } |
|
46 } |
|
47 |
|
48 # Run the Footer script |
|
49 system( ("perl", "footer.pl", "$bldRoot", "$milestone" ) ); |
|
50 |
|
51 print("Processed $cnt logs\n"); |