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

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

Issue 2503503002: MB: Run test with gtest-parallel on swarming. (Closed)
Patch Set: Seems to work now :) 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
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license 4 # Use of this source code is governed by a BSD-style license
5 # that can be found in the LICENSE file in the root of the source 5 # that can be found in the LICENSE file in the root of the source
6 # tree. An additional intellectual property rights grant can be found 6 # tree. An additional intellectual property rights grant can be found
7 # in the file PATENTS. All contributing project authors may 7 # in the file PATENTS. All contributing project authors may
8 # be found in the AUTHORS file in the root of the source tree. 8 # be found in the AUTHORS file in the root of the source tree.
9 9
10 """MB - the Meta-Build wrapper around GYP and GN 10 """MB - the Meta-Build wrapper around GYP and GN
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 1070
1071 asan = 'is_asan=true' in vals['gn_args'] 1071 asan = 'is_asan=true' in vals['gn_args']
1072 msan = 'is_msan=true' in vals['gn_args'] 1072 msan = 'is_msan=true' in vals['gn_args']
1073 tsan = 'is_tsan=true' in vals['gn_args'] 1073 tsan = 'is_tsan=true' in vals['gn_args']
1074 1074
1075 isolate_map = self.ReadIsolateMap() 1075 isolate_map = self.ReadIsolateMap()
1076 test_type = isolate_map[target]['type'] 1076 test_type = isolate_map[target]['type']
1077 1077
1078 executable = isolate_map[target].get('executable', target) 1078 executable = isolate_map[target].get('executable', target)
1079 executable_suffix = '.exe' if self.platform == 'win32' else '' 1079 executable_suffix = '.exe' if self.platform == 'win32' else ''
1080 executable_preffix = '.\\' if self.platform == 'win32' else './'
1080 1081
1081 cmdline = [] 1082 cmdline = []
1082 extra_files = [] 1083 extra_files = []
1083 1084
1084 if test_type == 'nontest': 1085 if test_type == 'nontest':
1085 self.WriteFailureAndRaise('We should not be isolating %s.' % target, 1086 self.WriteFailureAndRaise('We should not be isolating %s.' % target,
1086 output_path=None) 1087 output_path=None)
1087 1088
1088 if android and test_type != "script": 1089 if android and test_type != "script":
1089 logdog_command = [ 1090 logdog_command = [
(...skipping 11 matching lines...) Expand all
1101 '--target-devices-file', '${SWARMING_BOT_FILE}', 1102 '--target-devices-file', '${SWARMING_BOT_FILE}',
1102 '-v' 1103 '-v'
1103 ] 1104 ]
1104 cmdline = (['./../../build/android/test_wrapper/logdog_wrapper.py'] 1105 cmdline = (['./../../build/android/test_wrapper/logdog_wrapper.py']
1105 + logdog_command + test_cmdline) 1106 + logdog_command + test_cmdline)
1106 elif use_x11 and test_type == 'windowed_test_launcher': 1107 elif use_x11 and test_type == 'windowed_test_launcher':
1107 extra_files = [ 1108 extra_files = [
1108 'xdisplaycheck', 1109 'xdisplaycheck',
1109 '../../testing/test_env.py', 1110 '../../testing/test_env.py',
1110 '../../testing/xvfb.py', 1111 '../../testing/xvfb.py',
1112 '../../third_party/gtest-parallel/gtest-parallel',
1111 ] 1113 ]
1112 cmdline = [ 1114 cmdline = [
1113 '../../testing/xvfb.py', 1115 '../../testing/xvfb.py',
1114 '.', 1116 '.',
1115 './' + str(executable) + executable_suffix, 1117 'python',
1116 '--brave-new-test-launcher', 1118 '../../third_party/gtest-parallel/gtest-parallel',
1117 '--test-launcher-bot-mode', 1119 executable_preffix + str(executable) + executable_suffix,
1120 '--',
1118 '--asan=%d' % asan, 1121 '--asan=%d' % asan,
1119 '--msan=%d' % msan, 1122 '--msan=%d' % msan,
1120 '--tsan=%d' % tsan, 1123 '--tsan=%d' % tsan,
1121 ] 1124 ]
1122 elif test_type in ('windowed_test_launcher', 'console_test_launcher'): 1125 elif test_type in ('windowed_test_launcher', 'console_test_launcher'):
1123 extra_files = [ 1126 extra_files = [
1124 '../../testing/test_env.py' 1127 '../../testing/test_env.py',
1128 '../../third_party/gtest-parallel/gtest-parallel',
1125 ] 1129 ]
1126 cmdline = [ 1130 cmdline = [
1127 '../../testing/test_env.py', 1131 '../../testing/test_env.py',
1128 './' + str(executable) + executable_suffix, 1132 'python',
1129 '--brave-new-test-launcher', 1133 '../../third_party/gtest-parallel/gtest-parallel',
1130 '--test-launcher-bot-mode', 1134 executable_preffix + str(executable) + executable_suffix,
1135 '--',
1131 '--asan=%d' % asan, 1136 '--asan=%d' % asan,
1132 '--msan=%d' % msan, 1137 '--msan=%d' % msan,
1133 '--tsan=%d' % tsan, 1138 '--tsan=%d' % tsan,
1134 ] 1139 ]
1135 elif test_type == 'gpu_browser_test': 1140 elif test_type == 'gpu_browser_test':
kjellander_webrtc 2016/11/15 10:29:39 Let's remove this type
1136 extra_files = [ 1141 extra_files = [
1137 '../../testing/test_env.py' 1142 '../../testing/test_env.py'
1138 ] 1143 ]
1139 gtest_filter = isolate_map[target]['gtest_filter'] 1144 gtest_filter = isolate_map[target]['gtest_filter']
1140 cmdline = [ 1145 cmdline = [
1141 '../../testing/test_env.py', 1146 '../../testing/test_env.py',
1142 './browser_tests' + executable_suffix, 1147 './browser_tests' + executable_suffix,
1143 '--test-launcher-bot-mode', 1148 '--test-launcher-bot-mode',
1144 '--enable-gpu', 1149 '--enable-gpu',
1145 '--test-launcher-jobs=1', 1150 '--test-launcher-jobs=1',
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 # Then check to see if the arg contains any metacharacters other than 1576 # Then check to see if the arg contains any metacharacters other than
1572 # double quotes; if it does, quote everything (including the double 1577 # double quotes; if it does, quote everything (including the double
1573 # quotes) for safety. 1578 # quotes) for safety.
1574 if any(a in UNSAFE_FOR_CMD for a in arg): 1579 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) 1580 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg)
1576 return arg 1581 return arg
1577 1582
1578 1583
1579 if __name__ == '__main__': 1584 if __name__ == '__main__':
1580 sys.exit(main(sys.argv[1:])) 1585 sys.exit(main(sys.argv[1:]))
OLDNEW
« third_party/gtest-parallel/gtest-parallel ('K') | « third_party/gtest-parallel/gtest-parallel ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698