Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: testing/buildbot/manage.py

Issue 1048213003: Add manage.py --convert to convert a test to run on Swarming everywhere. (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2_count_down
Patch Set: Rebased Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/buildbot/manage.py
diff --git a/testing/buildbot/manage.py b/testing/buildbot/manage.py
index f4ef89f815f00863d4e69beebbf210048ae3d996..6c26ad0ab646a244518846c9b483ac76e60759f6 100755
--- a/testing/buildbot/manage.py
+++ b/testing/buildbot/manage.py
@@ -44,6 +44,9 @@ def main():
group.add_argument(
'-c', '--check', action='store_true', help='Only check the files')
group.add_argument(
+ '--convert', action='store_true',
+ help='Convert a test to run on Swarming everywhere')
+ group.add_argument(
'--remaining', action='store_true',
help='Count the number of tests not yet running on Swarming')
group.add_argument(
@@ -54,6 +57,9 @@ def main():
'with --remaining')
args = parser.parse_args()
+ if args.convert and not args.test_name:
+ parser.error('A test name is required with --convert')
+
# Stats when running in --remaining mode;
tests_location = collections.defaultdict(
lambda: {
@@ -89,12 +95,18 @@ def main():
tests_location[name]['count_run_local'] += 1
tests_location[name]['local_configs'].setdefault(
filename, []).append(builder)
+ elif args.convert:
+ for test in data['gtest_tests']:
+ if test['test'] != args.test_name:
+ continue
+ test.setdefault('swarming', {})['can_use_on_swarming_builders'] = (
+ True)
expected = json.dumps(
config, sort_keys=True, indent=2, separators=(',', ': ')) + '\n'
if content != expected:
result = 1
- if args.write:
+ if args.write or args.convert:
with open(filepath, 'wb') as f:
f.write(expected)
print('Updated %s' % filename)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698