diff options
author | Ting-Yuan Huang <laszio@chromium.org> | 2018-03-07 17:35:13 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-03-09 18:59:57 -0800 |
commit | 6a9a98a22ff6e21fb005570f3fc8812fe7010610 (patch) | |
tree | 682e260dbecb8711a4dd42fcf9cf69f7cf7c4049 /buildbot_test_toolchains.py | |
parent | d0f7a73ac4f5dba64052876fbf6b48df2bc495db (diff) | |
download | toolchain-utils-6a9a98a22ff6e21fb005570f3fc8812fe7010610.tar.gz |
cros_utils/buildbot_utils: leverage `cros buildresult`
Originally it sends a http request to some magic URL and parse the
contents. Now there is a `cros buildresult` available for use.
BUG=chromium:807029
TEST=cros_utils/buildbot_utils_unittest.py
buildbot_test_toolchains.py
Change-Id: I33441859afd675c1a6b70d3d1f4e2348d54cbd77
Reviewed-on: https://chromium-review.googlesource.com/954052
Commit-Ready: Ting-Yuan Huang <laszio@chromium.org>
Tested-by: Ting-Yuan Huang <laszio@chromium.org>
Reviewed-by: Caroline Tice <cmtice@chromium.org>
Diffstat (limited to 'buildbot_test_toolchains.py')
-rwxr-xr-x | buildbot_test_toolchains.py | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/buildbot_test_toolchains.py b/buildbot_test_toolchains.py index d8f93091..33490724 100755 --- a/buildbot_test_toolchains.py +++ b/buildbot_test_toolchains.py @@ -252,7 +252,7 @@ class ToolchainComparator(object): (filename, MAIL_PROGRAM, email_title, self._board)) self._ce.RunCommand(command) - def DoAll(self, crostc_dir): + def DoAll(self): """Main function inside ToolchainComparator class. Launch trybot, get image names, create crosperf experiment file, run @@ -261,27 +261,17 @@ class ToolchainComparator(object): date_str = datetime.date.today() description = 'master_%s_%s_%s' % (self._patches_string, self._build, date_str) - if crostc_dir: - build_id, trybot_image = buildbot_utils.GetTrybotImage( - self._chromeos_root, - self._build, - self._patches, - description, - tryjob_flags=['--notests'], - credentials_dir=crostc_dir, - build_toolchain=True) - else: - build_id, trybot_image = buildbot_utils.GetTrybotImage( - self._chromeos_root, - self._build, - self._patches, - description, - tryjob_flags=['--notests'], - build_toolchain=True) + buildbucket_id, trybot_image = buildbot_utils.GetTrybotImage( + self._chromeos_root, + self._build, + self._patches, + description, + tryjob_flags=['--notests'], + build_toolchain=True) print('trybot_url: \ - https://uberchromegw.corp.google.com/i/chromiumos.tryserver/builders/release/builds/%s' - % build_id) + http://cros-goldeneye/chromeos/healthmonitoring/buildDetails?buildbucketId=%s' + % buildbucket_id) if len(trybot_image) == 0: self._l.LogError('Unable to find trybot_image for %s!' % description) return 2 @@ -332,12 +322,6 @@ def Main(argv): action='store_true', default=False, help='Pass --noschedv2 to crosperf.') - parser.add_argument( - '--crostc_dir', - dest='crostc_dir', - help='Path to the directory containing the ' - 'chromeos-toolchain-credentials.json file; normally in the ' - 'crostc repo.') options = parser.parse_args(argv[1:]) if not options.board: @@ -352,7 +336,7 @@ def Main(argv): fc = ToolchainComparator(options.board, options.remote, options.chromeos_root, options.weekday, options.patches, options.noschedv2) - return fc.DoAll(options.crostc_dir) + return fc.DoAll() if __name__ == '__main__': |