mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-30 06:34:13 +00:00
Add an internet connection check to all performance workloads
Throw a DeviceError exception if no wifi connection has been made during the initialization step of the current workload.
This commit is contained in:
@@ -18,6 +18,7 @@ import re
|
||||
import time
|
||||
|
||||
from wlauto import AndroidUiAutoBenchmark, Parameter
|
||||
from wlauto.exceptions import DeviceError
|
||||
|
||||
|
||||
SKYPE_ACTION_URIS = {
|
||||
@@ -94,6 +95,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