Add image status check code to avoid unnecessary testing process 55/125355/2
authorSungHun Hwang <sh0924.hwang@samsung.com>
Mon, 17 Apr 2017 05:25:18 +0000 (14:25 +0900)
committerSungHun Hwang <sh0924.hwang@samsung.com>
Mon, 17 Apr 2017 05:48:50 +0000 (14:48 +0900)
If any image fails then skip test trigger

Change-Id: I93c6077a40f45219ca74d7c5600959854501a490
Signed-off-by: SungHun Hwang <sh0924.hwang@samsung.com>
job_post_image.py

index 736e8b7..cd9a888 100755 (executable)
@@ -107,7 +107,18 @@ def main():
             if after_update_img_cnt == target_img_cnt:
                 print '[%s] reached the target_img_cnt(%s)!! trigger BUILD-MONITOR(Post_Image)\n' \
                       % (__file__, target_img_cnt)
-                trigger_next("TEST-TRIGGER-INFO-UPDATE", checkinfo)
+
+                # check whether the image status is failed or not
+                skip_test_trigger = False
+                for each_item in checkinfo["images"]:
+                    if each_item["status"] == "failed":
+                        skip_test_trigger = True
+                        print 'name:%s, status:%s' % (each_item["name"], each_item["status"])
+
+                if not skip_test_trigger:
+                    trigger_next("TEST-TRIGGER-INFO-UPDATE", checkinfo)
+                else:
+                    print 'skip_test_trigger!!\n'
 
                 if buildmonitor_enabled:
                     #buildmonitor.end_create_image_for_sr_stage(bm_start_datetime,