mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 00:52:08 +00:00 
			
		
		
		
	rt-app: remove requirement for rooted device
We remove the requirement for rt-app to run on a rooted device as this does not appear to be required. We make sure that we run the workload from a directory where we have write permissions by first changing the directory before executing the workload (in_directory argument of invoke). In the case that the device is rooted, we run rt-app as root. Otherwise, we simply run the workload.
This commit is contained in:
		
				
					committed by
					
						
						setrofim
					
				
			
			
				
	
			
			
			
						parent
						
							39925d3f79
						
					
				
				
					commit
					e82fa48826
				
			@@ -154,8 +154,6 @@ class RtApp(Workload):
 | 
			
		||||
                                                            self.target.abi,
 | 
			
		||||
                                                            BINARY_NAME), strict=False)
 | 
			
		||||
        RtApp.workgen_script = context.resolver.get(File(self, 'workgen'))
 | 
			
		||||
        if not self.target.is_rooted:  # some use cases require root privileges
 | 
			
		||||
            raise WorkloadError('rt-app requires the target to be rooted.')
 | 
			
		||||
        self.target.execute('mkdir -p {}'.format(self.target_working_directory))
 | 
			
		||||
        self._deploy_rt_app_binary_if_necessary()
 | 
			
		||||
 | 
			
		||||
@@ -172,10 +170,11 @@ class RtApp(Workload):
 | 
			
		||||
 | 
			
		||||
    def run(self, context):
 | 
			
		||||
        self.output = self.target.invoke(self.command,
 | 
			
		||||
                                         in_directory=self.target_working_directory,
 | 
			
		||||
                                         on_cpus=self.taskset_mask,
 | 
			
		||||
                                         redirect_stderr=True,
 | 
			
		||||
                                         timeout=self.timeout,
 | 
			
		||||
                                         as_root=True)
 | 
			
		||||
                                         as_root=self.target.is_rooted)
 | 
			
		||||
 | 
			
		||||
    def update_output(self, context):
 | 
			
		||||
        self._pull_rt_app_logs(context)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user