filter out -tryjob when finding vanilla image.
We cannot find vanilla image because the build name of trybot
image was falco-release-tryjob, it then tries to find vanilla
image of falco-release-tryjob, but it could not find it.
BUG=none.
TEST=vanilla image was found.
Change-Id: I9024ea27f480db70ae296012a5958d8e243f3c38
Reviewed-on: https://chromium-review.googlesource.com/786315
Commit-Ready: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
diff --git a/buildbot_test_toolchains.py b/buildbot_test_toolchains.py
index a274cc5..d8f9309 100755
--- a/buildbot_test_toolchains.py
+++ b/buildbot_test_toolchains.py
@@ -97,7 +97,9 @@
Returns:
Latest official image name, e.g. 'daisy-release/R57-9089.0.0'.
"""
- mo = re.search(TRYBOT_IMAGE_RE, trybot_image)
+ # We need to filter out -tryjob in the trybot_image.
+ trybot = re.sub('-tryjob', '', trybot_image)
+ mo = re.search(TRYBOT_IMAGE_RE, trybot)
assert mo
dirname = IMAGE_DIR.replace('\\', '').format(**mo.groupdict())
return buildbot_utils.GetLatestImage(self._chromeos_root, dirname)
@@ -121,7 +123,8 @@
Corresponding chrome PFQ image name, e.g.
'daisy-chrome-pfq/R40-6393.0.0-rc1'.
"""
- mo = re.search(TRYBOT_IMAGE_RE, trybot_image)
+ trybot = re.sub('-tryjob', '', trybot_image)
+ mo = re.search(TRYBOT_IMAGE_RE, trybot)
assert mo
image_dict = mo.groupdict()
image_dict['image_type'] = 'chrome-pfq'