mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 15:12:25 +00:00 
			
		
		
		
	BaseLinuxDevice: gzipped property files are now zcat'ed
Before they were cat'ed this gave garbage output for compressed files. Cat-ing is necessary since not all properties are normal files (sysfs).
This commit is contained in:
		| @@ -214,7 +214,10 @@ class BaseLinuxDevice(Device):  # pylint: disable=abstract-method | ||||
|                 outfile = os.path.join(context.host_working_directory, normname) | ||||
|                 if self.is_file(propfile): | ||||
|                     with open(outfile, 'w') as wfh: | ||||
|                         wfh.write(self.execute('cat {}'.format(propfile))) | ||||
|                         if propfile.endswith(".gz"): | ||||
|                             wfh.write(self.execute('{} zcat {}'.format(self.busybox, propfile))) | ||||
|                         else: | ||||
|                             wfh.write(self.execute('cat {}'.format(propfile))) | ||||
|                 elif self.is_directory(propfile): | ||||
|                     self.pull_file(propfile, outfile) | ||||
|                 else: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user