blob: 184a1eccbf137a324ef25cbe9d30a9a510b8db27 [file] [log] [blame]
Zhizhou Yang81d651f2020-02-10 16:51:20 -08001#!/usr/bin/env python3
Tiancong Wangd0348132019-03-07 11:22:48 -08002# -*- coding: utf-8 -*-
Ting-Yuan Huange5819872016-12-15 14:22:26 -08003#
4# Copyright 2016 The Chromium OS Authors. All rights reserved.
5# Use of this source code is governed by a BSD-style license that can be
6# found in the LICENSE file.
Denis Nikitin265c2962019-08-01 19:52:49 -07007
Yunlian Jiang14cf5962015-12-11 15:50:14 -08008"""Script for running nightly compiler tests on ChromeOS.
cmtice46093e52014-12-09 14:59:16 -08009
10This script launches a buildbot to build ChromeOS with the latest compiler on
11a particular board; then it finds and downloads the trybot image and the
12corresponding official image, and runs crosperf performance tests comparing
13the two. It then generates a report, emails it to the c-compiler-chrome, as
14well as copying the images into the seven-day reports directory.
15"""
16
17# Script to test different toolchains against ChromeOS benchmarks.
Yunlian Jiang14cf5962015-12-11 15:50:14 -080018
19from __future__ import print_function
20
Caroline Ticeeddb0632016-04-14 09:19:02 -070021import argparse
cmticece5ffa42015-02-12 15:18:43 -080022import datetime
cmtice46093e52014-12-09 14:59:16 -080023import os
Luis Lozanoc75fd052016-02-19 17:37:01 -080024import re
cmtice46093e52014-12-09 14:59:16 -080025import sys
26import time
cmtice46093e52014-12-09 14:59:16 -080027
Caroline Ticea8af9a72016-07-20 12:52:59 -070028from cros_utils import command_executer
29from cros_utils import logger
cmtice46093e52014-12-09 14:59:16 -080030
Caroline Ticea8af9a72016-07-20 12:52:59 -070031from cros_utils import buildbot_utils
cmtice46093e52014-12-09 14:59:16 -080032
Manoj Guptac4110352016-12-28 13:47:12 -080033# CL that uses LLVM-Next to build the images (includes chrome).
Manoj Gupta66682c72017-05-24 12:19:57 -070034USE_LLVM_NEXT_PATCH = '513590'
Manoj Guptac4110352016-12-28 13:47:12 -080035
Luis Lozanof2a3ef42015-12-15 13:49:30 -080036CROSTC_ROOT = '/usr/local/google/crostc'
Luis Lozanobe756e02020-02-07 10:54:08 -080037NIGHTLY_TESTS_DIR = os.path.join(CROSTC_ROOT, 'nightly-tests')
Luis Lozanof2a3ef42015-12-15 13:49:30 -080038ROLE_ACCOUNT = 'mobiletc-prebuild'
cmtice46093e52014-12-09 14:59:16 -080039TOOLCHAIN_DIR = os.path.dirname(os.path.realpath(__file__))
Luis Lozanof2a3ef42015-12-15 13:49:30 -080040MAIL_PROGRAM = '~/var/bin/mail-sheriff'
Luis Lozanof2a3ef42015-12-15 13:49:30 -080041PENDING_ARCHIVES_DIR = os.path.join(CROSTC_ROOT, 'pending_archives')
Luis Lozanob02958e2020-02-10 02:12:18 -080042NIGHTLY_TESTS_RESULTS = os.path.join(CROSTC_ROOT, 'nightly_test_reports')
Luis Lozanof2a3ef42015-12-15 13:49:30 -080043
Ting-Yuan Huange5819872016-12-15 14:22:26 -080044IMAGE_DIR = '{board}-{image_type}'
45IMAGE_VERSION_STR = r'{chrome_version}-{tip}\.{branch}\.{branch_branch}'
46IMAGE_FS = IMAGE_DIR + '/' + IMAGE_VERSION_STR
Ting-Yuan Huang112d5622018-03-26 13:49:42 -070047TRYBOT_IMAGE_FS = IMAGE_FS + '-{build_id}'
Luis Lozanoc75fd052016-02-19 17:37:01 -080048PFQ_IMAGE_FS = IMAGE_FS + '-rc1'
Manoj Guptaaee96b72016-10-24 13:43:28 -070049IMAGE_RE_GROUPS = {
50 'board': r'(?P<board>\S+)',
51 'image_type': r'(?P<image_type>\S+)',
52 'chrome_version': r'(?P<chrome_version>R\d+)',
53 'tip': r'(?P<tip>\d+)',
54 'branch': r'(?P<branch>\d+)',
55 'branch_branch': r'(?P<branch_branch>\d+)',
56 'build_id': r'(?P<build_id>b\d+)'
57}
Luis Lozanoc75fd052016-02-19 17:37:01 -080058TRYBOT_IMAGE_RE = TRYBOT_IMAGE_FS.format(**IMAGE_RE_GROUPS)
59
Tiancong Wang03234662019-10-30 10:16:38 -070060TELEMETRY_AQUARIUM_UNSUPPORTED = ['bob', 'elm', 'veyron_minnie']
61
cmtice46093e52014-12-09 14:59:16 -080062
Yunlian Jiang14cf5962015-12-11 15:50:14 -080063class ToolchainComparator(object):
64 """Class for doing the nightly tests work."""
cmtice46093e52014-12-09 14:59:16 -080065
Luis Lozanof2a3ef42015-12-15 13:49:30 -080066 def __init__(self,
67 board,
68 remotes,
69 chromeos_root,
70 weekday,
71 patches,
72 noschedv2=False):
cmtice46093e52014-12-09 14:59:16 -080073 self._board = board
74 self._remotes = remotes
75 self._chromeos_root = chromeos_root
76 self._base_dir = os.getcwd()
77 self._ce = command_executer.GetCommandExecuter()
78 self._l = logger.GetLogger()
Yunlian Jiang73580dd2017-11-21 04:48:40 -080079 self._build = '%s-release-tryjob' % board
Manoj Guptad575b8a2017-03-08 10:51:28 -080080 self._patches = patches.split(',') if patches else []
Yunlian Jiang3c6e4672015-08-24 15:58:22 -070081 self._patches_string = '_'.join(str(p) for p in self._patches)
Han Shen43494292015-09-14 10:26:40 -070082 self._noschedv2 = noschedv2
Yunlian Jiang3c6e4672015-08-24 15:58:22 -070083
cmtice46093e52014-12-09 14:59:16 -080084 if not weekday:
Luis Lozanof2a3ef42015-12-15 13:49:30 -080085 self._weekday = time.strftime('%a')
cmtice46093e52014-12-09 14:59:16 -080086 else:
87 self._weekday = weekday
zhizhouyd8fcbf52020-04-06 16:47:20 -070088 self._date = datetime.date.today().strftime('%Y/%m/%d')
89 timestamp = datetime.datetime.now().strftime('%Y-%m-%d_%H:%M:%S')
Manoj Guptaaee96b72016-10-24 13:43:28 -070090 self._reports_dir = os.path.join(
Luis Lozanob02958e2020-02-10 02:12:18 -080091 NIGHTLY_TESTS_RESULTS,
Caroline Tice9c4003a2017-11-07 16:37:33 -080092 '%s.%s' % (timestamp, board),
93 )
cmtice46093e52014-12-09 14:59:16 -080094
Luis Lozanoc75fd052016-02-19 17:37:01 -080095 def _GetVanillaImageName(self, trybot_image):
Ting-Yuan Huange5819872016-12-15 14:22:26 -080096 """Given a trybot artifact name, get latest vanilla image name.
cmtice46093e52014-12-09 14:59:16 -080097
Luis Lozano783954f2015-12-21 18:06:29 -080098 Args:
99 trybot_image: artifact name such as
Caroline Tice219e3b72018-12-18 15:54:49 -0800100 'daisy-release-tryjob/R40-6394.0.0-b1389'
Luis Lozano783954f2015-12-21 18:06:29 -0800101
102 Returns:
Ting-Yuan Huange5819872016-12-15 14:22:26 -0800103 Latest official image name, e.g. 'daisy-release/R57-9089.0.0'.
cmtice46093e52014-12-09 14:59:16 -0800104 """
Yunlian Jiang2e0ad052017-11-22 14:06:45 -0800105 # We need to filter out -tryjob in the trybot_image.
106 trybot = re.sub('-tryjob', '', trybot_image)
107 mo = re.search(TRYBOT_IMAGE_RE, trybot)
Luis Lozanoc75fd052016-02-19 17:37:01 -0800108 assert mo
Ting-Yuan Huange5819872016-12-15 14:22:26 -0800109 dirname = IMAGE_DIR.replace('\\', '').format(**mo.groupdict())
Ting-Yuan Huang99d32c42017-04-24 20:34:43 -0700110 return buildbot_utils.GetLatestImage(self._chromeos_root, dirname)
cmtice46093e52014-12-09 14:59:16 -0800111
Luis Lozanoc75fd052016-02-19 17:37:01 -0800112 def _GetNonAFDOImageName(self, trybot_image):
113 """Given a trybot artifact name, get corresponding non-AFDO image name.
114
115 We get the non-AFDO image from the PFQ builders. This image
116 is not generated for all the boards and, the closest PFQ image
117 was the one build for the previous ChromeOS version (the chrome
118 used in the current version is the one validated in the previous
119 version).
120 The previous ChromeOS does not always exist either. So, we try
121 a couple of versions before.
Luis Lozano783954f2015-12-21 18:06:29 -0800122
123 Args:
124 trybot_image: artifact name such as
Caroline Tice219e3b72018-12-18 15:54:49 -0800125 'daisy-release-tryjob/R40-6394.0.0-b1389'
Luis Lozano783954f2015-12-21 18:06:29 -0800126
127 Returns:
128 Corresponding chrome PFQ image name, e.g.
Luis Lozanoc75fd052016-02-19 17:37:01 -0800129 'daisy-chrome-pfq/R40-6393.0.0-rc1'.
Luis Lozano783954f2015-12-21 18:06:29 -0800130 """
Yunlian Jiang2e0ad052017-11-22 14:06:45 -0800131 trybot = re.sub('-tryjob', '', trybot_image)
132 mo = re.search(TRYBOT_IMAGE_RE, trybot)
Luis Lozanoc75fd052016-02-19 17:37:01 -0800133 assert mo
134 image_dict = mo.groupdict()
135 image_dict['image_type'] = 'chrome-pfq'
George Burgess IV9a6dae82019-07-24 23:20:57 -0700136 for _ in range(2):
Luis Lozanoc75fd052016-02-19 17:37:01 -0800137 image_dict['tip'] = str(int(image_dict['tip']) - 1)
138 nonafdo_image = PFQ_IMAGE_FS.replace('\\', '').format(**image_dict)
139 if buildbot_utils.DoesImageExist(self._chromeos_root, nonafdo_image):
140 return nonafdo_image
141 return ''
Luis Lozano783954f2015-12-21 18:06:29 -0800142
Luis Lozano783954f2015-12-21 18:06:29 -0800143 def _TestImages(self, trybot_image, vanilla_image, nonafdo_image):
Yunlian Jiang14cf5962015-12-11 15:50:14 -0800144 """Create crosperf experiment file.
cmtice46093e52014-12-09 14:59:16 -0800145
Luis Lozano783954f2015-12-21 18:06:29 -0800146 Given the names of the trybot, vanilla and non-AFDO images, create the
cmtice46093e52014-12-09 14:59:16 -0800147 appropriate crosperf experiment file and launch crosperf on it.
148 """
Luis Lozanobe756e02020-02-07 10:54:08 -0800149 experiment_file_dir = os.path.join(NIGHTLY_TESTS_DIR, self._weekday)
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800150 experiment_file_name = '%s_toolchain_experiment.txt' % self._board
Yunlian Jiang2f563562015-08-28 13:54:04 -0700151
Manoj Guptad575b8a2017-03-08 10:51:28 -0800152 compiler_string = 'llvm'
Manoj Guptac4110352016-12-28 13:47:12 -0800153 if USE_LLVM_NEXT_PATCH in self._patches_string:
154 experiment_file_name = '%s_llvm_next_experiment.txt' % self._board
155 compiler_string = 'llvm_next'
Yunlian Jiang2f563562015-08-28 13:54:04 -0700156
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800157 experiment_file = os.path.join(experiment_file_dir, experiment_file_name)
cmtice46093e52014-12-09 14:59:16 -0800158 experiment_header = """
159 board: %s
160 remote: %s
Luis Lozanoe1efeb82015-06-16 16:35:44 -0700161 retries: 1
Denis Nikitind7cded22019-09-12 13:38:50 -0700162 cooldown_temp: 40
163 cooldown_time: 10
Denis Nikitin858e1452019-09-16 15:30:05 -0700164 cpu_freq_pct: 95
Denis Nikitin30a061f2019-09-27 09:04:31 -0700165 top_interval: 1
cmtice46093e52014-12-09 14:59:16 -0800166 """ % (self._board, self._remotes)
167 experiment_tests = """
Luis Lozano1489d642015-12-08 10:08:19 -0800168 benchmark: all_toolchain_perf {
cmtice46093e52014-12-09 14:59:16 -0800169 suite: telemetry_Crosperf
Tiancong Wangd0348132019-03-07 11:22:48 -0800170 iterations: 5
Manoj Gupta5a516382017-08-23 12:27:54 -0700171 run_local: False
cmtice46093e52014-12-09 14:59:16 -0800172 }
Caroline Ticee82513b2016-10-27 12:45:15 -0700173
Caroline Tice219e3b72018-12-18 15:54:49 -0800174 benchmark: loading.desktop {
Caroline Ticee82513b2016-10-27 12:45:15 -0700175 suite: telemetry_Crosperf
Caroline Tice219e3b72018-12-18 15:54:49 -0800176 test_args: --story-tag-filter=typical
177 iterations: 3
Caroline Ticee82513b2016-10-27 12:45:15 -0700178 run_local: False
179 retries: 0
180 }
Tiancong Wang03234662019-10-30 10:16:38 -0700181 """
182 telemetry_aquarium_tests = """
Tiancong Wangd8bf2812019-08-30 11:34:05 -0700183 benchmark: rendering.desktop {
184 run_local: False
185 suite: telemetry_Crosperf
186 test_args: --story-filter=aquarium$
187 iterations: 5
188 }
189
190 benchmark: rendering.desktop {
191 run_local: False
192 suite: telemetry_Crosperf
193 test_args: --story-filter=aquarium_20k$
194 iterations: 3
195 }
cmtice46093e52014-12-09 14:59:16 -0800196 """
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800197
Zhizhou Yang81d651f2020-02-10 16:51:20 -0800198 with open(experiment_file, 'w', encoding='utf-8') as f:
Yunlian Jiang14cf5962015-12-11 15:50:14 -0800199 f.write(experiment_header)
200 f.write(experiment_tests)
cmtice46093e52014-12-09 14:59:16 -0800201
Tiancong Wang011c5712019-11-01 10:33:34 -0700202 if self._board not in TELEMETRY_AQUARIUM_UNSUPPORTED:
Tiancong Wang03234662019-10-30 10:16:38 -0700203 f.write(telemetry_aquarium_tests)
204
cmtice46093e52014-12-09 14:59:16 -0800205 # Now add vanilla to test file.
Yunlian Jiangfceaba32018-06-06 09:08:44 -0700206 official_image = """
Zhizhou Yangcbc6a9d2020-02-13 15:51:36 -0800207 vanilla_image {
208 chromeos_root: %s
209 build: %s
210 compiler: llvm
211 }
212 """ % (self._chromeos_root, vanilla_image)
Yunlian Jiang14cf5962015-12-11 15:50:14 -0800213 f.write(official_image)
cmtice46093e52014-12-09 14:59:16 -0800214
Luis Lozano783954f2015-12-21 18:06:29 -0800215 # Now add non-AFDO image to test file.
Luis Lozano439f2b72016-01-08 11:56:02 -0800216 if nonafdo_image:
Yunlian Jiangfceaba32018-06-06 09:08:44 -0700217 official_nonafdo_image = """
Zhizhou Yangcbc6a9d2020-02-13 15:51:36 -0800218 nonafdo_image {
219 chromeos_root: %s
220 build: %s
221 compiler: llvm
222 }
223 """ % (self._chromeos_root, nonafdo_image)
Luis Lozano439f2b72016-01-08 11:56:02 -0800224 f.write(official_nonafdo_image)
Luis Lozano783954f2015-12-21 18:06:29 -0800225
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800226 label_string = '%s_trybot_image' % compiler_string
Caroline Tice80eab982015-11-04 14:03:14 -0800227
Manoj Gupta3594db82017-01-31 11:48:57 -0800228 # Reuse autotest files from vanilla image for trybot images
229 autotest_files = os.path.join('/tmp', vanilla_image, 'autotest_files')
Yunlian Jiangfceaba32018-06-06 09:08:44 -0700230 experiment_image = """
Zhizhou Yangcbc6a9d2020-02-13 15:51:36 -0800231 %s {
232 chromeos_root: %s
233 build: %s
234 autotest_path: %s
235 compiler: %s
236 }
237 """ % (label_string, self._chromeos_root, trybot_image, autotest_files,
238 compiler_string)
Yunlian Jiang14cf5962015-12-11 15:50:14 -0800239 f.write(experiment_image)
cmtice46093e52014-12-09 14:59:16 -0800240
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800241 crosperf = os.path.join(TOOLCHAIN_DIR, 'crosperf', 'crosperf')
Han Shen43494292015-09-14 10:26:40 -0700242 noschedv2_opts = '--noschedv2' if self._noschedv2 else ''
Caroline Tice2a0bffb2019-12-12 11:37:18 -0800243 command = ('{crosperf} --no_email=True --results_dir={r_dir} '
zhizhouyeb6e55f2020-03-24 12:09:20 -0700244 '--intel_pstate=no_hwp --logging_level=verbose '
Ting-Yuan Huangb1afe3f2018-08-16 21:03:50 +0000245 '--json_report=True {noschedv2_opts} {exp_file}').format(
Yunlian Jiang14cf5962015-12-11 15:50:14 -0800246 crosperf=crosperf,
247 r_dir=self._reports_dir,
248 noschedv2_opts=noschedv2_opts,
249 exp_file=experiment_file)
cmticeaa700b02015-06-12 13:26:47 -0700250
zhizhouyd8fcbf52020-04-06 16:47:20 -0700251 return self._ce.RunCommand(command)
cmtice46093e52014-12-09 14:59:16 -0800252
cmtice7f3190b2015-05-22 14:14:51 -0700253 def _SendEmail(self):
254 """Find email message generated by crosperf and send it."""
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800255 filename = os.path.join(self._reports_dir, 'msg_body.html')
cmtice7f3190b2015-05-22 14:14:51 -0700256 if (os.path.exists(filename) and
257 os.path.exists(os.path.expanduser(MAIL_PROGRAM))):
Manoj Guptad575b8a2017-03-08 10:51:28 -0800258 email_title = 'buildbot llvm test results'
Manoj Guptac4110352016-12-28 13:47:12 -0800259 if USE_LLVM_NEXT_PATCH in self._patches_string:
260 email_title = 'buildbot llvm_next test results'
zhizhouyd8fcbf52020-04-06 16:47:20 -0700261 command = ('cat %s | %s -s "%s, %s %s" -team -html' %
262 (filename, MAIL_PROGRAM, email_title, self._board, self._date))
cmtice7f3190b2015-05-22 14:14:51 -0700263 self._ce.RunCommand(command)
cmtice46093e52014-12-09 14:59:16 -0800264
zhizhouyd8fcbf52020-04-06 16:47:20 -0700265 def _CopyJson(self):
266 # Copy json report to pending archives directory.
267 command = 'cp %s/*.json %s/.' % (self._reports_dir, PENDING_ARCHIVES_DIR)
268 ret = self._ce.RunCommand(command)
269 # Failing to access json report means that crosperf terminated or all tests
270 # failed, raise an error.
271 if ret != 0:
272 raise RuntimeError(
273 'Crosperf failed to run tests, cannot copy json report!')
274
Ting-Yuan Huang6a9a98a2018-03-07 17:35:13 -0800275 def DoAll(self):
Yunlian Jiang14cf5962015-12-11 15:50:14 -0800276 """Main function inside ToolchainComparator class.
cmtice46093e52014-12-09 14:59:16 -0800277
278 Launch trybot, get image names, create crosperf experiment file, run
279 crosperf, and copy images into seven-day report directories.
280 """
Ting-Yuan Huang6a9a98a2018-03-07 17:35:13 -0800281 buildbucket_id, trybot_image = buildbot_utils.GetTrybotImage(
282 self._chromeos_root,
283 self._build,
284 self._patches,
Jian Cai9d576402019-06-17 20:49:35 +0000285 tryjob_flags=['--notests'],
Ting-Yuan Huang6a9a98a2018-03-07 17:35:13 -0800286 build_toolchain=True)
cmtice46093e52014-12-09 14:59:16 -0800287
Yunlian Jiange84ea3d2016-12-12 11:07:40 -0800288 print('trybot_url: \
Ting-Yuan Huang6a9a98a2018-03-07 17:35:13 -0800289 http://cros-goldeneye/chromeos/healthmonitoring/buildDetails?buildbucketId=%s'
290 % buildbucket_id)
Tiancong Wang03234662019-10-30 10:16:38 -0700291 if not trybot_image:
Caroline Ticeefb79902018-04-18 11:23:01 -0700292 self._l.LogError('Unable to find trybot_image!')
Yunlian Jiangcdd19072017-09-29 10:15:56 -0700293 return 2
Luis Lozano783954f2015-12-21 18:06:29 -0800294
Luis Lozanoc75fd052016-02-19 17:37:01 -0800295 vanilla_image = self._GetVanillaImageName(trybot_image)
296 nonafdo_image = self._GetNonAFDOImageName(trybot_image)
Luis Lozano783954f2015-12-21 18:06:29 -0800297
298 print('trybot_image: %s' % trybot_image)
299 print('vanilla_image: %s' % vanilla_image)
300 print('nonafdo_image: %s' % nonafdo_image)
Luis Lozanoc75fd052016-02-19 17:37:01 -0800301
zhizhouyd8fcbf52020-04-06 16:47:20 -0700302 ret = self._TestImages(trybot_image, vanilla_image, nonafdo_image)
303 # Always try to send report email as crosperf will generate report when
304 # tests partially succeeded.
cmtice7f3190b2015-05-22 14:14:51 -0700305 self._SendEmail()
zhizhouyd8fcbf52020-04-06 16:47:20 -0700306 self._CopyJson()
307 # Non-zero ret here means crosperf tests partially failed, raise error here
308 # so that toolchain summary report can catch it.
309 if ret != 0:
310 raise RuntimeError('Crosperf tests partially failed!')
311
cmtice46093e52014-12-09 14:59:16 -0800312 return 0
313
314
315def Main(argv):
316 """The main function."""
317
318 # Common initializations
319 command_executer.InitCommandExecuter()
Caroline Ticeeddb0632016-04-14 09:19:02 -0700320 parser = argparse.ArgumentParser()
Manoj Guptaaee96b72016-10-24 13:43:28 -0700321 parser.add_argument(
322 '--remote', dest='remote', help='Remote machines to run tests on.')
323 parser.add_argument(
324 '--board', dest='board', default='x86-zgb', help='The target board.')
325 parser.add_argument(
326 '--chromeos_root',
327 dest='chromeos_root',
328 help='The chromeos root from which to run tests.')
329 parser.add_argument(
330 '--weekday',
331 default='',
332 dest='weekday',
333 help='The day of the week for which to run tests.')
334 parser.add_argument(
335 '--patch',
336 dest='patches',
337 help='The patches to use for the testing, '
338 "seprate the patch numbers with ',' "
339 'for more than one patches.')
340 parser.add_argument(
341 '--noschedv2',
342 dest='noschedv2',
343 action='store_true',
344 default=False,
345 help='Pass --noschedv2 to crosperf.')
Han Shen36413122015-08-28 11:05:40 -0700346
Caroline Ticeeddb0632016-04-14 09:19:02 -0700347 options = parser.parse_args(argv[1:])
cmtice46093e52014-12-09 14:59:16 -0800348 if not options.board:
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800349 print('Please give a board.')
cmtice46093e52014-12-09 14:59:16 -0800350 return 1
351 if not options.remote:
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800352 print('Please give at least one remote machine.')
cmtice46093e52014-12-09 14:59:16 -0800353 return 1
354 if not options.chromeos_root:
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800355 print('Please specify the ChromeOS root directory.')
cmtice46093e52014-12-09 14:59:16 -0800356 return 1
Yunlian Jiange52838c2015-08-20 14:32:37 -0700357
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800358 fc = ToolchainComparator(options.board, options.remote, options.chromeos_root,
Manoj Guptad575b8a2017-03-08 10:51:28 -0800359 options.weekday, options.patches, options.noschedv2)
Ting-Yuan Huang6a9a98a2018-03-07 17:35:13 -0800360 return fc.DoAll()
cmtice46093e52014-12-09 14:59:16 -0800361
362
Luis Lozanof2a3ef42015-12-15 13:49:30 -0800363if __name__ == '__main__':
cmtice46093e52014-12-09 14:59:16 -0800364 retval = Main(sys.argv)
365 sys.exit(retval)