[Title] display distribuion when query
authorjiil.hyoun <jiil.hyoun@samsung.com>
Thu, 29 Nov 2012 09:13:07 +0000 (18:13 +0900)
committerjiil.hyoun <jiil.hyoun@samsung.com>
Thu, 29 Nov 2012 09:13:07 +0000 (18:13 +0900)
[Type] Enhancement
[Module] Toolchain /
[Priority] Major
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

Change-Id: I67564febfa8ceb0cff85f336cbf1fe516e8d34f0

build-cli
src/build_server/MultiBuildJob.rb
src/build_server/SocketJobRequestListener.rb
src/common/log.rb

index cfb2da93ba9cb649657ba3eb50092e9b75526287..016ea7a749a6960473d45f2932008de5f2be47f8 100755 (executable)
--- a/build-cli
+++ b/build-cli
@@ -120,7 +120,7 @@ def query_project_list(ip, port)
        data.each do |item|
                tok = item.split(",").map { |x| x.strip }
                type = (tok[0]=="G" ? "NORMAL":"REMOTE")
-               printf("%-25s %s\n",tok[1],type)
+               printf("%-25s %s %s\n",tok[1],type,tok[2])
        end
 end
 
@@ -130,10 +130,10 @@ def query_job_list(ip, port)
        data = query(ip, port, "JOB")
        data.each do |item|
                tok = item.split(",").map { |x| x.strip }
-               if tok[3].nil? then
-                       puts "#{tok[1]} #{tok[0]} #{tok[2]}"
+               if tok[4].nil? then
+                       puts "#{tok[1]} #{tok[0]} #{tok[2]} #{tok[3]}"
                else
-                       puts "#{tok[1]} #{tok[0]} #{tok[2]} (#{tok[3]})"
+                       puts "#{tok[1]} #{tok[0]} #{tok[2]} (#{tok[3]}) #{tok[4]}"
                end
        end
 end
index c28904b0da16c59aca9c576b0f8385d1c8c40ad0..9a1326585d7bd89c998c469f80e81ab9852b15ed 100644 (file)
@@ -69,7 +69,7 @@ class MultiBuildJob < CommonJob
 
 
        def get_distribution_name()
-               first_project = @sub_jobs[0].get_project().dist_name
+               return @sub_jobs[0].get_project().dist_name
        end
 
 
index 763dea01db2c4d1ea2b8f77cd24ece2eea0bf0f4..df176ba123364e9cea2865b6ca79323ea1bca7dc 100644 (file)
@@ -451,18 +451,18 @@ class SocketJobRequestListener
                                                else
                                                        ids = job.pending_ancestor.id
                                                end
-                                               BuildCommServer.send(req,"#{status}:#{ids},#{job.id},#{job.get_project().name},#{job.os} #{job.progress}")
+                                               BuildCommServer.send(req,"#{status}:#{ids},#{job.id},#{job.get_project().name},#{job.os} #{job.progress},#{job.get_distribution_name}")
                                        else
-                                               BuildCommServer.send(req,"#{status},#{job.id},#{job.get_project().name},#{job.os} #{job.progress}")
+                                               BuildCommServer.send(req,"#{status},#{job.id},#{job.get_project().name},#{job.os} #{job.progress},#{job.get_distribution_name}")
                                        end
                                when "REGISTER"
                                        if job.pkg_type == "BINARY" and not job.get_project().nil? then
-                                               BuildCommServer.send(req,"#{status},#{job.id},#{job.get_project().name},#{job.os} #{job.progress}")
+                                               BuildCommServer.send(req,"#{status},#{job.id},#{job.get_project().name},#{job.os} #{job.progress},#{job.get_distribution_name}")
                                        else
-                                               BuildCommServer.send(req,"#{status},#{job.id},#{job.pkg_name}")
+                                               BuildCommServer.send(req,"#{status},#{job.id},#{job.pkg_name},#{job.get_distribution_name}")
                                        end
                                when "MULTIBUILD"
-                                       BuildCommServer.send(req,"#{status},#{job.id},MULTI-BUILD : #{job.get_sub_jobs().map{|x| x.id}.join(" ")}")
+                                       BuildCommServer.send(req,"#{status},#{job.id},MULTI-BUILD : #{job.get_sub_jobs().map{|x| x.id}.join(" ")},#{job.get_distribution_name}")
                                end
                        end
 
@@ -483,17 +483,17 @@ class SocketJobRequestListener
                        sorted_list = @parent_server.prjmgr.projects.sort { |x,y| x.name <=> y.name }
                        sorted_list.each do |prj|
                                if prj.type != "GIT" then next end
-                               BuildCommServer.send(req,"G,#{prj.name},#{prj.repository},#{prj.branch}")
+                               BuildCommServer.send(req,"G,#{prj.name},#{prj.dist_name},#{prj.repository},#{prj.branch}")
                        end
                        # print BINARY projects
                        sorted_list.each do |prj|
                                if prj.type != "BINARY" then next end
-                               BuildCommServer.send(req,"B,#{prj.name},#{prj.pkg_name}")
+                               BuildCommServer.send(req,"B,#{prj.name},#{prj.dist_name},#{prj.pkg_name}")
                        end
                        # print REMOTE project
                        sorted_list.each do |prj|
                                if prj.type != "REMOTE" then next end
-                               BuildCommServer.send(req,"R,#{prj.name}")
+                               BuildCommServer.send(req,"R,#{prj.name},#{prj.dist_name}")
                        end
                        BuildCommServer.send_end(req)
                        BuildCommServer.disconnect(req)
index 17ce07d2f30d13b08a4c086b2034c1f3dc8601cf..36725750d7f7cd9a2e1a2cbaaefcfffa6d902829 100644 (file)
@@ -116,10 +116,13 @@ class DummyLog
                @cnt = 0
        end
        def info(str, lv=nil)
+               puts "I, [#{Time.now.strftime("%Y-%m-%dT%H:%M:%S")}] INFO -- : " + str
        end
        def error(str, lv=nil)
+               puts "E, [#{Time.now.strftime("%Y-%m-%dT%H:%M:%S")}] ERROR -- : " + str
        end
        def warn(str, lv=nil)
+               puts "W, [#{Time.now.strftime("%Y-%m-%dT%H:%M:%S")}] WARN -- : " + str
        end
 end