michael@0: ########################################################################################## michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: @ARGV; michael@0: $milestone = $ARGV[0]; michael@0: print ($milestone); michael@0: michael@0: $bldRoot = $ARGV[1]; michael@0: print(" BuildRoot: $bldRoot\n"); michael@0: $cnt = 0; michael@0: michael@0: # Backup the history file michael@0: system( ("copy", "history.txt", "history.bak" ) ); michael@0: michael@0: # Delete the average.txt file so we don;t get old values in the averages michael@0: if (-e "average.txt") michael@0: { michael@0: system( ("del", "average.txt") ); michael@0: } michael@0: michael@0: # Run the Header script michael@0: system( ("perl", "header.pl", "$bldRoot", "$milestone", "$ARGV[2]" ) ); michael@0: michael@0: # michael@0: # now run the average2 script for each file in the logs directory michael@0: # michael@0: while( ){ michael@0: $line = $_; michael@0: $cnt++; michael@0: if ($line =~ /-log.txt/ ){ michael@0: print( "File $cnt: $line\t" ); michael@0: @nameParts = split( /-/, $line ); michael@0: @nameNoDir = split( /\\/, $nameParts[0] ); michael@0: print( "Name: $nameNoDir[1]\n" ); michael@0: if ($nameNoDir[1] eq "") { michael@0: print ("Skipping $line\n"); michael@0: } else { michael@0: system( ("perl", "Averagetable2.pl", "$nameNoDir[1]", "$line", "$cnt", "$bldRoot", "$nameNoDir[1]", "$ARGV[2]" ) ); michael@0: } michael@0: } else { michael@0: print ("Skipping file $line\n"); michael@0: } michael@0: } michael@0: michael@0: # Run the Footer script michael@0: system( ("perl", "footer.pl", "$bldRoot", "$milestone" ) ); michael@0: michael@0: print("Processed $cnt logs\n");