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

Unified Diff: slave/skia_slave_scripts/prerender.py

Issue 23495007: Do not copy expectations file to itself. (Closed) Base URL: https://skia.googlecode.com/svn/buildbot
Patch Set: Created 7 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: slave/skia_slave_scripts/prerender.py
diff --git a/slave/skia_slave_scripts/prerender.py b/slave/skia_slave_scripts/prerender.py
index bc36c07a95a25603516ccfaed7382fe4941cc71b..799e422986d880b025880f78584bec277cd13465 100644
--- a/slave/skia_slave_scripts/prerender.py
+++ b/slave/skia_slave_scripts/prerender.py
@@ -133,8 +133,13 @@ class PreRender(BuildStep):
if os.path.exists(skimage_host_expectations):
skimage_device_expectations = self._flavor_utils.DevicePathJoin(
self._device_dirs.SKImageExpectedDir(), skimage_expected_filename)
- self._flavor_utils.PushFileToDevice(skimage_host_expectations,
- skimage_device_expectations)
+ # For builders without an attached device, PushFileToDevice will fail
+ # when attempting to copy a file to itself. In this case, there is no
+ # need to copy. Only do the push when there is an attached device,
+ # which corresponds to the case that the filepaths are equal.
+ if not skimage_device_expectations == skimage_host_expectations:
borenet 2013/08/28 13:00:46 I would prefer "skimage_device_expectations != ski
scroggo 2013/08/28 13:01:57 Done.
scroggo 2013/08/28 13:03:39 I could actually compare self._device_dirs.SKImage
borenet 2013/08/28 13:12:40 I think maybe the best thing is to modify DefaultB
scroggo 2013/08/28 13:45:01 Currently, GM uses PushFileToDevice (up above, in
+ self._flavor_utils.PushFileToDevice(skimage_host_expectations,
+ skimage_device_expectations)
self._flavor_utils.CopyDirectoryContentsToDevice(
self._skimage_in_dir, self._device_dirs.SKImageInDir())
« 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