From b98b31a4271aaee5e4566b9e1345ac12f0d37834 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Tue, 16 Jun 2015 17:02:23 +0100 Subject: [PATCH] sysfile_getter: use self.device.busybox rather than just "busybox" Was breaking when location into which busybox was installed was not in PATH. --- wlauto/instrumentation/misc/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wlauto/instrumentation/misc/__init__.py b/wlauto/instrumentation/misc/__init__.py index e3ac7f14..9e126268 100644 --- a/wlauto/instrumentation/misc/__init__.py +++ b/wlauto/instrumentation/misc/__init__.py @@ -130,7 +130,7 @@ class SysfsExtractor(Instrument): dest_dir = self.device.path.join(self.on_device_before, as_relative(d)) if '*' in dest_dir: dest_dir = self.device.path.dirname(dest_dir) - self.device.execute('busybox cp -Hr {} {}'.format(d, dest_dir), + self.device.execute('{} cp -Hr {} {}'.format(self.device.busybox, d, dest_dir), as_root=True, check_exit_code=False) else: # not rooted for dev_dir, before_dir, _, _ in self.device_and_host_paths: @@ -142,7 +142,7 @@ class SysfsExtractor(Instrument): dest_dir = self.device.path.join(self.on_device_after, as_relative(d)) if '*' in dest_dir: dest_dir = self.device.path.dirname(dest_dir) - self.device.execute('busybox cp -Hr {} {}'.format(d, dest_dir), + self.device.execute('{} cp -Hr {} {}'.format(self.device.busybox, d, dest_dir), as_root=True, check_exit_code=False) else: # not using tmpfs for dev_dir, _, after_dir, _ in self.device_and_host_paths: @@ -152,7 +152,9 @@ class SysfsExtractor(Instrument): if self.use_tmpfs: on_device_tarball = self.device.path.join(self.device.working_directory, self.tarname) on_host_tarball = self.device.path.join(context.output_directory, self.tarname) - self.device.execute('busybox tar czf {} -C {} .'.format(on_device_tarball, self.tmpfs_mount_point), + self.device.execute('{} tar czf {} -C {} .'.format(self.device.busybox, + on_device_tarball, + self.tmpfs_mount_point), as_root=True) self.device.execute('chmod 0777 {}'.format(on_device_tarball), as_root=True) self.device.pull_file(on_device_tarball, on_host_tarball)