Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(509)

Side by Side Diff: slave/skia_slave_scripts/run_decoding_tests.py

Issue 26824003: Write skimage results to full builder_name. (Closed) Base URL: https://skia.googlecode.com/svn/buildbot
Patch Set: Respond to comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 skimage executable. """ 6 """ Run the Skia skimage executable. """
7 7
8 from build_step import BuildStep, BuildStepFailure, GM_EXPECTATIONS_FILENAME 8 from build_step import BuildStep, BuildStepFailure, GM_EXPECTATIONS_FILENAME
9 # builder_name_schema must be imported after build_step so the PYTHONPATH will 9 # builder_name_schema must be imported after build_step so the PYTHONPATH will
10 # be set properly to import it. 10 # be set properly to import it.
11 import builder_name_schema 11 import builder_name_schema
12 import run_gm 12 import run_gm
13 import sys 13 import sys
14 14
15 class RunDecodingTests(BuildStep): 15 class RunDecodingTests(BuildStep):
16 def _Run(self): 16 def _Run(self):
17 cmd = ['-r', self._device_dirs.SKImageInDir(), '--noreencode'] 17 cmd = ['-r', self._device_dirs.SKImageInDir(), '--noreencode']
18 18
19 subdir = builder_name_schema.GetWaterfallBot(self._builder_name)
20
21 # Read expectations, which were downloaded/copied to the device. 19 # Read expectations, which were downloaded/copied to the device.
20 # If this bot is a trybot, read the expected results of the waterfall bot.
22 expectations_file = self._flavor_utils.DevicePathJoin( 21 expectations_file = self._flavor_utils.DevicePathJoin(
23 self._device_dirs.SKImageExpectedDir(), subdir, 22 self._device_dirs.SKImageExpectedDir(),
23 builder_name_schema.GetWaterfallBot(self._builder_name),
24 GM_EXPECTATIONS_FILENAME) 24 GM_EXPECTATIONS_FILENAME)
25 25
26 have_expectations = self._flavor_utils.DevicePathExists(expectations_file) 26 have_expectations = self._flavor_utils.DevicePathExists(expectations_file)
27 if have_expectations: 27 if have_expectations:
28 cmd.extend(['--readExpectationsPath', expectations_file]) 28 cmd.extend(['--readExpectationsPath', expectations_file])
29 29
30 # Write the expectations file, in case any did not match. 30 # Write the expectations file, in case any did not match.
31 device_subdir = self._flavor_utils.DevicePathJoin( 31 device_subdir = self._flavor_utils.DevicePathJoin(
32 self._device_dirs.SKImageOutDir(), subdir) 32 self._device_dirs.SKImageOutDir(), self._builder_name)
33 self._flavor_utils.CreateCleanDeviceDirectory(device_subdir) 33 self._flavor_utils.CreateCleanDeviceDirectory(device_subdir)
34 output_expectations_file = self._flavor_utils.DevicePathJoin( 34 output_expectations_file = self._flavor_utils.DevicePathJoin(
35 device_subdir, run_gm.JSON_SUMMARY_FILENAME) 35 device_subdir, run_gm.JSON_SUMMARY_FILENAME)
36 36
37 cmd.extend(['--createExpectationsPath', output_expectations_file]) 37 cmd.extend(['--createExpectationsPath', output_expectations_file])
38 38
39 # Draw any mismatches to the same folder as the output json. 39 # Draw any mismatches to the same folder as the output json.
40 cmd.extend(['--mismatchPath', self._device_dirs.SKImageOutDir()]) 40 cmd.extend(['--mismatchPath', self._device_dirs.SKImageOutDir()])
41 41
42 self._flavor_utils.RunFlavoredCmd('skimage', cmd) 42 self._flavor_utils.RunFlavoredCmd('skimage', cmd)
43 43
44 # If there is no expectations file, still run the tests, and then report a 44 # If there is no expectations file, still run the tests, and then report a
45 # failure. Then we'll know to update the expectations with the results of 45 # failure. Then we'll know to update the expectations with the results of
46 # running the tests. 46 # running the tests.
47 if not have_expectations: 47 if not have_expectations:
48 raise BuildStepFailure("Missing expectations file " + expectations_file) 48 raise BuildStepFailure("Missing expectations file " + expectations_file)
49 49
50 if '__main__' == __name__: 50 if '__main__' == __name__:
51 sys.exit(BuildStep.RunBuildStep(RunDecodingTests)) 51 sys.exit(BuildStep.RunBuildStep(RunDecodingTests))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698