1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00

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.
This commit is contained in:
Sebastian Goscik 2016-06-20 09:55:18 +01:00
parent 4a15a41cf8
commit 224b973ace

View File

@ -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)