1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-07 13:41:24 +00:00

AndroidDevice: Changed kick_off signature to match BaseLinuxExamples

This commit is contained in:
Sebastian Goscik 2016-05-09 14:34:49 +01:00
parent 187fd70077
commit d3c7f11f2d

View File

@ -442,7 +442,7 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
else: else:
return adb_shell(self.adb_name, command, timeout, check_exit_code, as_root) return adb_shell(self.adb_name, command, timeout, check_exit_code, as_root)
def kick_off(self, command): def kick_off(self, command, as_root=True):
""" """
Like execute but closes adb session and returns immediately, leaving the command running on the Like execute but closes adb session and returns immediately, leaving the command running on the
device (this is different from execute(background=True) which keeps adb connection open and returns device (this is different from execute(background=True) which keeps adb connection open and returns
@ -453,7 +453,7 @@ class AndroidDevice(BaseLinuxDevice): # pylint: disable=W0223
Added in version 2.1.4 Added in version 2.1.4
""" """
if not self.is_rooted: if not self.is_rooted or not as_root:
raise DeviceError('kick_off uses busybox\'s nohup applet and so can only be run a rooted device.') raise DeviceError('kick_off uses busybox\'s nohup applet and so can only be run a rooted device.')
try: try:
command = 'cd {} && busybox nohup {}'.format(self.working_directory, command) command = 'cd {} && busybox nohup {}'.format(self.working_directory, command)