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

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

Issue 2840953002: Make tab_capture_end2end_tests work as a regular windowed_test_launcher. (Closed)
Patch Set: remove dependent CL Created 3 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 unified diff | Download patch
« content/test/gpu/generate_buildbot_json.py ('K') | « testing/xvfb.py ('k') | no next file » | 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 android = 'target_os="android"' in vals['gn_args'] 846 android = 'target_os="android"' in vals['gn_args']
847 for target in swarming_targets: 847 for target in swarming_targets:
848 if android: 848 if android:
849 # Android targets may be either android_apk or executable. The former 849 # Android targets may be either android_apk or executable. The former
850 # will result in runtime_deps associated with the stamp file, while the 850 # will result in runtime_deps associated with the stamp file, while the
851 # latter will result in runtime_deps associated with the executable. 851 # latter will result in runtime_deps associated with the executable.
852 label = isolate_map[target]['label'] 852 label = isolate_map[target]['label']
853 runtime_deps_targets = [ 853 runtime_deps_targets = [
854 target + '.runtime_deps', 854 target + '.runtime_deps',
855 'obj/%s.stamp.runtime_deps' % label.replace(':', '/')] 855 'obj/%s.stamp.runtime_deps' % label.replace(':', '/')]
856 elif isolate_map[target]['type'] == 'gpu_browser_test':
857 if self.platform == 'win32':
858 runtime_deps_targets = ['browser_tests.exe.runtime_deps']
859 else:
860 runtime_deps_targets = ['browser_tests.runtime_deps']
861 elif (isolate_map[target]['type'] == 'script' or 856 elif (isolate_map[target]['type'] == 'script' or
862 isolate_map[target].get('label_type') == 'group'): 857 isolate_map[target].get('label_type') == 'group'):
863 # For script targets, the build target is usually a group, 858 # For script targets, the build target is usually a group,
864 # for which gn generates the runtime_deps next to the stamp file 859 # for which gn generates the runtime_deps next to the stamp file
865 # for the label, which lives under the obj/ directory, but it may 860 # for the label, which lives under the obj/ directory, but it may
866 # also be an executable. 861 # also be an executable.
867 label = isolate_map[target]['label'] 862 label = isolate_map[target]['label']
868 runtime_deps_targets = [ 863 runtime_deps_targets = [
869 'obj/%s.stamp.runtime_deps' % label.replace(':', '/')] 864 'obj/%s.stamp.runtime_deps' % label.replace(':', '/')]
870 if self.platform == 'win32': 865 if self.platform == 'win32':
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
1065 1060
1066 android = 'target_os="android"' in vals['gn_args'] 1061 android = 'target_os="android"' in vals['gn_args']
1067 1062
1068 # This should be true if tests with type='windowed_test_launcher' are 1063 # This should be true if tests with type='windowed_test_launcher' are
1069 # expected to run using xvfb. For example, Linux Desktop, X11 CrOS and 1064 # expected to run using xvfb. For example, Linux Desktop, X11 CrOS and
1070 # Ozone CrOS builds. Note that one Ozone build can be used to run differen 1065 # Ozone CrOS builds. Note that one Ozone build can be used to run differen
1071 # backends. Currently, tests are executed for the headless and X11 backends 1066 # backends. Currently, tests are executed for the headless and X11 backends
1072 # and both can run under Xvfb. 1067 # and both can run under Xvfb.
1073 # TODO(tonikitoo,msisov,fwang): Find a way to run tests for the Wayland 1068 # TODO(tonikitoo,msisov,fwang): Find a way to run tests for the Wayland
1074 # backend. 1069 # backend.
1075 use_xvfb = (self.platform == 'linux2' and 1070 use_xvfb = self.platform == 'linux2' and not android
Dirk Pranke 2017/04/25 20:39:05 This is just fixing a formatting nit I noticed dur
1076 not android)
1077 1071
1078 asan = 'is_asan=true' in vals['gn_args'] 1072 asan = 'is_asan=true' in vals['gn_args']
1079 msan = 'is_msan=true' in vals['gn_args'] 1073 msan = 'is_msan=true' in vals['gn_args']
1080 tsan = 'is_tsan=true' in vals['gn_args'] 1074 tsan = 'is_tsan=true' in vals['gn_args']
1081 1075
1082 test_type = isolate_map[target]['type'] 1076 test_type = isolate_map[target]['type']
1083 1077
1084 executable = isolate_map[target].get('executable', target) 1078 executable = isolate_map[target].get('executable', target)
1085 executable_suffix = '.exe' if self.platform == 'win32' else '' 1079 executable_suffix = '.exe' if self.platform == 'win32' else ''
1086 1080
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 ] 1112 ]
1119 cmdline = [ 1113 cmdline = [
1120 '../../testing/test_env.py', 1114 '../../testing/test_env.py',
1121 './' + str(executable) + executable_suffix, 1115 './' + str(executable) + executable_suffix,
1122 '--brave-new-test-launcher', 1116 '--brave-new-test-launcher',
1123 '--test-launcher-bot-mode', 1117 '--test-launcher-bot-mode',
1124 '--asan=%d' % asan, 1118 '--asan=%d' % asan,
1125 '--msan=%d' % msan, 1119 '--msan=%d' % msan,
1126 '--tsan=%d' % tsan, 1120 '--tsan=%d' % tsan,
1127 ] 1121 ]
1128 elif test_type == 'gpu_browser_test':
1129 extra_files = [
1130 '../../testing/test_env.py'
1131 ]
1132 gtest_filter = isolate_map[target]['gtest_filter']
1133 cmdline = [
1134 '../../testing/test_env.py',
1135 './browser_tests' + executable_suffix,
1136 '--test-launcher-bot-mode',
1137 '--enable-gpu',
1138 '--test-launcher-jobs=1',
1139 '--gtest_filter=%s' % gtest_filter,
1140 ]
1141 elif test_type == 'script': 1122 elif test_type == 'script':
1142 extra_files = [ 1123 extra_files = [
1143 '../../testing/test_env.py' 1124 '../../testing/test_env.py'
1144 ] 1125 ]
1145 cmdline = [ 1126 cmdline = [
1146 '../../testing/test_env.py', 1127 '../../testing/test_env.py',
1147 '../../' + self.ToSrcRelPath(isolate_map[target]['script']) 1128 '../../' + self.ToSrcRelPath(isolate_map[target]['script'])
1148 ] 1129 ]
1149 elif test_type in ('raw'): 1130 elif test_type in ('raw'):
1150 extra_files = [] 1131 extra_files = []
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 # Then check to see if the arg contains any metacharacters other than 1545 # Then check to see if the arg contains any metacharacters other than
1565 # double quotes; if it does, quote everything (including the double 1546 # double quotes; if it does, quote everything (including the double
1566 # quotes) for safety. 1547 # quotes) for safety.
1567 if any(a in UNSAFE_FOR_CMD for a in arg): 1548 if any(a in UNSAFE_FOR_CMD for a in arg):
1568 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) 1549 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg)
1569 return arg 1550 return arg
1570 1551
1571 1552
1572 if __name__ == '__main__': 1553 if __name__ == '__main__':
1573 sys.exit(main(sys.argv[1:])) 1554 sys.exit(main(sys.argv[1:]))
OLDNEW
« content/test/gpu/generate_buildbot_json.py ('K') | « testing/xvfb.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698