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

Unified Diff: tools/run_perf.py

Issue 830753002: Work around 'Text file busy' errors in android perf runner. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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: tools/run_perf.py
diff --git a/tools/run_perf.py b/tools/run_perf.py
index a24627f0ec8834fd36367fdd14f3b68266cd3d5d..63c9148515c9380604bc2ee973fe3f0ddb27078e 100755
--- a/tools/run_perf.py
+++ b/tools/run_perf.py
@@ -539,6 +539,7 @@ class AndroidPlatform(Platform): # pragma: no cover
AndroidPlatform.DEVICE_DIR, "_tmp_", file_name)
file_on_device = os.path.join(
AndroidPlatform.DEVICE_DIR, target_rel, file_name)
+ folder_on_device = os.path.dirname(file_on_device)
# Only push files not yet pushed in one execution.
if file_on_host in self.pushed:
@@ -547,14 +548,15 @@ class AndroidPlatform(Platform): # pragma: no cover
self.pushed.add(file_on_host)
# Work-around for "text file busy" errors. Push the files to a temporary
- # location and then move them with a shell command.
+ # location and then copy them with a shell command.
output = self._SendCommand(
"push %s %s" % (file_on_host, file_on_device_tmp))
# Success looks like this: "3035 KB/s (12512056 bytes in 4.025s)".
# Errors look like this: "failed to copy ... ".
if output and not re.search('^[0-9]', output.splitlines()[-1]):
logging.critical('PUSH FAILED: ' + output)
- self._SendCommand("shell mv %s %s" % (file_on_device_tmp, file_on_device))
+ self._SendCommand("shell mkdir -p %s" % folder_on_device)
+ self._SendCommand("shell cp %s %s" % (file_on_device_tmp, file_on_device))
def PreTests(self, node, path):
suite_dir = os.path.abspath(os.path.dirname(path))
« 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