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