diff --git a/wlauto/common/linux/device.py b/wlauto/common/linux/device.py index 272d5ec1..b3eb4822 100644 --- a/wlauto/common/linux/device.py +++ b/wlauto/common/linux/device.py @@ -598,6 +598,7 @@ class LinuxDevice(BaseLinuxDevice): @property def is_rooted(self): + self._check_ready() if self._is_rooted is None: # First check if the user is root try: diff --git a/wlauto/instrumentation/poller/__init__.py b/wlauto/instrumentation/poller/__init__.py index 93b57a9a..0c5baca9 100644 --- a/wlauto/instrumentation/poller/__init__.py +++ b/wlauto/instrumentation/poller/__init__.py @@ -48,12 +48,12 @@ class FilePoller(Instrument): ] def validate(self): - if not self.device.is_rooted and self.as_root: - raise ConfigError('The device is not rooted, cannot run poller as root.') if self.labels and any(['*' in f for f in self.files]): raise ConfigError('You cannot used manual labels with `*` wildcards') def initialize(self, context): + if not self.device.is_rooted and self.as_root: + raise ConfigError('The device is not rooted, cannot run poller as root.') host_poller = context.resolver.get(Executable(self, self.device.abi, "poller")) target_poller = self.device.install_if_needed(host_poller)