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

Unified Diff: slave/skia_slave_scripts/chromeos_build_step.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/chromeos_build_step.py
diff --git a/slave/skia_slave_scripts/chromeos_build_step.py b/slave/skia_slave_scripts/chromeos_build_step.py
index dbb2c007914fe6cc826b023c2ff6ee4d55c362dd..81a3738ca1c2863e11ee801eee8c0d17b3fceee9 100644
--- a/slave/skia_slave_scripts/chromeos_build_step.py
+++ b/slave/skia_slave_scripts/chromeos_build_step.py
@@ -30,10 +30,7 @@ class ChromeOSBuildStep(BuildStep):
['rm', '-rf', directory])
except Exception:
pass
- if 'DIRECTORY_EXISTS' in ssh_utils.RunSSH(self._ssh_username,
- self._ssh_host, self._ssh_port, ['if', '[', '-d', directory, '];',
- 'then', 'echo', 'DIRECTORY_EXISTS;',
- 'fi']):
+ if self.DevicePathExists(directory):
raise Exception('Failed to remove %s' % directory)
def _CreateDirectoryOnDevice(self, directory):
@@ -46,6 +43,22 @@ class ChromeOSBuildStep(BuildStep):
ssh_utils.PutSCP(src, dst, self._ssh_username, self._ssh_host,
self._ssh_port)
+ def DeviceListDir(self, directory):
+ """ Overrides build_step.DeviceListDir() """
+ return ssh_utils.RunSSH(
+ self._ssh_username,
+ self._ssh_host,
+ self._ssh_port,
+ ['ls', directory], echo=False).split('\n')
+
+ def DevicePathExists(self, path):
+ """ Overrides build_step.DevicePathExists() """
+ return 'FILE_EXISTS' in ssh_utils.RunSSH(
+ self._ssh_username,
+ self._ssh_host,
+ self._ssh_port,
+ ['if', '[', '-e', path, '];', 'then', 'echo', 'FILE_EXISTS;', 'fi'])
+
def DevicePathJoin(self, *args):
""" Overrides build_step.DevicePathJoin() """
return posixpath.sep.join(args)
@@ -79,6 +92,10 @@ class ChromeOSBuildStep(BuildStep):
gm_actual_dir=prefix + 'gm_actual',
gm_expected_dir=prefix + 'gm_expected',
resource_dir=prefix + 'resources',
+ skimage_in_dir=prefix + 'skimage_in',
+ skimage_expected_dir=(prefix
+ + 'skimage_expected'),
+ skimage_out_dir=prefix + 'skimage_out',
skp_dir=prefix + 'skp',
skp_perf_dir=prefix + 'skp_perf',
skp_out_dir=prefix + 'skp_out',

Powered by Google App Engine
This is Rietveld 408576698