Browse code

modify build script log

Change-Id: I20402235f5adbc8dc425bc822001e1505a5ca1f8
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2709
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>

Bo Gan authored on 2017/05/19 06:32:44
Showing 2 changed files
... ...
@@ -192,6 +192,7 @@ class PackageUtils(object):
192 192
         listSRPMFiles=[]
193 193
         try:
194 194
             listRPMFiles,listSRPMFiles = self.buildRPM(chrootSpecPath +specName,chrootLogsFilePath,chrootCmd,package,macros)
195
+            self.logger.info("Successfully built rpm:"+package)
195 196
         except Exception as e:
196 197
             self.logger.error("Failed while building rpm:"+package)
197 198
             raise e
... ...
@@ -29,18 +29,12 @@ class WorkerThread(threading.Thread):
29 29
             t = threading.Thread(target=pkgBuilder.buildPackageThreadAPI,args=(pkg,outputMap,pkg))
30 30
             t.start()
31 31
             t.join()
32
-            if outputMap.has_key(pkg):
33
-                if outputMap[pkg] == False:
34
-                    buildThreadFailed = True
35
-                    Scheduler.Scheduler.notifyPackageBuildFailed(pkg)
36
-                    self.logger.info("Thread "+self.name +" stopped building the "+pkg +" package")
37
-                    break
38
-            else:
32
+            if not outputMap.has_key(pkg) or outputMap[pkg] == False:
39 33
                 buildThreadFailed = True
40 34
                 Scheduler.Scheduler.notifyPackageBuildFailed(pkg)
41
-                self.logger.info("Thread "+self.name +" stopped building the "+pkg +" package")
35
+                self.logger.info("Thread "+self.name +" stopped building package:" + pkg)
42 36
                 break
43
-            
37
+            self.logger.info("Thread "+self.name+" finished building package:" + pkg)
44 38
             Scheduler.Scheduler.notifyPackageBuildCompleted(pkg)
45 39
         
46 40
         if buildThreadFailed:
... ...
@@ -48,9 +42,3 @@ class WorkerThread(threading.Thread):
48 48
         
49 49
         ThreadPool.ThreadPool.makeWorkerThreadInActive(self.name)
50 50
         self.logger.info("Thread "+self.name +" is going to rest")
51
-        
52
-
53
-
54
-                    
55
-                
56
-