[BuildMonitor] Add the check condition of the pkg build_status
authorSungHun Hwang <sh0924.hwang@samsung.com>
Thu, 9 Feb 2017 07:02:51 +0000 (16:02 +0900)
committerSoonKyu Park <sk7.park@samsung.com>
Thu, 23 Feb 2017 08:35:19 +0000 (17:35 +0900)
[job_buildmonitor.py]    - Add the check condition('broken' & 'unresolvable')
[common/buildservice.py] - Add the 'broken' when updating the obs description

Change-Id: Ic3844f13f548e826f9ae10b7b910ee3e0353491b
Signed-off-by: SungHun Hwang <sh0924.hwang@samsung.com>
common/buildservice.py
job_buildmonitor.py

index 1e64841..8492247 100755 (executable)
@@ -917,7 +917,7 @@ class BuildService(OSC):
         for result in et.findall('result'):
             for summary in result.findall('summary'):
                 for status in summary.findall('statuscount'):
-                    if status.get('code') in ("succeeded","unresolvable","failed"):
+                    if status.get('code') in ("succeeded","unresolvable","failed","broken"):
                         summarylist.append({'repo':result.get('repository'), \
                                             'arch':result.get('arch'), \
                                             'code':status.get('code'), \
index 26a3eaf..7b2d01a 100644 (file)
@@ -336,7 +336,11 @@ def num_failed_packages_except_aggregate(build_project_id):
         for arch in build_status[repo].keys():
             for pkg in build_status[repo][arch].keys():
                 if not re.match(".*_aggregate", pkg):
-                    if build_status[repo][arch][pkg] == 'failed':
+                    #print '[%s] repo(%s), arch(%s), pkg(%s), build_status(%s)\n' \
+                    #      % (__file__, repo, arch, pkg, build_status[repo][arch][pkg])
+                    if build_status[repo][arch][pkg] == 'failed' or \
+                       build_status[repo][arch][pkg] == 'broken' or \
+                       build_status[repo][arch][pkg] == 'unresolvable':
                         failed_packages_cnt += 1
 
     # return the number of failed packages except *_aggregate packages.