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

Unified Diff: slave/skia_slave_scripts/upload_skimage_results.py

Issue 16226005: Run skimage on the bots. (Closed) Base URL: https://skia.googlecode.com/svn/buildbot
Patch Set: 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
« slave/skia_slave_scripts/update.py ('K') | « slave/skia_slave_scripts/update.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: slave/skia_slave_scripts/upload_skimage_results.py
diff --git a/slave/skia_slave_scripts/upload_skimage_results.py b/slave/skia_slave_scripts/upload_skimage_results.py
new file mode 100644
index 0000000000000000000000000000000000000000..9cd35a2571a84bde37263cbc514e784a701479dd
--- /dev/null
+++ b/slave/skia_slave_scripts/upload_skimage_results.py
@@ -0,0 +1,59 @@
+#!/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.
+
+"""Upload results from running skimage."""
+
+import posixpath
+import sys
+
+from get_subdir import GetSubDirFromBuilderName
+from utils import gs_utils
+from utils import sync_bucket_subdir
+from build_step import PLAYBACK_CANNED_ACL
+from build_step import BuildStep
+
+import build_step
+
+SKP_TIMEOUT_MULTIPLIER = 8
+
+class UploadSKImageResults(BuildStep):
+
+ def __init__(
+ self,
+ timeout=build_step.DEFAULT_TIMEOUT * SKP_TIMEOUT_MULTIPLIER,
+ no_output_timeout=(
+ build_step.DEFAULT_NO_OUTPUT_TIMEOUT * SKP_TIMEOUT_MULTIPLIER),
+ **kwargs):
+ """Constructs an UploadSKImageResults BuildStep instance.
+
+ timeout: maximum time allowed for this BuildStep. The default value here is
+ increased because there could be a lot of images
+ to be copied over to Google Storage.
+ no_output_timeout: maximum time allowed for this BuildStep to run without
+ any output.
+ """
+ build_step.BuildStep.__init__(self, timeout=timeout,
+ no_output_timeout=no_output_timeout,
+ **kwargs)
+
+ self._dest_gsbase = (self._args.get('dest_gsbase') or
+ sync_bucket_subdir.DEFAULT_PERFDATA_GS_BASE)
+
+ def _Run(self):
+ if self._do_upload_results:
+ # Copy actual images and expectations to Google Storage.
+ print '\n\n========Uploading skimage results to Google Storage=======\n\n'
+ subdir = GetSubDirFromBuilderName(self._builder_name)
+ relative_dir = posixpath.join('skimage', 'output', subdir)
+ gs_utils.UploadDirectoryContentsIfChanged(
borenet 2013/06/25 18:19:12 Note that this mechanism will change very soon, on
scroggo 2013/06/25 19:28:56 Noted. I'll keep watch on Elliot's progress.
+ gs_base=self._dest_gsbase,
+ # Figure out the relative dir
+ gs_relative_dir=relative_dir,
+ gs_acl=PLAYBACK_CANNED_ACL,
+ force_upload=True,
+ local_dir=self._skimage_out_dir)
+
+if '__main__' == __name__:
+ sys.exit(BuildStep.RunBuildStep(UploadSKImageResults))
« slave/skia_slave_scripts/update.py ('K') | « slave/skia_slave_scripts/update.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698