1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-06 21:32:37 +01: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:
John Richardson
2016-05-19 14:09:49 +01:00
parent 0f7aff48cc
commit 46fb7614cf
4 changed files with 22 additions and 0 deletions

View File

@@ -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)