Remove dump of stdout/stderr to files as no longer required for brag computation
authorDario Sestito <darios@symbian.org>
Mon, 19 Oct 2009 14:27:35 +0100
changeset 50 e8b76d25d90c
parent 49 07eb981b2b45
child 51 5db037fb1000
Remove dump of stdout/stderr to files as no longer required for brag computation
build_package.pl
--- a/build_package.pl	Fri Oct 09 12:34:29 2009 +0100
+++ b/build_package.pl	Mon Oct 19 14:27:35 2009 +0100
@@ -22,7 +22,6 @@
 my $sJOB_BASE_DIR="fbf_project";
 my $nMAX_JOBDIR_AGE_SECONDS = 86400; # max number of seconds after which the letter is forcibly released
 my $nLOCK_FILE_MAX_ATTEMPTS = 5;
-my $sREMOTE_LOG_ARCHIVE="\\\\bishare\\SF_builds";
 my $sNUMBERS_FILE="\\\\bishare\\SF_builds\\numbers2.txt";
 my $sLETTERS_FILE="letters.txt";
 my $nMAX_LETTER_AGE_SECONDS = 86400; # max number of seconds after which the letter is forcibly released
@@ -179,15 +178,7 @@
 $sProjectArg = "-Dsf.project.dir=$sFbfProjectDir" if ($sFbfProjectDir);
 my $sBootstrapCmd = "hlm -f bootstrap.xml $sConfigArg $sProjectArg -Dsf.target.dir=$sJobDir";
 print("$sBootstrapCmd\n");
-open(LOG, ">console_bootstrap_$$.txt");
-open(PIPE, "$sBootstrapCmd 2>&1 |");
-while(<PIPE>)
-{
-	print LOG $_;
-	print $_;
-}
-close(PIPE);
-close(LOG);
+system($sBootstrapCmd);
 
 # check that $sNUMBERS_FILE exists, otherwise create it
 if (!-f $sNUMBERS_FILE)
@@ -250,61 +241,12 @@
 print "###### BUILD PREPARATION ######\n";
 my $sPreparationCmd = "hlm sf-prep -Dsf.project.type=package $sSubProjArg -Dsf.spec.job.number=$nJobNumber -Dsf.spec.job.drive=$sDriveLetter: $sTestBuildOpt $sNoPublishOpt $sJobRootDirArg $sHlmDefineOpt";
 print("$sPreparationCmd\n");
-open(LOG, ">console_sfprep_$$.txt");
-open(PIPE, "$sPreparationCmd 2>&1 |");
-while(<PIPE>)
-{
-	print LOG $_;
-	print $_;
-}
-close(PIPE);
-close(LOG);
+system($sPreparationCmd);
 
 print "###### EXECUTE BUILD ######\n";
 my $sBuildallCmd = "hlm sf-build-all -Dsf.project.type=package $sSubProjArg -Dsf.spec.job.number=$nJobNumber -Dsf.spec.job.drive=$sDriveLetter: $sTestBuildOpt $sNoPublishOpt $sJobRootDirArg $sHlmDefineOpt";
 print("$sBuildallCmd\n");
-open(LOG, ">console_sfbuildall_$$.txt");
-open(PIPE, "$sBuildallCmd 2>&1 |");
-while(<PIPE>)
-{
-	print LOG $_;
-	print $_;
-}
-close(PIPE);
-close(LOG);
-
-print "###### GENERATE BUILD SUMMARY ######\n";
-my $sSummaryCmd = "hlm sf-summary -Dsf.project.type=package $sSubProjArg -Dsf.spec.job.number=$nJobNumber -Dsf.spec.job.drive=$sDriveLetter: $sTestBuildOpt $sNoPublishOpt $sJobRootDirArg $sHlmDefineOpt";
-print("$sSummaryCmd\n");
-open(LOG, ">console_sfsummary_$$.txt");
-open(PIPE, "$sSummaryCmd 2>&1 |");
-while(<PIPE>)
-{
-	print LOG $_;
-	print $_;
-}
-close(PIPE);
-close(LOG);
-
-if ($bPublish)
-{
-	# copy console outputs to remote log archive
-	if (-d "$sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs")
-	{
-		my $sTgtDir = "$sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs\\console";
-		print "copying console output files to $sTgtDir\n";
-		system("mkdir $sTgtDir");
-		system("copy /Y $sBOOTSTRAP_DIR\\console_bootstrap_$$.txt $sTgtDir");
-		system("del $sBOOTSTRAP_DIR\\console_bootstrap_$$.txt");
-		system("copy $sJobDir\\sf-config\\console_sfprep_$$.txt $sTgtDir");
-		system("copy $sJobDir\\sf-config\\console_sfbuildall_$$.txt $sTgtDir");
-		system("copy $sJobDir\\sf-config\\console_sfsummary_$$.txt $sTgtDir");
-	}
-	else
-	{
-		print "directory $sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs doesn't exist.\n";
-	}
-}
+system($sBuildallCmd);
 
 print("cd $sBOOTSTRAP_DIR\n");
 chdir("$sBOOTSTRAP_DIR");