mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 07:04:17 +00:00 
			
		
		
		
	framework/execution: Only add screenshots as an artifact if present
When attempting to take a screenshot from a device do not try to add it as an artifact if screenshot failed and is not present.
This commit is contained in:
		| @@ -227,7 +227,8 @@ class ExecutionContext(object): | ||||
|     def take_screenshot(self, filename): | ||||
|         filepath = self._get_unique_filepath(filename) | ||||
|         self.tm.target.capture_screen(filepath) | ||||
|         self.add_artifact('screenshot', filepath, kind='log') | ||||
|         if os.path.isfile(filepath): | ||||
|             self.add_artifact('screenshot', filepath, kind='log') | ||||
|  | ||||
|     def take_uiautomator_dump(self, filename): | ||||
|         filepath = self._get_unique_filepath(filename) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user