| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 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 """Run the Skia benchmarking executable.""" | 6 """Run the Skia benchmarking executable.""" |
| 7 | 7 |
| 8 import os | 8 import os |
| 9 import sys | 9 import sys |
| 10 | 10 |
| 11 from build_step import BuildStep | 11 from build_step import BuildStep |
| 12 from utils import gclient_utils | 12 from utils import gclient_utils |
| 13 from utils import misc |
| 13 | 14 |
| 14 GIT = 'git.bat' if os.name == 'nt' else 'git' | 15 GIT = 'git.bat' if os.name == 'nt' else 'git' |
| 15 GIT_SVN_ID_MATCH_STR = r'git-svn-id: http://skia.googlecode.com/svn/trunk@(\d+)' | 16 GIT_SVN_ID_MATCH_STR = r'git-svn-id: http://skia.googlecode.com/svn/trunk@(\d+)' |
| 16 | 17 |
| 17 | 18 |
| 18 def BenchArgs(data_file): | 19 def BenchArgs(data_file): |
| 19 """Builds a list containing arguments to pass to bench. | 20 """Builds a list containing arguments to pass to bench. |
| 20 | 21 |
| 21 Args: | 22 Args: |
| 22 data_file: filepath to store the log output | 23 data_file: filepath to store the log output |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 # Add --outResultsFile flag here because it breaks bench_pictures.py | 64 # Add --outResultsFile flag here because it breaks bench_pictures.py |
| 64 # if it was placed in there. | 65 # if it was placed in there. |
| 65 for builder_name_or_fragment in EXTRA_ARGS: | 66 for builder_name_or_fragment in EXTRA_ARGS: |
| 66 if builder_name_or_fragment in self._builder_name: | 67 if builder_name_or_fragment in self._builder_name: |
| 67 args.extend(EXTRA_ARGS[builder_name_or_fragment]) | 68 args.extend(EXTRA_ARGS[builder_name_or_fragment]) |
| 68 self._flavor_utils.RunFlavoredCmd('bench', args + self._bench_args) | 69 self._flavor_utils.RunFlavoredCmd('bench', args + self._bench_args) |
| 69 | 70 |
| 70 | 71 |
| 71 if '__main__' == __name__: | 72 if '__main__' == __name__: |
| 72 sys.exit(BuildStep.RunBuildStep(RunBench)) | 73 sys.exit(BuildStep.RunBuildStep(RunBench)) |
| OLD | NEW |