mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-30 22:54:18 +00:00 
			
		
		
		
	Merge pull request #25 from jimboatarm/UXPERF-59
Add an internet connection check to all performance workloads
This commit is contained in:
		| @@ -19,6 +19,7 @@ import re | ||||
| import time | ||||
|  | ||||
| from wlauto import AndroidUiAutoBenchmark, Parameter | ||||
| from wlauto.exceptions import DeviceError | ||||
|  | ||||
|  | ||||
| class Gmail(AndroidUiAutoBenchmark): | ||||
| @@ -77,6 +78,9 @@ class Gmail(AndroidUiAutoBenchmark): | ||||
|     def initialize(self, context): | ||||
|         super(Gmail, self).initialize(context) | ||||
|  | ||||
|         if not self.device.is_wifi_connected(): | ||||
|             raise DeviceError('Wifi is not connected for device {}'.format(self.device.name)) | ||||
|  | ||||
|         self.storage_dir = self.device.path.join(self.device.working_directory) | ||||
|  | ||||
|         for file in os.listdir(self.dependencies_directory): | ||||
|   | ||||
| @@ -17,6 +17,7 @@ import os | ||||
| import re | ||||
|  | ||||
| from wlauto import AndroidUiAutoBenchmark, Parameter | ||||
| from wlauto.exceptions import DeviceError | ||||
|  | ||||
|  | ||||
| class Googlephotos(AndroidUiAutoBenchmark): | ||||
| @@ -78,6 +79,9 @@ class Googlephotos(AndroidUiAutoBenchmark): | ||||
|     def initialize(self, context): | ||||
|         super(Googlephotos, self).initialize(context) | ||||
|  | ||||
|         if not self.device.is_wifi_connected(): | ||||
|             raise DeviceError('Wifi is not connected for device {}'.format(self.device.name)) | ||||
|  | ||||
|         for entry in os.listdir(self.dependencies_directory): | ||||
|             wa_file = ''.join([self.file_prefix, entry]) | ||||
|             if entry.endswith(".jpg"): | ||||
|   | ||||
| @@ -19,6 +19,7 @@ import re | ||||
| import time | ||||
|  | ||||
| from wlauto import AndroidUiAutoBenchmark, Parameter | ||||
| from wlauto.exceptions import DeviceError | ||||
|  | ||||
|  | ||||
| class Reader(AndroidUiAutoBenchmark): | ||||
| @@ -77,6 +78,12 @@ class Reader(AndroidUiAutoBenchmark): | ||||
|         self.uiauto_params['password'] = self.password | ||||
|         self.uiauto_params['dumpsys_enabled'] = self.dumpsys_enabled | ||||
|  | ||||
|     def initialize(self, context): | ||||
|         super(Reader, self).initialize(context) | ||||
|  | ||||
|         if not self.device.is_wifi_connected(): | ||||
|             raise DeviceError('Wifi is not connected for device {}'.format(self.device.name)) | ||||
|  | ||||
|     def setup(self, context): | ||||
|         super(Reader, self).setup(context) | ||||
|  | ||||
|   | ||||
| @@ -18,6 +18,7 @@ import re | ||||
| import time | ||||
|  | ||||
| from wlauto import AndroidUiAutoBenchmark, Parameter | ||||
| from wlauto.exceptions import DeviceError | ||||
|  | ||||
|  | ||||
| SKYPE_ACTION_URIS = { | ||||
| @@ -91,6 +92,12 @@ class Skype(AndroidUiAutoBenchmark): | ||||
|         self.uiauto_params['duration'] = self.duration | ||||
|         self.uiauto_params['action'] = self.action | ||||
|  | ||||
|     def initialize(self, context): | ||||
|         super(Skype, self).initialize(context) | ||||
|  | ||||
|         if not self.device.is_wifi_connected(): | ||||
|             raise DeviceError('Wifi is not connected for device {}'.format(self.device.name)) | ||||
|  | ||||
|     def setup(self, context): | ||||
|         self.logger.info('===== setup() ======') | ||||
|         super(Skype, self).setup(context) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user