264 print $_; |
264 print $_; |
265 } |
265 } |
266 close(PIPE); |
266 close(PIPE); |
267 close(LOG); |
267 close(LOG); |
268 |
268 |
|
269 print "###### GENERATE BUILD SUMMARY ######\n"; |
|
270 my $sSummaryCmd = "hlm sf-summary -Dsf.project.type=package $sSubProjArg -Dsf.spec.job.number=$nJobNumber -Dsf.spec.job.drive=$sDriveLetter: $sTestBuildOpt $sNoPublishOpt $sJobRootDirArg"; |
|
271 print("$sSummaryCmd\n"); |
|
272 open(LOG, ">console_sfsummary_$$.txt"); |
|
273 open(PIPE, "$sSummaryCmd 2>&1 |"); |
|
274 while(<PIPE>) |
|
275 { |
|
276 print LOG $_; |
|
277 print $_; |
|
278 } |
|
279 close(PIPE); |
|
280 close(LOG); |
|
281 |
269 # copy console outputs to remote log archive |
282 # copy console outputs to remote log archive |
270 if (-d "$sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs") |
283 if (-d "$sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs") |
271 { |
284 { |
272 my $sTgtDir = "$sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs\\console"; |
285 my $sTgtDir = "$sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs\\console"; |
273 print "copying console output files to $sTgtDir\n"; |
286 print "copying console output files to $sTgtDir\n"; |
274 system("mkdir $sTgtDir"); |
287 system("mkdir $sTgtDir"); |
275 system("copy /Y $sBOOTSTRAP_DIR\\console_bootstrap_$$.txt $sTgtDir"); |
288 system("copy /Y $sBOOTSTRAP_DIR\\console_bootstrap_$$.txt $sTgtDir"); |
276 system("del $sBOOTSTRAP_DIR\\console_bootstrap_$$.txt"); |
289 system("del $sBOOTSTRAP_DIR\\console_bootstrap_$$.txt"); |
277 system("copy $sJobDir\\sf-config\\console_sfprep_$$.txt $sTgtDir"); |
290 system("copy $sJobDir\\sf-config\\console_sfprep_$$.txt $sTgtDir"); |
278 system("copy $sJobDir\\sf-config\\console_sfbuildall_$$.txt $sTgtDir"); |
291 system("copy $sJobDir\\sf-config\\console_sfbuildall_$$.txt $sTgtDir"); |
|
292 system("copy $sJobDir\\sf-config\\console_sfsummary_$$.txt $sTgtDir"); |
279 } |
293 } |
280 else |
294 else |
281 { |
295 { |
282 print "directory $sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs doesn't exist.\n"; |
296 print "directory $sREMOTE_LOG_ARCHIVE\\$sPackage\\builds\\$sPlatform\\$sPackage\_$sPlatform.$nJobNumber\\logs doesn't exist.\n"; |
283 } |
297 } |