Skip to content

Commit a50ee22

Browse files
Varun Purifacebook-github-bot
authored andcommitted
Ensure files have execute and read permissions after push
Summary: https://fb.workplace.com/groups/1690415234371429/permalink/8957520387660841/ Binary did not have correct permissions after push. We should ensure that files pushed to the device have correct permissions by adding a chmod on the device. Reviewed By: Vysarat Differential Revision: D68301682 fbshipit-source-id: 6cd8d56221c9643232808a1687aaaab8b396914c
1 parent b9a0998 commit a50ee22

File tree

1 file changed

+5
-2
lines changed
  • benchmarking/platforms/android

1 file changed

+5
-2
lines changed

benchmarking/platforms/android/adb.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ def run(self, *args, **kwargs):
2828
adb = self._addADB()
2929
return super(ADB, self).run(adb, *args, **kwargs)
3030

31-
def push(self, src, tgt):
31+
def push(self, src, tgt, chmod="+755"):
3232
# Always remove the old file before pushing the new file
3333
self.deleteFile(tgt)
34-
return self.run("push", src, tgt)
34+
res = self.run("push", src, tgt)
35+
if chmod is not None:
36+
self.shell(["chmod", chmod, tgt])
37+
return res
3538

3639
def pull(self, src, tgt):
3740
return self.run("pull", src, tgt)

0 commit comments

Comments
 (0)