From: donghee yang Date: Wed, 20 Mar 2013 14:49:59 +0000 (+0900) Subject: [Title] Fixed the bug that the "FINISH" log for sub-job is not shown X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a91fcb4c2464b07eba7dc7142165be6cad1c18f1;p=sdk%2Ftools%2Fsdk-build.git [Title] Fixed the bug that the "FINISH" log for sub-job is not shown --- diff --git a/src/build_server/MultiBuildJob.rb b/src/build_server/MultiBuildJob.rb index 8bcf6a5..1246de4 100644 --- a/src/build_server/MultiBuildJob.rb +++ b/src/build_server/MultiBuildJob.rb @@ -364,30 +364,32 @@ class MultiBuildJob < CommonJob while not all_jobs_finished all_jobs_finished = true @sub_jobs.each do |job| + job_status = job.status # check status chanaged, if then print - if job_status_map[ job.id ] != job.status then - @log.info(" * Sub-Job \"#{job.get_project().name}(#{job.os})\" has entered \"#{job.status}\" state. (#{job.id})", Log::LV_USER) - job_status_map[ job.id ] = job.status + if job_status_map[ job.id ] != job_status then + @log.info(" * Sub-Job \"#{job.get_project().name}(#{job.os})\" has entered \"#{job_status}\" state. (#{job.id})", Log::LV_USER) + job_status_map[ job.id ] = job_status end # check all jobs are finished - if job.status != "ERROR" and job.status != "FINISHED" and job.status != "CANCELED" then + if job_status != "ERROR" and job_status != "FINISHED" and job_status != "CANCELED" then all_jobs_finished = false end # check there is some error or cancel if stop_status == "FINISHED" and - (job.status == "ERROR" or job.status == "CANCELED") then + (job_status == "ERROR" or job_status == "CANCELED") then # write url write_log_url(job) # cancel all other un-finished jobs @sub_jobs.each do |sub| - if sub.status != "ERROR" and sub.status != "FINISHED" and - sub.status != "CANCELED" and sub.event == "NONE" then + sub_status = sub.status + if sub_status != "ERROR" and sub_status != "FINISHED" and + sub_status != "CANCELED" and sub.event == "NONE" then @log.info(" * Sub-Job \"#{sub.get_project().name}(#{sub.os})\" has entered \"CANCELING\" state. (#{sub.id})", Log::LV_USER) sub.event = "CANCEL" end end - stop_status = job.status + stop_status = job_status break end end