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

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

Issue 27389002: Write skimage output to checksum filenames. (Closed) Base URL: https://skia.googlecode.com/svn/buildbot
Patch Set: 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 | slave/skia_slave_scripts/upload_skimage_results.py » ('j') | 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
epoger 2013/10/17 16:04:32 If you modify the BUG line in the description as f
scroggo 2013/10/18 14:36:07 Done.
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 '--writeChecksumBasedFilenames', '--config 8888']
epoger 2013/10/17 16:04:32 I don't know if this will work ('--config 8888' mi
scroggo 2013/10/18 14:36:07 Done.
18 19
19 # Read expectations, which were downloaded/copied to the device. 20 # Read expectations, which were downloaded/copied to the device.
20 # If this bot is a trybot, read the expected results of the waterfall bot. 21 # If this bot is a trybot, read the expected results of the waterfall bot.
21 expectations_file = self._flavor_utils.DevicePathJoin( 22 expectations_file = self._flavor_utils.DevicePathJoin(
22 self._device_dirs.SKImageExpectedDir(), 23 self._device_dirs.SKImageExpectedDir(),
23 builder_name_schema.GetWaterfallBot(self._builder_name), 24 builder_name_schema.GetWaterfallBot(self._builder_name),
24 GM_EXPECTATIONS_FILENAME) 25 GM_EXPECTATIONS_FILENAME)
25 26
26 have_expectations = self._flavor_utils.DevicePathExists(expectations_file) 27 have_expectations = self._flavor_utils.DevicePathExists(expectations_file)
27 if have_expectations: 28 if have_expectations:
28 cmd.extend(['--readExpectationsPath', expectations_file]) 29 cmd.extend(['--readExpectationsPath', expectations_file])
29 30
30 # Write the expectations file, in case any did not match. 31 # Write the expectations file, in case any did not match.
31 device_subdir = self._flavor_utils.DevicePathJoin( 32 device_subdir = self._flavor_utils.DevicePathJoin(
32 self._device_dirs.SKImageOutDir(), self._builder_name) 33 self._device_dirs.SKImageOutDir(), self._builder_name)
33 self._flavor_utils.CreateCleanDeviceDirectory(device_subdir) 34 self._flavor_utils.CreateCleanDeviceDirectory(device_subdir)
34 output_expectations_file = self._flavor_utils.DevicePathJoin( 35 output_expectations_file = self._flavor_utils.DevicePathJoin(
35 device_subdir, run_gm.JSON_SUMMARY_FILENAME) 36 device_subdir, run_gm.JSON_SUMMARY_FILENAME)
36 37
37 cmd.extend(['--createExpectationsPath', output_expectations_file]) 38 cmd.extend(['--createExpectationsPath', output_expectations_file])
38 39
39 # Draw any mismatches to the same folder as the output json. 40 # Draw any mismatches to a folder inside SKImageOutDir.
40 cmd.extend(['--mismatchPath', self._device_dirs.SKImageOutDir()]) 41 image_out_dir = self._flavor_utils.DevicePathJoin(
42 self._device_dirs.SKImageOutDir(), 'images')
43 self._flavor_utils.CreateCleanDeviceDirectory(image_out_dir)
44 cmd.extend(['--mismatchPath', image_out_dir])
41 45
42 self._flavor_utils.RunFlavoredCmd('skimage', cmd) 46 self._flavor_utils.RunFlavoredCmd('skimage', cmd)
43 47
44 # If there is no expectations file, still run the tests, and then report a 48 # 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 49 # failure. Then we'll know to update the expectations with the results of
46 # running the tests. 50 # running the tests.
47 # TODO(scroggo): Skipping the TSAN bot, where we'll never have 51 # TODO(scroggo): Skipping the TSAN bot, where we'll never have
48 # expectations. A better way might be to have expty expectations. See 52 # expectations. A better way might be to have expty expectations. See
49 # https://code.google.com/p/skia/issues/detail?id=1711 53 # https://code.google.com/p/skia/issues/detail?id=1711
50 if not have_expectations and not 'TSAN' in self._builder_name: 54 if not have_expectations and not 'TSAN' in self._builder_name:
51 raise BuildStepFailure("Missing expectations file " + expectations_file) 55 raise BuildStepFailure("Missing expectations file " + expectations_file)
52 56
53 if '__main__' == __name__: 57 if '__main__' == __name__:
54 sys.exit(BuildStep.RunBuildStep(RunDecodingTests)) 58 sys.exit(BuildStep.RunBuildStep(RunDecodingTests))
OLDNEW
« no previous file with comments | « no previous file | slave/skia_slave_scripts/upload_skimage_results.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698