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

Unified Diff: testing/buildbot/manage.py

Issue 1169923008: Add support for GN's --runtime-deps-list-file flag to MB. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to HEAD, add nacl_helper_nonsfi_unittests to fix presubmit failure Created 5 years, 6 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 | testing/buildbot/ninja_to_gn.pyl » ('j') | testing/buildbot/ninja_to_gn.pyl » ('J')
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 98de7ef4b04356b5ff0635db03ee7bdde9a5095a..723153c6c7920cf45e92836490b123d8fcaa98c0 100755
--- a/testing/buildbot/manage.py
+++ b/testing/buildbot/manage.py
@@ -10,6 +10,7 @@ formatted.
"""
import argparse
+import ast
import collections
import glob
import json
@@ -51,6 +52,15 @@ SKIP = {
}
+# TODO(GYP): These targets have not been ported to GN yet.
+SKIP_NINJA_TO_GN_TARGETS = {
+ 'cast_media_unittests',
+ 'cast_shell_browser_test',
+ 'chromevox_tests',
+ 'nacl_helper_nonsfi_unittests',
+}
+
+
class Error(Exception):
"""Processing error."""
@@ -90,7 +100,8 @@ def process_builder_remaining(data, filename, builder, tests_location):
filename, []).append(builder)
-def process_file(mode, test_name, tests_location, filepath):
+def process_file(mode, test_name, tests_location, filepath, ninja_targets,
+ ninja_targets_seen):
"""Processes a file.
The action depends on mode. Updates tests_location.
@@ -120,6 +131,14 @@ def process_file(mode, test_name, tests_location, filepath):
raise Error(
'%s: %s is broken: %s' % (filename, builder, data['gtest_tests']))
+ for d in data['gtest_tests']:
+ if (d['test'] not in ninja_targets and
+ d['test'] not in SKIP_NINJA_TO_GN_TARGETS):
+ raise Error('%s: %s / %s is not listed in ninja_to_gn.pyl.' %
+ (filename, builder, d['test']))
+ elif d['test'] in ninja_targets:
+ ninja_targets_seen.add(d['test'])
+
config[builder]['gtest_tests'] = sorted(
data['gtest_tests'], key=lambda x: x['test'])
if mode == 'remaining':
@@ -222,12 +241,26 @@ def main():
'count_run_local': 0, 'count_run_on_swarming': 0, 'local_configs': {}
})
+ with open(os.path.join(THIS_DIR, "ninja_to_gn.pyl")) as fp:
+ ninja_targets = ast.literal_eval(fp.read())
+
try:
result = 0
+ ninja_targets_seen = set()
for filepath in glob.glob(os.path.join(THIS_DIR, '*.json')):
- if not process_file(args.mode, args.test_name, tests_location, filepath):
+ if not process_file(args.mode, args.test_name, tests_location, filepath,
+ ninja_targets, ninja_targets_seen):
result = 1
+ extra_targets = set(ninja_targets) - ninja_targets_seen
+ if extra_targets:
+ if len(extra_targets) > 1:
+ extra_targets_str = ', '.join(extra_targets) + ' are'
+ else:
+ extra_targets_str = list(extra_targets)[0] + ' is'
+ raise Error('%s listed in ninja_to_gn.pyl but not in any .json files' %
+ extra_targets_str)
+
if args.mode == 'remaining':
print_remaining(args.test_name, tests_location)
return result
« no previous file with comments | « no previous file | testing/buildbot/ninja_to_gn.pyl » ('j') | testing/buildbot/ninja_to_gn.pyl » ('J')

Powered by Google App Engine
This is Rietveld 408576698