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

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

Issue 2938383004: Make the linux_chromium_cfi_rel_ng trybot more useful. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « testing/test_env.py ('k') | tools/mb/mb_config.pyl » ('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 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 # Ozone CrOS builds. Note that one Ozone build can be used to run differen 1055 # Ozone CrOS builds. Note that one Ozone build can be used to run differen
1056 # backends. Currently, tests are executed for the headless and X11 backends 1056 # backends. Currently, tests are executed for the headless and X11 backends
1057 # and both can run under Xvfb. 1057 # and both can run under Xvfb.
1058 # TODO(tonikitoo,msisov,fwang): Find a way to run tests for the Wayland 1058 # TODO(tonikitoo,msisov,fwang): Find a way to run tests for the Wayland
1059 # backend. 1059 # backend.
1060 use_xvfb = self.platform == 'linux2' and not android 1060 use_xvfb = self.platform == 'linux2' and not android
1061 1061
1062 asan = 'is_asan=true' in vals['gn_args'] 1062 asan = 'is_asan=true' in vals['gn_args']
1063 msan = 'is_msan=true' in vals['gn_args'] 1063 msan = 'is_msan=true' in vals['gn_args']
1064 tsan = 'is_tsan=true' in vals['gn_args'] 1064 tsan = 'is_tsan=true' in vals['gn_args']
1065 cfi_diag = 'use_cfi_diag=true' in vals['gn_args']
1065 1066
1066 test_type = isolate_map[target]['type'] 1067 test_type = isolate_map[target]['type']
1067 1068
1068 executable = isolate_map[target].get('executable', target) 1069 executable = isolate_map[target].get('executable', target)
1069 executable_suffix = '.exe' if self.platform == 'win32' else '' 1070 executable_suffix = '.exe' if self.platform == 'win32' else ''
1070 1071
1071 cmdline = [] 1072 cmdline = []
1072 extra_files = [] 1073 extra_files = []
1073 1074
1074 if test_type == 'nontest': 1075 if test_type == 'nontest':
(...skipping 14 matching lines...) Expand all
1089 '../../testing/xvfb.py', 1090 '../../testing/xvfb.py',
1090 ] 1091 ]
1091 cmdline = [ 1092 cmdline = [
1092 '../../testing/xvfb.py', 1093 '../../testing/xvfb.py',
1093 './' + str(executable) + executable_suffix, 1094 './' + str(executable) + executable_suffix,
1094 '--brave-new-test-launcher', 1095 '--brave-new-test-launcher',
1095 '--test-launcher-bot-mode', 1096 '--test-launcher-bot-mode',
1096 '--asan=%d' % asan, 1097 '--asan=%d' % asan,
1097 '--msan=%d' % msan, 1098 '--msan=%d' % msan,
1098 '--tsan=%d' % tsan, 1099 '--tsan=%d' % tsan,
1100 '--cfi-diag=%d' % cfi_diag,
1099 ] 1101 ]
1100 elif test_type in ('windowed_test_launcher', 'console_test_launcher'): 1102 elif test_type in ('windowed_test_launcher', 'console_test_launcher'):
1101 extra_files = [ 1103 extra_files = [
1102 '../../testing/test_env.py' 1104 '../../testing/test_env.py'
1103 ] 1105 ]
1104 cmdline = [ 1106 cmdline = [
1105 '../../testing/test_env.py', 1107 '../../testing/test_env.py',
1106 './' + str(executable) + executable_suffix, 1108 './' + str(executable) + executable_suffix,
1107 '--brave-new-test-launcher', 1109 '--brave-new-test-launcher',
1108 '--test-launcher-bot-mode', 1110 '--test-launcher-bot-mode',
1109 '--asan=%d' % asan, 1111 '--asan=%d' % asan,
1110 '--msan=%d' % msan, 1112 '--msan=%d' % msan,
1111 '--tsan=%d' % tsan, 1113 '--tsan=%d' % tsan,
1114 '--cfi-diag=%d' % cfi_diag,
1112 ] 1115 ]
1113 elif test_type == 'script': 1116 elif test_type == 'script':
1114 extra_files = [ 1117 extra_files = [
1115 '../../testing/test_env.py' 1118 '../../testing/test_env.py'
1116 ] 1119 ]
1117 cmdline = [ 1120 cmdline = [
1118 '../../testing/test_env.py', 1121 '../../testing/test_env.py',
1119 '../../' + self.ToSrcRelPath(isolate_map[target]['script']) 1122 '../../' + self.ToSrcRelPath(isolate_map[target]['script'])
1120 ] 1123 ]
1121 elif test_type in ('raw'): 1124 elif test_type in ('raw'):
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 # Then check to see if the arg contains any metacharacters other than 1539 # Then check to see if the arg contains any metacharacters other than
1537 # double quotes; if it does, quote everything (including the double 1540 # double quotes; if it does, quote everything (including the double
1538 # quotes) for safety. 1541 # quotes) for safety.
1539 if any(a in UNSAFE_FOR_CMD for a in arg): 1542 if any(a in UNSAFE_FOR_CMD for a in arg):
1540 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) 1543 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg)
1541 return arg 1544 return arg
1542 1545
1543 1546
1544 if __name__ == '__main__': 1547 if __name__ == '__main__':
1545 sys.exit(main(sys.argv[1:])) 1548 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « testing/test_env.py ('k') | tools/mb/mb_config.pyl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698