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:
@@ -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):
|
||||
|
Reference in New Issue
Block a user