| 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 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 if test_type not in ('console_test_launcher', 'windowed_test_launcher', | 1048 if test_type not in ('console_test_launcher', 'windowed_test_launcher', |
| 1049 'non_parallel_console_test_launcher', | 1049 'non_parallel_console_test_launcher', |
| 1050 'additional_compile_target', 'junit_test'): | 1050 'additional_compile_target', 'junit_test'): |
| 1051 self.WriteFailureAndRaise('No command line for %s found (test type %s).' | 1051 self.WriteFailureAndRaise('No command line for %s found (test type %s).' |
| 1052 % (target, test_type), output_path=None) | 1052 % (target, test_type), output_path=None) |
| 1053 | 1053 |
| 1054 cmdline = [] | 1054 cmdline = [] |
| 1055 extra_files = [] | 1055 extra_files = [] |
| 1056 | 1056 |
| 1057 if android: | 1057 if android: |
| 1058 cmdline = ['./../../build/android/test_wrapper/logdog_wrapper.py', | 1058 logdog_command = [ |
| 1059 '--target', target, | 1059 '--logdog-bin-cmd', './../../bin/logdog_butler', |
| 1060 '--logdog-bin-cmd', '../../bin/logdog_butler'] | 1060 '--project', 'chromium', |
| 1061 '--service-account-json', |
| 1062 '/creds/service_accounts/service-account-luci-logdog-publisher.json', |
| 1063 '--prefix', 'android/swarming/logcats/${SWARMING_TASK_ID}', |
| 1064 '--source', '${ISOLATED_OUTDIR}/logcats', |
| 1065 '--name', 'unified_logcats', |
| 1066 ] |
| 1067 test_cmdline = [ |
| 1068 self.PathJoin('bin', 'run_%s' % target), |
| 1069 '--logcat-output-file', '${ISOLATED_OUTDIR}/logcats', |
| 1070 ] |
| 1071 if test_type != 'junit_test': |
| 1072 test_cmdline += ['--target-devices-file', '${SWARMING_BOT_FILE}',] |
| 1073 cmdline = (['./../../build/android/test_wrapper/logdog_wrapper.py'] |
| 1074 + logdog_command + test_cmdline + ['-v']) |
| 1061 else: | 1075 else: |
| 1062 extra_files = ['../../testing/test_env.py'] | 1076 extra_files = ['../../testing/test_env.py'] |
| 1063 | 1077 |
| 1064 # This needs to mirror the settings in //build/config/ui.gni: | 1078 # This needs to mirror the settings in //build/config/ui.gni: |
| 1065 # use_x11 = is_linux && !use_ozone. | 1079 # use_x11 = is_linux && !use_ozone. |
| 1066 use_x11 = is_linux and not 'use_ozone=true' in vals['gn_args'] | 1080 use_x11 = is_linux and not 'use_ozone=true' in vals['gn_args'] |
| 1067 | 1081 |
| 1068 xvfb = use_x11 and test_type == 'windowed_test_launcher' | 1082 xvfb = use_x11 and test_type == 'windowed_test_launcher' |
| 1069 if xvfb: | 1083 if xvfb: |
| 1070 extra_files += [ | 1084 extra_files += [ |
| (...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 # Then check to see if the arg contains any metacharacters other than | 1541 # Then check to see if the arg contains any metacharacters other than |
| 1528 # double quotes; if it does, quote everything (including the double | 1542 # double quotes; if it does, quote everything (including the double |
| 1529 # quotes) for safety. | 1543 # quotes) for safety. |
| 1530 if any(a in UNSAFE_FOR_CMD for a in arg): | 1544 if any(a in UNSAFE_FOR_CMD for a in arg): |
| 1531 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1545 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
| 1532 return arg | 1546 return arg |
| 1533 | 1547 |
| 1534 | 1548 |
| 1535 if __name__ == '__main__': | 1549 if __name__ == '__main__': |
| 1536 sys.exit(main(sys.argv[1:])) | 1550 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |