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 logdog_command = [ | 1058 cmdline = ['../../build/android/test_wrapper/logdog_wrapper.py', |
1059 '--logdog-bin-cmd', './../../bin/logdog_butler', | 1059 '--target', target, |
1060 '--project', 'chromium', | 1060 '--logdog-bin-cmd', '../../bin/logdog_butler'] |
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': | 1061 if test_type != 'junit_test': |
1072 test_cmdline += ['--target-devices-file', '${SWARMING_BOT_FILE}',] | 1062 cmdline += ['--target-devices-file', '${SWARMING_BOT_FILE}'] |
1073 cmdline = (['./../../build/android/test_wrapper/logdog_wrapper.py'] | |
1074 + logdog_command + test_cmdline + ['-v']) | |
1075 else: | 1063 else: |
1076 extra_files = ['../../testing/test_env.py'] | 1064 extra_files = ['../../testing/test_env.py'] |
1077 | 1065 |
1078 # This needs to mirror the settings in //build/config/ui.gni: | 1066 # This needs to mirror the settings in //build/config/ui.gni: |
1079 # use_x11 = is_linux && !use_ozone. | 1067 # use_x11 = is_linux && !use_ozone. |
1080 use_x11 = is_linux and not 'use_ozone=true' in vals['gn_args'] | 1068 use_x11 = is_linux and not 'use_ozone=true' in vals['gn_args'] |
1081 | 1069 |
1082 xvfb = use_x11 and test_type == 'windowed_test_launcher' | 1070 xvfb = use_x11 and test_type == 'windowed_test_launcher' |
1083 if xvfb: | 1071 if xvfb: |
1084 extra_files += [ | 1072 extra_files += [ |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1543 # Then check to see if the arg contains any metacharacters other than | 1531 # Then check to see if the arg contains any metacharacters other than |
1544 # double quotes; if it does, quote everything (including the double | 1532 # double quotes; if it does, quote everything (including the double |
1545 # quotes) for safety. | 1533 # quotes) for safety. |
1546 if any(a in UNSAFE_FOR_CMD for a in arg): | 1534 if any(a in UNSAFE_FOR_CMD for a in arg): |
1547 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) | 1535 arg = ''.join('^' + a if a in ALL_META_CHARS else a for a in arg) |
1548 return arg | 1536 return arg |
1549 | 1537 |
1550 | 1538 |
1551 if __name__ == '__main__': | 1539 if __name__ == '__main__': |
1552 sys.exit(main(sys.argv[1:])) | 1540 sys.exit(main(sys.argv[1:])) |
OLD | NEW |