aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2021-09-01 11:14:55 -0700
committerCommit Bot <commit-bot@chromium.org>2021-09-02 17:21:10 +0000
commite87f528a81de4b2eaafaff8d0b9d332d9ab87b1b (patch)
treec85870d8d3d648da358dd2982454467775616ad6
parent338c8897fcefd242419ed42719df274a112d5b5d (diff)
downloadtoolchain-utils-e87f528a81de4b2eaafaff8d0b9d332d9ab87b1b.tar.gz
users of mail-sheriff: s/sheriff/detective
Starting tonight, an alias for the mail-sheriff program will be mail-detective. Swap to that. This includes forced auto-style-fixing from yapf. BUG=b:198446837 TEST=None Change-Id: I8f7375347c17095a7d53408617f8e46078f3db54 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3137913 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
-rwxr-xr-xbuildbot_test_llvm.py37
-rwxr-xr-xbuildbot_test_toolchains.py102
2 files changed, 68 insertions, 71 deletions
diff --git a/buildbot_test_llvm.py b/buildbot_test_llvm.py
index 968c67b8..1c7bb199 100755
--- a/buildbot_test_llvm.py
+++ b/buildbot_test_llvm.py
@@ -32,7 +32,7 @@ from cros_utils import buildbot_utils
CROSTC_ROOT = '/usr/local/google/crostc'
ROLE_ACCOUNT = 'mobiletc-prebuild'
TOOLCHAIN_DIR = os.path.dirname(os.path.realpath(__file__))
-MAIL_PROGRAM = '~/var/bin/mail-sheriff'
+MAIL_PROGRAM = '~/var/bin/mail-detective'
VALIDATION_RESULT_DIR = os.path.join(CROSTC_ROOT, 'validation_result')
START_DATE = datetime.date(2016, 1, 1)
TEST_PER_DAY = 4
@@ -137,24 +137,23 @@ def Main(argv):
# Common initializations
command_executer.InitCommandExecuter()
parser = argparse.ArgumentParser()
- 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(
- '--board', default='', dest='board', help='The board to test.')
- parser.add_argument(
- '--patch',
- dest='patches',
- default='',
- help='The patches to use for the testing, '
- "seprate the patch numbers with ',' "
- 'for more than one patches.')
+ 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('--board',
+ default='',
+ dest='board',
+ help='The board to test.')
+ parser.add_argument('--patch',
+ dest='patches',
+ default='',
+ help='The patches to use for the testing, '
+ "seprate the patch numbers with ',' "
+ 'for more than one patches.')
parser.add_argument(
'--compiler',
dest='compiler',
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()