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

Side by Side Diff: tools/mb/mb.py

Issue 2506013002: Revert of Run gl_unittests with Ozone X11. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « testing/buildbot/gn_isolate_map.pyl ('k') | ui/gl/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """MB - the Meta-Build wrapper around GYP and GN 6 """MB - the Meta-Build wrapper around GYP and GN
7 7
8 MB is a wrapper script for GYP and GN that can be used to generate build files 8 MB is a wrapper script for GYP and GN that can be used to generate build files
9 for sets of canned configurations and analyze them. 9 for sets of canned configurations and analyze them.
10 """ 10 """
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 if not ret and self.args.verbose: 1049 if not ret and self.args.verbose:
1050 outp = json.loads(self.ReadFile(self.args.output_path[0])) 1050 outp = json.loads(self.ReadFile(self.args.output_path[0]))
1051 self.Print() 1051 self.Print()
1052 self.Print('analyze output:') 1052 self.Print('analyze output:')
1053 self.PrintJSON(outp) 1053 self.PrintJSON(outp)
1054 self.Print() 1054 self.Print()
1055 1055
1056 return ret 1056 return ret
1057 1057
1058 def GetIsolateCommand(self, target, vals): 1058 def GetIsolateCommand(self, target, vals):
1059 isolate_map = self.ReadIsolateMap()
1060
1061 android = 'target_os="android"' in vals['gn_args'] 1059 android = 'target_os="android"' in vals['gn_args']
1062 ozone = 'use_ozone=true' in vals['gn_args']
1063 ozone_x11 = (ozone and 'args' in isolate_map[target] and
1064 '--ozone-platform=x11' in isolate_map[target]['args'])
1065 1060
1066 # This needs to mirror the settings in //build/config/ui.gni: 1061 # This needs to mirror the settings in //build/config/ui.gni:
1067 # use_x11 = is_linux && !use_ozone || use_ozone && --ozone-platform=x11 1062 # use_x11 = is_linux && !use_ozone.
1068 use_x11 = (self.platform == 'linux2' and 1063 use_x11 = (self.platform == 'linux2' and
1069 not android and 1064 not android and
1070 (ozone_x11 or not ozone)) 1065 not 'use_ozone=true' in vals['gn_args'])
1071 1066
1072 asan = 'is_asan=true' in vals['gn_args'] 1067 asan = 'is_asan=true' in vals['gn_args']
1073 msan = 'is_msan=true' in vals['gn_args'] 1068 msan = 'is_msan=true' in vals['gn_args']
1074 tsan = 'is_tsan=true' in vals['gn_args'] 1069 tsan = 'is_tsan=true' in vals['gn_args']
1075 1070
1071 isolate_map = self.ReadIsolateMap()
1076 test_type = isolate_map[target]['type'] 1072 test_type = isolate_map[target]['type']
1077 1073
1078 executable = isolate_map[target].get('executable', target) 1074 executable = isolate_map[target].get('executable', target)
1079 executable_suffix = '.exe' if self.platform == 'win32' else '' 1075 executable_suffix = '.exe' if self.platform == 'win32' else ''
1080 1076
1081 cmdline = [] 1077 cmdline = []
1082 extra_files = [] 1078 extra_files = []
1083 1079
1084 if test_type == 'nontest': 1080 if test_type == 'nontest':
1085 self.WriteFailureAndRaise('We should not be isolating %s.' % target, 1081 self.WriteFailureAndRaise('We should not be isolating %s.' % target,
(...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 # Then check to see if the arg contains any metacharacters other than 1567 # Then check to see if the arg contains any metacharacters other than
1572 # double quotes; if it does, quote everything (including the double 1568 # double quotes; if it does, quote everything (including the double
1573 # quotes) for safety. 1569 # quotes) for safety.
1574 if any(a in UNSAFE_FOR_CMD for a in arg): 1570 if any(a in UNSAFE_FOR_CMD for a in arg):
1575 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) 1571 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg)
1576 return arg 1572 return arg
1577 1573
1578 1574
1579 if __name__ == '__main__': 1575 if __name__ == '__main__':
1580 sys.exit(main(sys.argv[1:])) 1576 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « testing/buildbot/gn_isolate_map.pyl ('k') | ui/gl/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698