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

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..2c6779a510773a7d05c7cac7c9df15f0e42c5b88
--- /dev/null
+++ b/slave/skia_slave_scripts/run_decoding_tests.py
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# 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 = [os.path.join(image_dir, filename)
+ for filename in os.listdir(image_dir)
+ if not filename == TIMESTAMP_COMPLETED_FILENAME]
+ cmd = ['-r']
+ cmd.extend(images)
+
+ expectations_name = 'expectations.json'
+
+ # Read expectations, which were downloaded/copied to the device.
+ expectations_file = os.path.join(self._device_dirs.SKImageExpectedDir(),
+ expectations_name)
+ cmd.extend(['--readExpectationsPath', expectations_file])
+
+ # Write the expectations file, in case any did not match.
+ output_expectations_file = os.path.join(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