1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-07-09 00:23:35 +01:00

Merge pull request from bjackman/requires-network

Add Workload.requires_network
This commit is contained in:
setrofim
2017-10-24 14:36:42 +01:00
committed by GitHub
3 changed files with 28 additions and 2 deletions
wa
framework
workloads
geekbench

@ -1,4 +1,5 @@
import logging
import time
from collections import defaultdict, OrderedDict
from copy import copy
@ -893,7 +894,18 @@ class AndroidRuntimeConfig(RuntimeConfig):
def commit(self):
if 'airplane_mode' in self.config:
self.target.set_airplane_mode(self.config['airplane_mode'])
new_airplane_mode = self.config['airplane_mode']
old_airplane_mode = self.target.get_airplane_mode()
self.target.set_airplane_mode(new_airplane_mode)
# If we've just switched airplane mode off, wait a few seconds to
# enable the network state to stabilise. That's helpful if we're
# about to run a workload that is going to check for network
# connectivity.
if old_airplane_mode and not new_airplane_mode:
self.logger.info('Disabled airplane mode, waiting 5 seconds for network setup')
time.sleep(5)
if 'brightness' in self.config:
self.target.set_brightness(self.config['brightness'])
if 'rotation' in self.config: