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

Unified Diff: slave/skia_slave_scripts/run_decoding_tests.py

Issue 16226005: Run skimage on the bots. (Closed) Base URL: https://skia.googlecode.com/svn/buildbot
Patch Set: Respond to comments Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: slave/skia_slave_scripts/run_decoding_tests.py
diff --git a/slave/skia_slave_scripts/run_decoding_tests.py b/slave/skia_slave_scripts/run_decoding_tests.py
new file mode 100644
index 0000000000000000000000000000000000000000..22950c1c9ed3c9bf33fe74fc2344eee2c856d581
--- /dev/null
+++ b/slave/skia_slave_scripts/run_decoding_tests.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
borenet 2013/06/26 18:51:56 I just realized - You'll need to create "android_r
scroggo 2013/06/26 20:07:08 Done. How does the slave know where to find the r
borenet 2013/06/26 20:23:14 There's a "flavor" property for each build factory
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+""" Run the Skia skimage executable. """
+
+from build_step import BuildStep
+from utils.gs_utils import TIMESTAMP_COMPLETED_FILENAME
+import os
+import sys
+
+class RunDecodingTests(BuildStep):
+ def _Run(self):
+ image_dir = self._device_dirs.SKImageInDir()
+
+ # Skip the time stamp file.
+ images = [self.DevicePathJoin(image_dir, filename)
+ for filename in os.listdir(image_dir)
+ if not filename == TIMESTAMP_COMPLETED_FILENAME]
+ cmd = ['-r']
+ cmd.extend(images)
+
+ if self._gm_image_subdir is not None:
+ expectations_name = self._gm_image_subdir + '.json'
+
+ # Read expectations, which were downloaded/copied to the device.
+ expectations_file = self.DevicePathJoin(
borenet 2013/06/26 18:47:31 Nice!
+ self._device_dirs.SKImageExpectedDir(),
+ expectations_name)
+
+ if self.DevicePathExists(expectations_file):
+ cmd.extend(['--readExpectationsPath', expectations_file])
+
+ # Write the expectations file, in case any did not match.
+ output_expectations_file = self.DevicePathJoin(
+ self._device_dirs.SKImageOutDir(),
+ expectations_name)
+
+ cmd.extend(['--createExpectationsPath', output_expectations_file])
+
+ # Draw any mismatches to the same folder as the output json.
+ cmd.extend(['--mismatchPath', self._device_dirs.SKImageOutDir()])
+
+ self.RunFlavoredCmd('skimage', cmd)
+
+
+if '__main__' == __name__:
+ sys.exit(BuildStep.RunBuildStep(RunDecodingTests))

Powered by Google App Engine
This is Rietveld 408576698