diff options
-rw-r--r-- | buildbot_test_toolchains.py | 6 | ||||
-rw-r--r-- | utils/buildbot_utils.py | 25 |
2 files changed, 23 insertions, 8 deletions
diff --git a/buildbot_test_toolchains.py b/buildbot_test_toolchains.py index bc2c0566..c83f9d83 100644 --- a/buildbot_test_toolchains.py +++ b/buildbot_test_toolchains.py @@ -198,6 +198,12 @@ class ToolchainComparator(): print ("trybot_image: %s" % trybot_image) print ("vanilla_image: %s" % vanilla_image) + if len(trybot_image) == 0: + self._l.LogError("Unable to find trybot_image for %s!" % description) + return 1 + if len(vanilla_image) == 0: + self._l.LogError("Unable to find vanilla image for %s!" % description) + return 1 if os.getlogin() == ROLE_ACCOUNT: self._FinishSetup() diff --git a/utils/buildbot_utils.py b/utils/buildbot_utils.py index e41490fd..6bd431be 100644 --- a/utils/buildbot_utils.py +++ b/utils/buildbot_utils.py @@ -160,6 +160,7 @@ def GetTrybotImage(chromeos_root, buildbot_name, patch_list, build_tag): os.chdir(base_dir) build_id = 0 + build_status = None # Wait for buildbot to finish running (check every 10 minutes) done = False running_time = 0 @@ -177,6 +178,7 @@ def GetTrybotImage(chromeos_root, buildbot_name, patch_list, build_tag): if "True" in data_dict["completed"]: build_id = data_dict["number"] + build_status = data_dict["result"] else: done = False @@ -189,11 +191,18 @@ def GetTrybotImage(chromeos_root, buildbot_name, patch_list, build_tag): if running_time > TIME_OUT: done = True - trybot_image = "" - # Buildbot has finished. Look for the log and the trybot image. - if build_id: - log_name = GetBuildData(build, build_id) - if log_name: - trybot_image = ParseReportLog(log_name, build) - - return trybot_image + if done and build_status != 0: + logger.GetLogger().LogError("Trybot job %s failed with status %s." + % (description, repr(build_status))) + return "" + else: + trybot_image = "" + # Buildbot has finished. Look for the log and the trybot image. + if build_id: + log_name = GetBuildData(build, build_id) + if log_name: + trybot_image = ParseReportLog(log_name, build) + + print "trybot_image is '%s'" % trybot_image + print "build_status is %s" % repr(build_status) + return trybot_image |