mirror of
				https://github.com/ARM-software/devlib.git
				synced 2025-10-31 05:53:25 +00:00 
			
		
		
		
	target: add option to invoke to redirect stderr
The stderr of a command is not propagated as part of the command output. However, some workloads/commands write vital output to stderr. For this reason, we add an option to invoke which redirects stderr to stdout (redirect_stderr). This is disabled by default.
This commit is contained in:
		
				
					committed by
					
						 setrofim
						setrofim
					
				
			
			
				
	
			
			
			
						parent
						
							8f3dc05f97
						
					
				
				
					commit
					83e5ddfd1b
				
			| @@ -338,7 +338,7 @@ class Target(object): | ||||
|         return self.conn.background(command, stdout, stderr, as_root) | ||||
|  | ||||
|     def invoke(self, binary, args=None, in_directory=None, on_cpus=None, | ||||
|                as_root=False, timeout=30): | ||||
|                redirect_stderr=False, as_root=False, timeout=30): | ||||
|         """ | ||||
|         Executes the specified binary under the specified conditions. | ||||
|  | ||||
| @@ -369,6 +369,8 @@ class Target(object): | ||||
|             command = '{} taskset 0x{:x} {}'.format(self.busybox, on_cpus, command) | ||||
|         if in_directory: | ||||
|             command = 'cd {} && {}'.format(in_directory, command) | ||||
|         if redirect_stderr: | ||||
|             command = '{} 2>&1'.format(command) | ||||
|         return self.execute(command, as_root=as_root, timeout=timeout) | ||||
|  | ||||
|     def background_invoke(self, binary, args=None, in_directory=None, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user