Chromium Code Reviews| 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 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 988 target_name = self.GNTargetName(target) | 988 target_name = self.GNTargetName(target) |
| 989 test_type = gn_isolate_map[target_name]['type'] | 989 test_type = gn_isolate_map[target_name]['type'] |
| 990 | 990 |
| 991 executable = gn_isolate_map[target_name].get('executable', target_name) | 991 executable = gn_isolate_map[target_name].get('executable', target_name) |
| 992 executable_suffix = '.exe' if self.platform == 'win32' else '' | 992 executable_suffix = '.exe' if self.platform == 'win32' else '' |
| 993 | 993 |
| 994 cmdline = [] | 994 cmdline = [] |
| 995 extra_files = [] | 995 extra_files = [] |
| 996 | 996 |
| 997 if android and test_type != "script": | 997 if android and test_type != "script": |
| 998 logdog_command = [ | |
| 999 './../../bin/logdog_butler', | |
| 1000 '-project', 'chromium', | |
| 1001 '-output', 'logdog,host=luci-logdog.appspot.com', | |
| 1002 '-service-account-json', | |
| 1003 '/creds/service_accounts/service-account-luci-logdog-publisher.json' | |
| 1004 ] | |
| 1005 stream_command = [ | |
| 1006 'stream', '-source', '${ISOLATED_OUTDIR}/logcats', | |
| 1007 ] | |
| 998 cmdline = [ | 1008 cmdline = [ |
| 999 self.PathJoin('bin', 'run_%s' % target_name), | 1009 self.PathJoin('bin', 'run_%s' % target_name), |
| 1000 '--logcat-output-dir', '${ISOLATED_OUTDIR}/logcats', | 1010 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', |
|
nicholaslin
2016/07/20 03:04:13
another option here would be to keep the logcat-ou
| |
| 1001 '--target-devices-file', '${SWARMING_BOT_FILE}', | 1011 '--target-devices-file', '${SWARMING_BOT_FILE}', |
| 1002 '-v', | 1012 '--logdog-command', ' '.join(logdog_command), |
| 1013 '--logdog-stream', ' '.join(stream_command), | |
| 1014 '-v' | |
| 1003 ] | 1015 ] |
| 1004 elif use_x11 and test_type == 'windowed_test_launcher': | 1016 elif use_x11 and test_type == 'windowed_test_launcher': |
| 1005 extra_files = [ | 1017 extra_files = [ |
| 1006 'xdisplaycheck', | 1018 'xdisplaycheck', |
| 1007 '../../testing/test_env.py', | 1019 '../../testing/test_env.py', |
| 1008 '../../testing/xvfb.py', | 1020 '../../testing/xvfb.py', |
| 1009 ] | 1021 ] |
| 1010 cmdline = [ | 1022 cmdline = [ |
| 1011 '../../testing/xvfb.py', | 1023 '../../testing/xvfb.py', |
| 1012 '.', | 1024 '.', |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1486 # Then check to see if the arg contains any metacharacters other than | 1498 # Then check to see if the arg contains any metacharacters other than |
| 1487 # double quotes; if it does, quote everything (including the double | 1499 # double quotes; if it does, quote everything (including the double |
| 1488 # quotes) for safety. | 1500 # quotes) for safety. |
| 1489 if any(a in UNSAFE_FOR_CMD for a in arg): | 1501 if any(a in UNSAFE_FOR_CMD for a in arg): |
| 1490 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1502 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
| 1491 return arg | 1503 return arg |
| 1492 | 1504 |
| 1493 | 1505 |
| 1494 if __name__ == '__main__': | 1506 if __name__ == '__main__': |
| 1495 sys.exit(main(sys.argv[1:])) | 1507 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |