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

Unified Diff: slave/skia_slave_scripts/android_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/android_build_step.py
diff --git a/slave/skia_slave_scripts/android_build_step.py b/slave/skia_slave_scripts/android_build_step.py
index c03bc54f936dc13d0ea9ce5a1772ac79335e951b..f8ad2809e6b2dc9a8f718cba70a2d3e343753cd7 100644
--- a/slave/skia_slave_scripts/android_build_step.py
+++ b/slave/skia_slave_scripts/android_build_step.py
@@ -39,9 +39,7 @@ class AndroidBuildStep(BuildStep):
android_utils.RunADB(self._serial, ['shell', 'rm', '-r', directory])
except Exception:
pass
- if 'DIRECTORY_EXISTS' in android_utils.ADBShell(self._serial,
- ['if', '[', '-d', directory, '];', 'then', 'echo', 'DIRECTORY_EXISTS;',
- 'fi']):
+ if self.DevicePathExists(directory):
raise Exception('Failed to remove %s' % directory)
def _CreateDirectoryOnDevice(self, directory):
@@ -52,6 +50,17 @@ class AndroidBuildStep(BuildStep):
""" Overrides build_step.PushFileToDevice() """
android_utils.RunADB(self._serial, ['push', src, dst])
+ def DeviceListDir(self, directory):
+ """ Overrides build_step.DeviceListDir() """
+ return android_utils.ADBShell(self._serial, ['ls', directory],
+ echo=False).split('\n')
+
+ def DevicePathExists(self, path):
+ """ Overrides build_step.DevicePathExists() """
+ return 'FILE_EXISTS' in android_utils.ADBShell(
+ self._serial,
+ ['if', '[', '-e', path, '];', 'then', 'echo', 'FILE_EXISTS;', 'fi'])
+
def DevicePathJoin(self, *args):
""" Overrides build_step.DevicePathJoin() """
return posixpath.sep.join(args)
@@ -91,6 +100,10 @@ class AndroidBuildStep(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