From 224b973ace4553026b2b80c414ee9ef3042a3d0e Mon Sep 17 00:00:00 2001 From: Sebastian Goscik Date: Mon, 20 Jun 2016 09:55:18 +0100 Subject: [PATCH] sysfs_extractor & cpufreq: Fixed error when tar.gz file already existed If the tar.gz already existed on the target device the instruments would fail. This fix adds the "-f" option to gzip to force it to overwrite the file. --- wlauto/instrumentation/misc/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wlauto/instrumentation/misc/__init__.py b/wlauto/instrumentation/misc/__init__.py index 6e74e931..db6c8336 100644 --- a/wlauto/instrumentation/misc/__init__.py +++ b/wlauto/instrumentation/misc/__init__.py @@ -157,8 +157,8 @@ class SysfsExtractor(Instrument): self.tmpfs_mount_point), as_root=True) self.device.execute('chmod 0777 {}'.format(on_device_tarball), as_root=True) - self.device.execute('{} gzip {}'.format(self.device.busybox, - on_device_tarball)) + self.device.execute('{} gzip -f {}'.format(self.device.busybox, + on_device_tarball)) self.device.pull_file(on_device_tarball + ".gz", on_host_tarball) with tarfile.open(on_host_tarball, 'r:gz') as tf: tf.extractall(context.output_directory)