build_package.pl
changeset 72 50ab3bef1c6a
parent 71 f7ba24a607f8
child 73 457adde87bbd
equal deleted inserted replaced
71:f7ba24a607f8 72:50ab3bef1c6a
    75 	#print "\t--model=FILE ...\n";
    75 	#print "\t--model=FILE ...\n";
    76 	print "\t--configrepo=REPO[#REV] Use repository REPO at revision REV for the config (instead of http://developer.symbian.org/oss/FCL/interim/fbf/configs/default)\n";
    76 	print "\t--configrepo=REPO[#REV] Use repository REPO at revision REV for the config (instead of http://developer.symbian.org/oss/FCL/interim/fbf/configs/default)\n";
    77 	print "\t--configdir=DIR Use DIR location for the config (exclusive with --configrepo).\n";
    77 	print "\t--configdir=DIR Use DIR location for the config (exclusive with --configrepo).\n";
    78 	print "\t--number=N Force build number to N\n";
    78 	print "\t--number=N Force build number to N\n";
    79 	print "\t--tag=TAG Apply Diamonds tag TAG to this build\n";
    79 	print "\t--tag=TAG Apply Diamonds tag TAG to this build\n";
    80 	print "\t--hudson Checks that there is at least NUMBER_OF_PROCESSORS X 10 GB available on the working drive\n";
    80 	print "\t--hudson Clean up all job dirs after the build)\n";
    81 	print "\t--nopublish Use \\numbers_test.txt for numbers and disable publishing\n";
    81 	print "\t--nopublish Use \\numbers_test.txt for numbers and disable publishing\n";
    82 	print "\t--define ATTRIBUTE=VALUE Pass -D statements to the Helium Framework\n";
    82 	print "\t--define ATTRIBUTE=VALUE Pass -D statements to the Helium Framework\n";
    83 	print "\t--disableav Disable Anti-Virus for the duration of the build (also sync with other concurrent package builds)\n";
    83 	print "\t--disableav Disable Anti-Virus for the duration of the build (also sync with other concurrent package builds)\n";
    84 	exit(0);
    84 	exit(0);
    85 }
    85 }
   103 if (!-f "$sWORKING_DRIVE\\$sLETTERS_FILE")
   103 if (!-f "$sWORKING_DRIVE\\$sLETTERS_FILE")
   104 {
   104 {
   105 	open FILE, ">$sWORKING_DRIVE\\$sLETTERS_FILE";
   105 	open FILE, ">$sWORKING_DRIVE\\$sLETTERS_FILE";
   106 	print FILE "\n";
   106 	print FILE "\n";
   107 	close FILE;
   107 	close FILE;
   108 }
       
   109 
       
   110 if ($bHudson)
       
   111 {
       
   112 	my $nProcessors = $ENV{'NUMBER_OF_PROCESSORS'};
       
   113 	my $diroutput = `dir /-C $sWORKING_DRIVE`;
       
   114 	my $nBytesFree = 0;
       
   115 	$nBytesFree = $1 if ($diroutput =~ /(\d+) bytes free/);
       
   116 	my $nNeededSpace = 10*$nProcessors*1073741824;
       
   117 	#print "Needed space is $nNeededSpace\n";
       
   118 	if ($nBytesFree < $nNeededSpace)
       
   119 	{
       
   120 		print "ERROR: Available disk space on working drive ($nBytesFree bytes) is not enough to run a package build with Hudson.\n";
       
   121 		exit(1);
       
   122 	}
       
   123 }
   108 }
   124 
   109 
   125 my $sFbfProjectRev = '';
   110 my $sFbfProjectRev = '';
   126 if ($sFbfProjectRepo =~ m,(.*)#(.*),)
   111 if ($sFbfProjectRepo =~ m,(.*)#(.*),)
   127 {
   112 {