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 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1079 executable_suffix = '.exe' if self.platform == 'win32' else '' | 1079 executable_suffix = '.exe' if self.platform == 'win32' else '' |
| 1080 | 1080 |
| 1081 cmdline = [] | 1081 cmdline = [] |
| 1082 extra_files = [] | 1082 extra_files = [] |
| 1083 | 1083 |
| 1084 if test_type == 'nontest': | 1084 if test_type == 'nontest': |
| 1085 self.WriteFailureAndRaise('We should not be isolating %s.' % target, | 1085 self.WriteFailureAndRaise('We should not be isolating %s.' % target, |
| 1086 output_path=None) | 1086 output_path=None) |
| 1087 | 1087 |
| 1088 if android and test_type != "script": | 1088 if android and test_type != "script": |
| 1089 logdog_command = [ | |
| 1090 '--logdog-bin-cmd', './../../bin/logdog_butler', | |
| 1091 '--project', 'chromium', | |
| 1092 '--service-account-json', | |
| 1093 '/creds/service_accounts/service-account-luci-logdog-publisher.json', | |
| 1094 '--prefix', 'android/swarming/logcats/${SWARMING_TASK_ID}', | |
| 1095 '--source', '${ISOLATED_OUTDIR}/logcats', | |
| 1096 '--name', 'unified_logcats', | |
| 1097 ] | |
| 1098 test_cmdline = [ | 1089 test_cmdline = [ |
| 1099 self.PathJoin('bin', 'run_%s' % target), | 1090 self.PathJoin('bin', 'run_%s' % target), |
| 1100 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', | 1091 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', |
| 1101 '--target-devices-file', '${SWARMING_BOT_FILE}', | 1092 '--target-devices-file', '${SWARMING_BOT_FILE}', |
| 1102 '-v' | 1093 '-v', '--upload-full-logcat', '${ISOLATED_OUTDIR}/logcats'] |
| 1103 ] | 1094 project = 'chromium' |
| 1104 cmdline = (['./../../build/android/test_wrapper/logdog_wrapper.py'] | 1095 output = 'logdog,service="services"' |
| 1105 + logdog_command + test_cmdline) | 1096 coordinator_host = 'luci-logdog.appspot.com' |
| 1097 streamserver_uri = 'unix:/tmp/butler.sock' | |
|
dnj
2017/02/22 23:57:02
This is a really generic name for this. You should
BigBossZhiling
2017/02/27 19:43:17
Done.
| |
| 1098 prefix = 'android/swarming/logcats/${SWARMING_TASK_ID}' | |
| 1099 | |
| 1100 # Call test_cmdline through logdog butler subcommand. | |
| 1101 cmdline = [ | |
| 1102 '../../bin/logdog_butler', '-project', project, | |
| 1103 '-output', output, | |
| 1104 '-prefix', prefix, | |
| 1105 '-coordinator-host', coordinator_host, | |
| 1106 'run', '-streamserver-uri', streamserver_uri, '--'] + test_cmdline | |
|
dnj
2017/02/22 23:57:02
Break these like you did the above arguments.
BigBossZhiling
2017/02/27 19:43:17
Done.
| |
| 1106 elif use_xvfb and test_type == 'windowed_test_launcher': | 1107 elif use_xvfb and test_type == 'windowed_test_launcher': |
| 1107 extra_files = [ | 1108 extra_files = [ |
| 1108 '../../testing/test_env.py', | 1109 '../../testing/test_env.py', |
| 1109 '../../testing/xvfb.py', | 1110 '../../testing/xvfb.py', |
| 1110 ] | 1111 ] |
| 1111 cmdline = [ | 1112 cmdline = [ |
| 1112 '../../testing/xvfb.py', | 1113 '../../testing/xvfb.py', |
| 1113 './' + str(executable) + executable_suffix, | 1114 './' + str(executable) + executable_suffix, |
| 1114 '--brave-new-test-launcher', | 1115 '--brave-new-test-launcher', |
| 1115 '--test-launcher-bot-mode', | 1116 '--test-launcher-bot-mode', |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1569 # Then check to see if the arg contains any metacharacters other than | 1570 # Then check to see if the arg contains any metacharacters other than |
| 1570 # double quotes; if it does, quote everything (including the double | 1571 # double quotes; if it does, quote everything (including the double |
| 1571 # quotes) for safety. | 1572 # quotes) for safety. |
| 1572 if any(a in UNSAFE_FOR_CMD for a in arg): | 1573 if any(a in UNSAFE_FOR_CMD for a in arg): |
| 1573 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1574 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
| 1574 return arg | 1575 return arg |
| 1575 | 1576 |
| 1576 | 1577 |
| 1577 if __name__ == '__main__': | 1578 if __name__ == '__main__': |
| 1578 sys.exit(main(sys.argv[1:])) | 1579 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |