1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-14 01:02:35 +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 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):