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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
612 if 'type' not in vals: | 612 if 'type' not in vals: |
613 vals['type'] = 'gn' | 613 vals['type'] = 'gn' |
614 assert vals['type'] in ('gn', 'gyp'), ( | 614 assert vals['type'] in ('gn', 'gyp'), ( |
615 'Unknown meta-build type "%s"' % vals['gn_args']) | 615 'Unknown meta-build type "%s"' % vals['gn_args']) |
616 | 616 |
617 return vals | 617 return vals |
618 | 618 |
619 def ReadIOSBotConfig(self): | 619 def ReadIOSBotConfig(self): |
620 if not self.args.master or not self.args.builder: | 620 if not self.args.master or not self.args.builder: |
621 return {} | 621 return {} |
622 path = self.PathJoin(self.src_dir, 'tools-webrtc', 'ios', | 622 path = self.PathJoin(self.src_dir, 'tools_webrtc', 'ios', |
623 self.args.master, | 623 self.args.master, |
624 self.args.builder.replace(' ', '_') + '.json') | 624 self.args.builder.replace(' ', '_') + '.json') |
625 if not self.Exists(path): | 625 if not self.Exists(path): |
626 return {} | 626 return {} |
627 | 627 |
628 contents = json.loads(self.ReadFile(path)) | 628 contents = json.loads(self.ReadFile(path)) |
629 gyp_vals = contents.get('GYP_DEFINES', {}) | 629 gyp_vals = contents.get('GYP_DEFINES', {}) |
630 if isinstance(gyp_vals, dict): | 630 if isinstance(gyp_vals, dict): |
631 gyp_defines = ' '.join('%s=%s' % (k, v) for k, v in gyp_vals.items()) | 631 gyp_defines = ' '.join('%s=%s' % (k, v) for k, v in gyp_vals.items()) |
632 else: | 632 else: |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1070 xvfb = use_x11 and test_type == 'windowed_test_launcher' | 1070 xvfb = use_x11 and test_type == 'windowed_test_launcher' |
1071 if xvfb: | 1071 if xvfb: |
1072 extra_files += [ | 1072 extra_files += [ |
1073 '../../testing/xvfb.py', | 1073 '../../testing/xvfb.py', |
1074 ] | 1074 ] |
1075 | 1075 |
1076 # Memcheck is only supported for linux. Ignore in other platforms. | 1076 # Memcheck is only supported for linux. Ignore in other platforms. |
1077 memcheck = is_linux and 'rtc_use_memcheck=true' in vals['gn_args'] | 1077 memcheck = is_linux and 'rtc_use_memcheck=true' in vals['gn_args'] |
1078 memcheck_cmdline = [ | 1078 memcheck_cmdline = [ |
1079 'bash', | 1079 'bash', |
1080 '../../tools-webrtc/valgrind/webrtc_tests.sh', | 1080 '../../tools_webrtc/valgrind/webrtc_tests.sh', |
1081 '--tool', | 1081 '--tool', |
1082 'memcheck', | 1082 'memcheck', |
1083 '--target', | 1083 '--target', |
1084 'Release', | 1084 'Release', |
1085 '--build-dir', | 1085 '--build-dir', |
1086 '..', | 1086 '..', |
1087 '--test', | 1087 '--test', |
1088 ] | 1088 ] |
1089 | 1089 |
1090 if not memcheck: | 1090 if not memcheck: |
1091 extra_files += [ | 1091 extra_files += [ |
1092 '../../third_party/gtest-parallel/gtest-parallel', | 1092 '../../third_party/gtest-parallel/gtest-parallel', |
1093 '../../tools-webrtc/gtest-parallel-wrapper.py', | 1093 '../../tools_webrtc/gtest-parallel-wrapper.py', |
1094 ] | 1094 ] |
1095 sep = '\\' if self.platform == 'win32' else '/' | 1095 sep = '\\' if self.platform == 'win32' else '/' |
1096 output_dir = '${ISOLATED_OUTDIR}' + sep + 'test_logs' | 1096 output_dir = '${ISOLATED_OUTDIR}' + sep + 'test_logs' |
1097 gtest_parallel_wrapper = [ | 1097 gtest_parallel_wrapper = [ |
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 '--retry_failed=3', | 1105 '--retry_failed=3', |
1106 ] | 1106 ] |
1107 | 1107 |
1108 asan = 'is_asan=true' in vals['gn_args'] | 1108 asan = 'is_asan=true' in vals['gn_args'] |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1539 # 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 |
1540 # double quotes; if it does, quote everything (including the double | 1540 # double quotes; if it does, quote everything (including the double |
1541 # quotes) for safety. | 1541 # quotes) for safety. |
1542 if any(a in UNSAFE_FOR_CMD for a in arg): | 1542 if any(a in UNSAFE_FOR_CMD for a in arg): |
1543 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) |
1544 return arg | 1544 return arg |
1545 | 1545 |
1546 | 1546 |
1547 if __name__ == '__main__': | 1547 if __name__ == '__main__': |
1548 sys.exit(main(sys.argv[1:])) | 1548 sys.exit(main(sys.argv[1:])) |
OLD | NEW |