From 5203188d9e42f73b727e9f08f0617fe14c606cb5 Mon Sep 17 00:00:00 2001 From: Sebastian Goscik Date: Fri, 12 Feb 2016 09:54:14 +0000 Subject: [PATCH] LinuxDevice: Added as_root to kick_off --- wlauto/common/linux/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wlauto/common/linux/device.py b/wlauto/common/linux/device.py index 12191f95..1877e84b 100644 --- a/wlauto/common/linux/device.py +++ b/wlauto/common/linux/device.py @@ -720,7 +720,7 @@ class LinuxDevice(BaseLinuxDevice): except CalledProcessError as e: raise DeviceError(e) - def kick_off(self, command): + def kick_off(self, command, as_root=False): """ 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 @@ -729,7 +729,7 @@ class LinuxDevice(BaseLinuxDevice): """ self._check_ready() command = 'sh -c "{}" 1>/dev/null 2>/dev/null &'.format(escape_double_quotes(command)) - return self.shell.execute(command) + return self.shell.execute(command, as_root=as_root) def get_pids_of(self, process_name): """Returns a list of PIDs of all processes with the specified name."""