OLD | NEW |
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 993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1004 target_name = self.GNTargetName(target) | 1004 target_name = self.GNTargetName(target) |
1005 test_type = gn_isolate_map[target_name]['type'] | 1005 test_type = gn_isolate_map[target_name]['type'] |
1006 | 1006 |
1007 executable = gn_isolate_map[target_name].get('executable', target_name) | 1007 executable = gn_isolate_map[target_name].get('executable', target_name) |
1008 executable_suffix = '.exe' if self.platform == 'win32' else '' | 1008 executable_suffix = '.exe' if self.platform == 'win32' else '' |
1009 | 1009 |
1010 cmdline = [] | 1010 cmdline = [] |
1011 extra_files = [] | 1011 extra_files = [] |
1012 | 1012 |
1013 if android and test_type != "script": | 1013 if android and test_type != "script": |
1014 cmdline = [ | 1014 logdog_command = [ |
| 1015 '--logdog-bin-cmd', './../../bin/logdog_butler', |
| 1016 '--project', 'chromium', |
| 1017 '--service-account-json', |
| 1018 '/creds/service_accounts/service-account-luci-logdog-publisher.json', |
| 1019 '--prefix', 'android/swarming/logcats/${SWARMING_TASK_ID}', |
| 1020 '--source', '${ISOLATED_OUTDIR}/logcats', |
| 1021 '--name', 'unified_logcats', |
| 1022 ] |
| 1023 test_cmdline = [ |
1015 self.PathJoin('bin', 'run_%s' % target_name), | 1024 self.PathJoin('bin', 'run_%s' % target_name), |
1016 '--logcat-output-dir', '${ISOLATED_OUTDIR}/logcats', | 1025 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', |
1017 '--target-devices-file', '${SWARMING_BOT_FILE}', | 1026 '--target-devices-file', '${SWARMING_BOT_FILE}', |
1018 '-v', | 1027 '-v' |
1019 ] | 1028 ] |
| 1029 cmdline = (['./../../build/android/test_wrapper/logdog_wrapper.py'] |
| 1030 + logdog_command + test_cmdline) |
1020 elif use_x11 and test_type == 'windowed_test_launcher': | 1031 elif use_x11 and test_type == 'windowed_test_launcher': |
1021 extra_files = [ | 1032 extra_files = [ |
1022 'xdisplaycheck', | 1033 'xdisplaycheck', |
1023 '../../testing/test_env.py', | 1034 '../../testing/test_env.py', |
1024 '../../testing/xvfb.py', | 1035 '../../testing/xvfb.py', |
1025 ] | 1036 ] |
1026 cmdline = [ | 1037 cmdline = [ |
1027 '../../testing/xvfb.py', | 1038 '../../testing/xvfb.py', |
1028 '.', | 1039 '.', |
1029 './' + str(executable) + executable_suffix, | 1040 './' + str(executable) + executable_suffix, |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1502 # Then check to see if the arg contains any metacharacters other than | 1513 # Then check to see if the arg contains any metacharacters other than |
1503 # double quotes; if it does, quote everything (including the double | 1514 # double quotes; if it does, quote everything (including the double |
1504 # quotes) for safety. | 1515 # quotes) for safety. |
1505 if any(a in UNSAFE_FOR_CMD for a in arg): | 1516 if any(a in UNSAFE_FOR_CMD for a in arg): |
1506 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1517 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
1507 return arg | 1518 return arg |
1508 | 1519 |
1509 | 1520 |
1510 if __name__ == '__main__': | 1521 if __name__ == '__main__': |
1511 sys.exit(main(sys.argv[1:])) | 1522 sys.exit(main(sys.argv[1:])) |
OLD | NEW |