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

Unified Diff: tools/mb/mb.py

Issue 1925013002: 👔 Make instrumentation tests declare their runtime_deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « testing/buildbot/gn_isolate_map.pyl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/mb/mb.py
diff --git a/tools/mb/mb.py b/tools/mb/mb.py
index b03f03a7a4648eeee6afa97f529a2575bddc8fd6..f8ebdf4bd49473ab57c2810ffe99f86d7dbb6e6b 100755
--- a/tools/mb/mb.py
+++ b/tools/mb/mb.py
@@ -262,7 +262,8 @@ class MetaBuildWrapper(object):
return 1
if vals['type'] == 'gn':
- return self.RunGNIsolate(vals)
+ gn_isolate_map = self.ReadGnIsolateMap()
+ return self.RunGNIsolate(vals, gn_isolate_map)
else:
return self.Build('%s_run' % self.args.target[0])
@@ -288,11 +289,15 @@ class MetaBuildWrapper(object):
target = self.args.target[0]
if vals['type'] == 'gn':
+ gn_isolate_map = self.ReadGnIsolateMap()
+ build_target = target
+ if gn_isolate_map[target]['type'] == 'android_instrumentation':
+ build_target = target + '_apk'
jbudorick 2016/04/28 03:11:57 :(
if self.args.build:
- ret = self.Build(target)
+ ret = self.Build(build_target)
if ret:
return ret
- ret = self.RunGNIsolate(vals)
+ ret = self.RunGNIsolate(vals, gn_isolate_map)
if ret:
return ret
else:
@@ -754,8 +759,7 @@ class MetaBuildWrapper(object):
output_path=None)
contents = self.ReadFile(path)
swarming_targets = set(contents.splitlines())
- gn_isolate_map = ast.literal_eval(self.ReadFile(self.PathJoin(
- self.chromium_src_dir, 'testing', 'buildbot', 'gn_isolate_map.pyl')))
+ gn_isolate_map = self.ReadGnIsolateMap()
gn_labels = []
err = ''
for target in swarming_targets:
@@ -828,10 +832,11 @@ class MetaBuildWrapper(object):
return 0
- def RunGNIsolate(self, vals):
- gn_isolate_map = ast.literal_eval(self.ReadFile(self.PathJoin(
+ def ReadGnIsolateMap(self):
+ return ast.literal_eval(self.ReadFile(self.PathJoin(
self.chromium_src_dir, 'testing', 'buildbot', 'gn_isolate_map.pyl')))
+ def RunGNIsolate(self, vals, gn_isolate_map):
build_dir = self.args.path[0]
target = self.args.target[0]
target_name = self.GNTargetName(target)
@@ -990,6 +995,8 @@ class MetaBuildWrapper(object):
# TODO(jbudorick): This won't work with instrumentation test targets.
# Revisit this logic when those are added to gn_isolate_map.pyl.
cmdline = [self.PathJoin('bin', 'run_%s' % target_name)]
+ if gn_isolate_map[target]['type'] == 'android_instrumentation':
+ cmdline[0] += '_apk'
elif use_x11 and test_type == 'windowed_test_launcher':
extra_files = [
'xdisplaycheck',
« no previous file with comments | « testing/buildbot/gn_isolate_map.pyl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698