mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	Merge pull request #78 from ep1cman/binary_install
BaseLinuxDevice: Tidied up the way binaries are handled
This commit is contained in:
		| @@ -91,11 +91,11 @@ class PerfInstrument(Instrument): | ||||
|     ] | ||||
|  | ||||
|     def on_run_init(self, context): | ||||
|         if not self.device.is_installed('perf') or self.force_install: | ||||
|             binary = context.resolver.get(Executable(self, self.device.abi, 'perf')) | ||||
|         binary = context.resolver.get(Executable(self, self.device.abi, 'perf')) | ||||
|         if self.force_install: | ||||
|             self.binary = self.device.install(binary) | ||||
|         else: | ||||
|             self.binary = 'perf' | ||||
|             self.binary = self.device.install_if_needed(binary) | ||||
|         self.commands = self._build_commands() | ||||
|  | ||||
|     def setup(self, context): | ||||
|   | ||||
| @@ -164,11 +164,12 @@ class TraceCmdInstrument(Instrument): | ||||
|             raise InstrumentError('trace-cmd instrument cannot be used on an unrooted device.') | ||||
|         if not self.no_install: | ||||
|             host_file = context.resolver.get(Executable(self, self.device.abi, 'trace-cmd')) | ||||
|             self.trace_cmd = self.device.install_executable(host_file) | ||||
|             self.trace_cmd = self.device.install(host_file) | ||||
|         else: | ||||
|             if not self.device.is_installed('trace-cmd'): | ||||
|             self.trace_cmd = self.device.get_binary_path("trace-cmd") | ||||
|             if not self.trace_cmd: | ||||
|                 raise ConfigError('No trace-cmd found on device and no_install=True is specified.') | ||||
|             self.trace_cmd = 'trace-cmd' | ||||
|  | ||||
|         # Register ourselves as absolute last event before and | ||||
|         #   first after so we can mark the trace at the right time | ||||
|         signal.connect(self.insert_start_mark, signal.BEFORE_WORKLOAD_EXECUTION, priority=11) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user