diff options
author | Luis Lozano <llozano@chromium.org> | 2016-01-08 11:56:02 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-01-09 02:41:36 +0000 |
commit | 439f2b77c86987362f53bd4f6e39896aa6d77f66 (patch) | |
tree | 291463e63ac091ab8aaf02ec6376278f1b24bcf4 /buildbot_test_toolchains.py | |
parent | 56f13765cdc7bb3f380ccbbc02b9af95af2e0592 (diff) | |
download | toolchain-utils-439f2b77c86987362f53bd4f6e39896aa6d77f66.tar.gz |
Check that non AFDO images exist before trying to use them.
Check the non-AFDO images exist before we try to get performance
numbers for them.
BUG=None
TEST=white box testing.
Change-Id: I182c9da1dd29c377b98e3012ba7b5e186cdf2e4f
Reviewed-on: https://chrome-internal-review.googlesource.com/243956
Commit-Ready: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@google.com>
Diffstat (limited to 'buildbot_test_toolchains.py')
-rwxr-xr-x | buildbot_test_toolchains.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/buildbot_test_toolchains.py b/buildbot_test_toolchains.py index ea6099b6..e02f6b3f 100755 --- a/buildbot_test_toolchains.py +++ b/buildbot_test_toolchains.py @@ -161,14 +161,15 @@ class ToolchainComparator(object): f.write(official_image) # Now add non-AFDO image to test file. - official_nonafdo_image = """ + if nonafdo_image: + official_nonafdo_image = """ nonafdo_image { chromeos_root: %s build: %s compiler: gcc } """ % (self._chromeos_root, nonafdo_image) - f.write(official_nonafdo_image) + f.write(official_nonafdo_image) label_string = '%s_trybot_image' % compiler_string if USE_NEXT_GCC_PATCH in self._patches: @@ -233,14 +234,10 @@ class ToolchainComparator(object): self._ce.RunCommand(cmd) # Now create new tar files and copy them over. - labels = ['test', 'vanilla', 'nonafdo'] - for label_name in labels: - if label_name == 'test': - test_path = trybot_image - elif label_name == 'vanilla': - test_path = vanilla_image - else: - test_path = nonafdo_image + labels = {'test': trybot_image, 'vanilla': vanilla_image} + if nonafdo_image: + labels['nonafdo'] = nonafdo_image + for label_name, test_path in labels.iteritems(): tar_file_name = '%s_%s_image.tar' % (self._weekday, label_name) cmd = ('cd %s; tar -cvf %s %s/chromiumos_test_image.bin; ' 'cp %s %s/.') % (images_path, tar_file_name, test_path, @@ -287,6 +284,8 @@ class ToolchainComparator(object): vanilla_image = self._ParseVanillaImage(trybot_image) nonafdo_image = self._ParseNonAFDOImage(trybot_image) + if not buildbot_utils.DoesImageExist(self._chromeos_root, nonafdo_image): + nonafdo_image = '' # The trybot image is ready here, in some cases, the vanilla image # is not ready, so we need to make sure vanilla image is available. |