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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1003 target_name = self.GNTargetName(target) | 1003 target_name = self.GNTargetName(target) |
1004 test_type = gn_isolate_map[target_name]['type'] | 1004 test_type = gn_isolate_map[target_name]['type'] |
1005 | 1005 |
1006 executable = gn_isolate_map[target_name].get('executable', target_name) | 1006 executable = gn_isolate_map[target_name].get('executable', target_name) |
1007 executable_suffix = '.exe' if self.platform == 'win32' else '' | 1007 executable_suffix = '.exe' if self.platform == 'win32' else '' |
1008 | 1008 |
1009 cmdline = [] | 1009 cmdline = [] |
1010 extra_files = [] | 1010 extra_files = [] |
1011 | 1011 |
1012 if android and test_type != "script": | 1012 if android and test_type != "script": |
1013 logdog_command = [ | |
1014 './../../bin/logdog_butler', | |
1015 '-project', 'chromium', | |
1016 '-output', 'logdog,host=luci-logdog-dev.appspot.com', | |
1017 #'-service-account-json', | |
ghost stip (do not use)
2016/07/27 01:14:18
don't commit commented-out code
nicholaslin
2016/07/27 19:08:06
This will be uncommented before deployment. Hopefu
| |
1018 #'/creds/service_accounts/service-account-luci-logdog-publisher.json' | |
1019 '-prefix', 'android/swarming/logcats/${SWARMING_TASK_ID}', | |
1020 'stream', '-source', '${ISOLATED_OUTDIR}/logcats', | |
1021 '-stream', '-name=unified_logcats' | |
1022 ] | |
1023 test_cmdline = [ | |
1024 self.PathJoin('bin', 'run_%s' % target_name), | |
1025 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', | |
1026 '--target-devices-file', '${SWARMING_BOT_FILE}', | |
1027 '-v' | |
1028 ] | |
1013 cmdline = [ | 1029 cmdline = [ |
1014 self.PathJoin('bin', 'run_%s' % target_name), | 1030 './../../build/android/test_wrapper/test_runner_wrapper.py', |
1015 '--logcat-output-dir', '${ISOLATED_OUTDIR}/logcats', | 1031 '--test-runner-command', ' '.join(test_cmdline), |
ghost stip (do not use)
2016/07/27 01:14:18
this should just be the arguments of the program.
nicholaslin
2016/07/27 19:08:06
Done.
| |
1016 '--target-devices-file', '${SWARMING_BOT_FILE}', | 1032 '--logdog-command', ' '.join(logdog_command), |
1017 '-v', | |
1018 ] | 1033 ] |
1019 elif use_x11 and test_type == 'windowed_test_launcher': | 1034 elif use_x11 and test_type == 'windowed_test_launcher': |
1020 extra_files = [ | 1035 extra_files = [ |
1021 'xdisplaycheck', | 1036 'xdisplaycheck', |
1022 '../../testing/test_env.py', | 1037 '../../testing/test_env.py', |
1023 '../../testing/xvfb.py', | 1038 '../../testing/xvfb.py', |
1024 ] | 1039 ] |
1025 cmdline = [ | 1040 cmdline = [ |
1026 '../../testing/xvfb.py', | 1041 '../../testing/xvfb.py', |
1027 '.', | 1042 '.', |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1501 # Then check to see if the arg contains any metacharacters other than | 1516 # Then check to see if the arg contains any metacharacters other than |
1502 # double quotes; if it does, quote everything (including the double | 1517 # double quotes; if it does, quote everything (including the double |
1503 # quotes) for safety. | 1518 # quotes) for safety. |
1504 if any(a in UNSAFE_FOR_CMD for a in arg): | 1519 if any(a in UNSAFE_FOR_CMD for a in arg): |
1505 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1520 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
1506 return arg | 1521 return arg |
1507 | 1522 |
1508 | 1523 |
1509 if __name__ == '__main__': | 1524 if __name__ == '__main__': |
1510 sys.exit(main(sys.argv[1:])) | 1525 sys.exit(main(sys.argv[1:])) |
OLD | NEW |