aboutsummaryrefslogtreecommitdiff
path: root/buildbot_test_toolchains.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildbot_test_toolchains.py')
-rwxr-xr-xbuildbot_test_toolchains.py102
1 files changed, 50 insertions, 52 deletions
diff --git a/buildbot_test_toolchains.py b/buildbot_test_toolchains.py
index b5468941..6c3bfef4 100755
--- a/buildbot_test_toolchains.py
+++ b/buildbot_test_toolchains.py
@@ -39,7 +39,7 @@ NIGHTLY_TESTS_DIR = os.path.join(CROSTC_ROOT, 'nightly-tests')
ROLE_ACCOUNT = 'mobiletc-prebuild'
TOOLCHAIN_DIR = os.path.dirname(os.path.realpath(__file__))
TMP_TOOLCHAIN_TEST = '/tmp/toolchain-tests'
-MAIL_PROGRAM = '~/var/bin/mail-sheriff'
+MAIL_PROGRAM = '~/var/bin/mail-detective'
PENDING_ARCHIVES_DIR = os.path.join(CROSTC_ROOT, 'pending_archives')
NIGHTLY_TESTS_RESULTS = os.path.join(CROSTC_ROOT, 'nightly_test_reports')
@@ -228,25 +228,25 @@ class ToolchainComparator(object):
noschedv2_opts = '--noschedv2' if self._noschedv2 else ''
command = ('{crosperf} --no_email={no_email} --results_dir={r_dir} '
'--logging_level=verbose --json_report=True {noschedv2_opts} '
- '{exp_file}').format(
- crosperf=crosperf,
- no_email=not self._test,
- r_dir=self._reports_dir,
- noschedv2_opts=noschedv2_opts,
- exp_file=experiment_file)
+ '{exp_file}').format(crosperf=crosperf,
+ no_email=not self._test,
+ r_dir=self._reports_dir,
+ noschedv2_opts=noschedv2_opts,
+ exp_file=experiment_file)
return self._ce.RunCommand(command)
def _SendEmail(self):
"""Find email message generated by crosperf and send it."""
filename = os.path.join(self._reports_dir, 'msg_body.html')
- if (os.path.exists(filename) and
- os.path.exists(os.path.expanduser(MAIL_PROGRAM))):
+ if (os.path.exists(filename)
+ and os.path.exists(os.path.expanduser(MAIL_PROGRAM))):
email_title = 'buildbot llvm test results'
if USE_LLVM_NEXT_PATCH in self._patches_string:
email_title = 'buildbot llvm_next test results'
- command = ('cat %s | %s -s "%s, %s %s" -team -html' %
- (filename, MAIL_PROGRAM, email_title, self._board, self._date))
+ command = (
+ 'cat %s | %s -s "%s, %s %s" -team -html' %
+ (filename, MAIL_PROGRAM, email_title, self._board, self._date))
self._ce.RunCommand(command)
def _CopyJson(self):
@@ -317,44 +317,41 @@ def Main(argv):
# Common initializations
command_executer.InitCommandExecuter()
parser = argparse.ArgumentParser()
- parser.add_argument(
- '--remote', dest='remote', help='Remote machines to run tests on.')
- parser.add_argument(
- '--board', dest='board', default='x86-zgb', help='The target board.')
- parser.add_argument(
- '--chromeos_root',
- dest='chromeos_root',
- help='The chromeos root from which to run tests.')
- parser.add_argument(
- '--weekday',
- default='',
- dest='weekday',
- help='The day of the week for which to run tests.')
- parser.add_argument(
- '--patch',
- dest='patches',
- help='The patches to use for the testing, '
- "seprate the patch numbers with ',' "
- 'for more than one patches.')
- parser.add_argument(
- '--noschedv2',
- dest='noschedv2',
- action='store_true',
- default=False,
- help='Pass --noschedv2 to crosperf.')
- parser.add_argument(
- '--recipe',
- dest='recipe',
- default=True,
- help='Use images generated from recipe rather than'
- 'launching tryjob to get images.')
- parser.add_argument(
- '--test',
- dest='test',
- default=False,
- help='Test this script on local desktop, '
- 'disabling mobiletc checking and email sending.'
- 'Artifacts stored in /tmp/toolchain-tests')
+ parser.add_argument('--remote',
+ dest='remote',
+ help='Remote machines to run tests on.')
+ parser.add_argument('--board',
+ dest='board',
+ default='x86-zgb',
+ help='The target board.')
+ parser.add_argument('--chromeos_root',
+ dest='chromeos_root',
+ help='The chromeos root from which to run tests.')
+ parser.add_argument('--weekday',
+ default='',
+ dest='weekday',
+ help='The day of the week for which to run tests.')
+ parser.add_argument('--patch',
+ dest='patches',
+ help='The patches to use for the testing, '
+ "seprate the patch numbers with ',' "
+ 'for more than one patches.')
+ parser.add_argument('--noschedv2',
+ dest='noschedv2',
+ action='store_true',
+ default=False,
+ help='Pass --noschedv2 to crosperf.')
+ parser.add_argument('--recipe',
+ dest='recipe',
+ default=True,
+ help='Use images generated from recipe rather than'
+ 'launching tryjob to get images.')
+ parser.add_argument('--test',
+ dest='test',
+ default=False,
+ help='Test this script on local desktop, '
+ 'disabling mobiletc checking and email sending.'
+ 'Artifacts stored in /tmp/toolchain-tests')
options = parser.parse_args(argv[1:])
if not options.board:
@@ -372,9 +369,10 @@ def Main(argv):
shutil.rmtree(TMP_TOOLCHAIN_TEST)
os.mkdir(TMP_TOOLCHAIN_TEST)
- fc = ToolchainComparator(options.board, options.remote, options.chromeos_root,
- options.weekday, options.patches, options.recipe,
- options.test, options.noschedv2)
+ fc = ToolchainComparator(options.board, options.remote,
+ options.chromeos_root, options.weekday,
+ options.patches, options.recipe, options.test,
+ options.noschedv2)
return fc.DoAll()