OLD | NEW |
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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 '../../tools-webrtc/gtest-parallel-wrapper.py', | 1098 '../../tools-webrtc/gtest-parallel-wrapper.py', |
1099 '--output_dir=%s' % output_dir, | 1099 '--output_dir=%s' % output_dir, |
1100 '--gtest_color=no', | 1100 '--gtest_color=no', |
1101 # We tell gtest-parallel to interrupt the test after 900 seconds, | 1101 # We tell gtest-parallel to interrupt the test after 900 seconds, |
1102 # so it can exit cleanly and report results, instead of being | 1102 # so it can exit cleanly and report results, instead of being |
1103 # interrupted by swarming and not reporting anything. | 1103 # interrupted by swarming and not reporting anything. |
1104 '--timeout=900', | 1104 '--timeout=900', |
1105 ] | 1105 ] |
1106 | 1106 |
1107 asan = 'is_asan=true' in vals['gn_args'] | 1107 asan = 'is_asan=true' in vals['gn_args'] |
| 1108 lsan = 'is_lsan=true' in vals['gn_args'] |
1108 msan = 'is_msan=true' in vals['gn_args'] | 1109 msan = 'is_msan=true' in vals['gn_args'] |
1109 tsan = 'is_tsan=true' in vals['gn_args'] | 1110 tsan = 'is_tsan=true' in vals['gn_args'] |
1110 | 1111 |
1111 executable_prefix = '.\\' if self.platform == 'win32' else './' | 1112 executable_prefix = '.\\' if self.platform == 'win32' else './' |
1112 executable_suffix = '.exe' if self.platform == 'win32' else '' | 1113 executable_suffix = '.exe' if self.platform == 'win32' else '' |
1113 executable = executable_prefix + target + executable_suffix | 1114 executable = executable_prefix + target + executable_suffix |
1114 | 1115 |
1115 cmdline = (['../../testing/xvfb.py'] if xvfb else | 1116 cmdline = (['../../testing/xvfb.py'] if xvfb else |
1116 ['../../testing/test_env.py']) | 1117 ['../../testing/test_env.py']) |
1117 cmdline += memcheck_cmdline if memcheck else gtest_parallel_wrapper | 1118 cmdline += memcheck_cmdline if memcheck else gtest_parallel_wrapper |
1118 cmdline.append(executable) | 1119 cmdline.append(executable) |
1119 if test_type == 'non_parallel_console_test_launcher' and not memcheck: | 1120 if test_type == 'non_parallel_console_test_launcher' and not memcheck: |
1120 # Still use the gtest-parallel-wrapper.py script since we need it to | 1121 # Still use the gtest-parallel-wrapper.py script since we need it to |
1121 # run tests on swarming, but don't execute tests in parallel. | 1122 # run tests on swarming, but don't execute tests in parallel. |
1122 cmdline.append('--workers=1') | 1123 cmdline.append('--workers=1') |
1123 | 1124 |
1124 cmdline.extend([ | 1125 cmdline.extend([ |
1125 '--', | 1126 '--', |
1126 '--asan=%d' % asan, | 1127 '--asan=%d' % asan, |
| 1128 '--lsan=%d' % lsan, |
1127 '--msan=%d' % msan, | 1129 '--msan=%d' % msan, |
1128 '--tsan=%d' % tsan, | 1130 '--tsan=%d' % tsan, |
1129 ]) | 1131 ]) |
1130 | 1132 |
1131 cmdline += isolate_map[target].get('args', []) | 1133 cmdline += isolate_map[target].get('args', []) |
1132 | 1134 |
1133 return cmdline, extra_files | 1135 return cmdline, extra_files |
1134 | 1136 |
1135 def ToAbsPath(self, build_path, *comps): | 1137 def ToAbsPath(self, build_path, *comps): |
1136 return self.PathJoin(self.src_dir, | 1138 return self.PathJoin(self.src_dir, |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1536 # Then check to see if the arg contains any metacharacters other than | 1538 # Then check to see if the arg contains any metacharacters other than |
1537 # double quotes; if it does, quote everything (including the double | 1539 # double quotes; if it does, quote everything (including the double |
1538 # quotes) for safety. | 1540 # quotes) for safety. |
1539 if any(a in UNSAFE_FOR_CMD for a in arg): | 1541 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) | 1542 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
1541 return arg | 1543 return arg |
1542 | 1544 |
1543 | 1545 |
1544 if __name__ == '__main__': | 1546 if __name__ == '__main__': |
1545 sys.exit(main(sys.argv[1:])) | 1547 sys.exit(main(sys.argv[1:])) |
OLD | NEW |