| 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 import json | 6 import json |
| 7 import os | 7 import os |
| 8 import sys | 8 import sys |
| 9 | 9 |
| 10 | 10 |
| 11 import common | 11 import common |
| 12 | 12 |
| 13 | 13 |
| 14 def IsWindows(): |
| 15 return sys.platform == 'cygwin' or sys.platform.startswith('win') |
| 16 |
| 17 |
| 14 def main_run(args): | 18 def main_run(args): |
| 15 filter_tests = [] | 19 filter_tests = [] |
| 16 if args.filter_file: | 20 if args.filter_file: |
| 17 filter_tests = json.load(args.filter_file) | 21 filter_tests = json.load(args.filter_file) |
| 18 | 22 |
| 19 perf_id = args.properties.get('perf-id') | 23 perf_id = args.properties.get('perf-id') |
| 20 script_args = args.args | 24 script_args = args.args |
| 21 test_suite = script_args[0] | 25 test_suite = script_args[0] |
| 26 if IsWindows(): |
| 27 script_args[0] += '.exe' |
| 22 | 28 |
| 23 with common.temporary_file() as tempfile_path: | 29 with common.temporary_file() as tempfile_path: |
| 24 gtest_args = [ | 30 gtest_args = [ |
| 25 '--target', args.build_config_fs, | 31 '--target', args.build_config_fs, |
| 26 '--annotate', 'graphing', | 32 '--annotate', 'graphing', |
| 27 '--perf-id', perf_id, | 33 '--perf-id', perf_id, |
| 28 '--perf-dashboard-id', test_suite, | 34 '--perf-dashboard-id', test_suite, |
| 29 '--results-url', args.properties.get('results-url'), | 35 '--results-url', args.properties.get('results-url'), |
| 30 '--slave-name', args.properties.get('slavename'), | 36 '--slave-name', args.properties.get('slavename'), |
| 31 '--builder-name', args.properties.get('buildername'), | 37 '--builder-name', args.properties.get('buildername'), |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 else: | 72 else: |
| 67 json.dump(['$name'], args.output) | 73 json.dump(['$name'], args.output) |
| 68 | 74 |
| 69 | 75 |
| 70 if __name__ == '__main__': | 76 if __name__ == '__main__': |
| 71 funcs = { | 77 funcs = { |
| 72 'run': main_run, | 78 'run': main_run, |
| 73 'compile_targets': main_compile_targets, | 79 'compile_targets': main_compile_targets, |
| 74 } | 80 } |
| 75 sys.exit(common.run_script(sys.argv[1:], funcs)) | 81 sys.exit(common.run_script(sys.argv[1:], funcs)) |
| OLD | NEW |