| OLD | NEW |
| 1 #! /usr/bin/env python | 1 #! /usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 """Set up and invoke telemetry tests.""" | 6 """Set up and invoke telemetry tests.""" |
| 7 | 7 |
| 8 import json | 8 import json |
| 9 import optparse | 9 import optparse |
| 10 import os | 10 import os |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 test_specification = [test_name] | 71 test_specification = [test_name] |
| 72 | 72 |
| 73 env = os.environ | 73 env = os.environ |
| 74 | 74 |
| 75 # List of command line arguments common to all test platforms. | 75 # List of command line arguments common to all test platforms. |
| 76 common_args = [ | 76 common_args = [ |
| 77 # INFO level verbosity. | 77 # INFO level verbosity. |
| 78 '-v', | 78 '-v', |
| 79 # Output results in the format the buildbot expects. | 79 # Output results in the format the buildbot expects. |
| 80 '--output-format=buildbot', | 80 '--chartjson', |
| 81 ] | 81 ] |
| 82 | 82 |
| 83 if profile_type: | 83 if profile_type: |
| 84 profile_dir = os.path.join( | 84 profile_dir = os.path.join( |
| 85 build_dir, target, 'generated_profile', profile_type) | 85 build_dir, target, 'generated_profile', profile_type) |
| 86 common_args.append('--profile-dir=' + profile_dir) | 86 common_args.append('--profile-dir=' + profile_dir) |
| 87 if extra_args: | 87 if extra_args: |
| 88 common_args.extend(extra_args) | 88 common_args.extend(extra_args) |
| 89 | 89 |
| 90 commands = [] | 90 commands = [] |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 continue | 174 continue |
| 175 | 175 |
| 176 retval = chromium_utils.RunCommand(command, env=env) | 176 retval = chromium_utils.RunCommand(command, env=env) |
| 177 if retval != 0: | 177 if retval != 0: |
| 178 break | 178 break |
| 179 return retval | 179 return retval |
| 180 | 180 |
| 181 | 181 |
| 182 if '__main__' == __name__: | 182 if '__main__' == __name__: |
| 183 sys.exit(main(sys.argv)) | 183 sys.exit(main(sys.argv)) |
| OLD | NEW |