| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 | 2 |
| 3 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 3 # Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| 4 # | 4 # |
| 5 # Use of this source code is governed by a BSD-style license | 5 # Use of this source code is governed by a BSD-style license |
| 6 # that can be found in the LICENSE file in the root of the source | 6 # that can be found in the LICENSE file in the root of the source |
| 7 # tree. An additional intellectual property rights grant can be found | 7 # tree. An additional intellectual property rights grant can be found |
| 8 # in the file PATENTS. All contributing project authors may | 8 # in the file PATENTS. All contributing project authors may |
| 9 # be found in the AUTHORS file in the root of the source tree. | 9 # be found in the AUTHORS file in the root of the source tree. |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 def CatFiles(file_list, output_file): | 58 def CatFiles(file_list, output_file): |
| 59 with open(output_file, 'w') as output_file: | 59 with open(output_file, 'w') as output_file: |
| 60 for filename in file_list: | 60 for filename in file_list: |
| 61 with open(filename) as input_file: | 61 with open(filename) as input_file: |
| 62 output_file.write(input_file.read()) | 62 output_file.write(input_file.read()) |
| 63 os.remove(filename) | 63 os.remove(filename) |
| 64 | 64 |
| 65 | 65 |
| 66 def get_args_and_env(): | 66 def get_args_and_env(): |
| 67 if '--' not in sys.argv: | 67 if '--' in sys.argv: |
| 68 return sys.argv, os.environ | 68 argv_index = sys.argv.index('--') |
| 69 | 69 else: |
| 70 argv_index = sys.argv.index('--') | 70 argv_index = len(sys.argv) |
| 71 | 71 |
| 72 gtest_parallel_args = sys.argv[1:argv_index] | 72 gtest_parallel_args = sys.argv[1:argv_index] |
| 73 executable_args = sys.argv[argv_index + 1:] | 73 executable_args = sys.argv[argv_index + 1:] |
| 74 | 74 |
| 75 parser = argparse.ArgumentParser() | 75 parser = argparse.ArgumentParser() |
| 76 parser.add_argument('--isolated-script-test-output', type=str, default=None) | 76 parser.add_argument('--isolated-script-test-output', type=str, default=None) |
| 77 | 77 |
| 78 # We don't need to implement this flag, and possibly can't, since it's | 78 # We don't need to implement this flag, and possibly can't, since it's |
| 79 # intended for results of Telemetry tests. See | 79 # intended for results of Telemetry tests. See |
| 80 # https://chromium.googlesource.com/external/github.com/catapult-project/catap
ult/+/HEAD/dashboard/docs/data-format.md | 80 # https://chromium.googlesource.com/external/github.com/catapult-project/catap
ult/+/HEAD/dashboard/docs/data-format.md |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 logs = [os.path.join(logs_dir, log) for log in os.listdir(logs_dir)] | 145 logs = [os.path.join(logs_dir, log) for log in os.listdir(logs_dir)] |
| 146 log_file = os.path.join(output_dir, '%s-tests.log' % test_status) | 146 log_file = os.path.join(output_dir, '%s-tests.log' % test_status) |
| 147 CatFiles(logs, log_file) | 147 CatFiles(logs, log_file) |
| 148 os.rmdir(logs_dir) | 148 os.rmdir(logs_dir) |
| 149 | 149 |
| 150 return exit_code | 150 return exit_code |
| 151 | 151 |
| 152 | 152 |
| 153 if __name__ == '__main__': | 153 if __name__ == '__main__': |
| 154 sys.exit(main()) | 154 sys.exit(main()) |
| OLD | NEW |