| 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 GM executable. """ | 6 """ Run the Skia GM executable. """ |
| 7 | 7 |
| 8 from build_step import BuildStep | 8 from build_step import BuildStep |
| 9 import build_step | 9 import build_step |
| 10 import os |
| 10 import sys | 11 import sys |
| 11 | 12 |
| 12 | 13 |
| 13 JSON_SUMMARY_FILENAME = 'actual-results.json' | 14 JSON_SUMMARY_FILENAME = 'actual-results.json' |
| 14 | 15 |
| 15 | 16 |
| 16 class RunGM(BuildStep): | 17 class RunGM(BuildStep): |
| 17 def __init__(self, timeout=9600, no_output_timeout=9600, **kwargs): | 18 def __init__(self, timeout=9600, no_output_timeout=9600, **kwargs): |
| 18 super(RunGM, self).__init__( | 19 super(RunGM, self).__init__( |
| 19 timeout=timeout, no_output_timeout=no_output_timeout, **kwargs) | 20 timeout=timeout, no_output_timeout=no_output_timeout, **kwargs) |
| 20 | 21 |
| 21 def _Run(self): | 22 def _Run(self): |
| 22 output_dir = self._flavor_utils.DevicePathJoin( | 23 output_dir = os.path.join(self._device_dirs.GMActualDir(), |
| 23 self._device_dirs.GMActualDir(), self._builder_name) | 24 self._builder_name) |
| 24 cmd = ['--verbose', | 25 cmd = ['--verbose', |
| 25 '--writeChecksumBasedFilenames', | 26 '--writeChecksumBasedFilenames', |
| 26 # Don't bother writing out image files that match our expectations-- | 27 # Don't bother writing out image files that match our expectations-- |
| 27 # we know that previous runs have already uploaded those! | 28 # we know that previous runs have already uploaded those! |
| 28 '--mismatchPath', output_dir, | 29 '--mismatchPath', output_dir, |
| 29 '--missingExpectationsPath', output_dir, | 30 '--missingExpectationsPath', output_dir, |
| 30 '--writeJsonSummaryPath', self._flavor_utils.DevicePathJoin( | 31 '--writeJsonSummaryPath', os.path.join(output_dir, |
| 31 output_dir, JSON_SUMMARY_FILENAME), | 32 JSON_SUMMARY_FILENAME), |
| 32 '--ignoreErrorTypes', | 33 '--ignoreErrorTypes', |
| 33 'IntentionallySkipped', 'MissingExpectations', | 34 'IntentionallySkipped', 'MissingExpectations', |
| 34 'ExpectationsMismatch', | 35 'ExpectationsMismatch', |
| 35 '--resourcePath', self._device_dirs.ResourceDir(), | 36 '--resourcePath', self._device_dirs.ResourceDir(), |
| 36 ] + self._gm_args | 37 ] + self._gm_args |
| 37 | 38 |
| 38 device_gm_expectations_path = self._flavor_utils.DevicePathJoin( | 39 device_gm_expectations_path = self._flavor_utils.DevicePathJoin( |
| 39 self._device_dirs.GMExpectedDir(), build_step.GM_EXPECTATIONS_FILENAME) | 40 self._device_dirs.GMExpectedDir(), build_step.GM_EXPECTATIONS_FILENAME) |
| 40 if self._flavor_utils.DevicePathExists(device_gm_expectations_path): | 41 if self._flavor_utils.DevicePathExists(device_gm_expectations_path): |
| 41 cmd.extend(['--readPath', device_gm_expectations_path]) | 42 cmd.extend(['--readPath', device_gm_expectations_path]) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 '~scaled_tilemodes', | 97 '~scaled_tilemodes', |
| 97 '~convexpaths', | 98 '~convexpaths', |
| 98 '~clipped-bitmap', | 99 '~clipped-bitmap', |
| 99 '~xfermodes3']) | 100 '~xfermodes3']) |
| 100 | 101 |
| 101 self._flavor_utils.RunFlavoredCmd('gm', cmd) | 102 self._flavor_utils.RunFlavoredCmd('gm', cmd) |
| 102 | 103 |
| 103 | 104 |
| 104 if '__main__' == __name__: | 105 if '__main__' == __name__: |
| 105 sys.exit(BuildStep.RunBuildStep(RunGM)) | 106 sys.exit(BuildStep.RunBuildStep(RunGM)) |
| OLD | NEW |