def __init__(self, config, progress, restart): self.logger = logging.getLogger(self.__class__.__name__) self.progress = progress self.basedir = None self.random = config.get('randomization', False) if 'devices' not in config: raise ConfigError('"device" is required in the configuration') adb_path = config.get('adb_path', 'adb') self.devices = Devices(config['devices'], adb_path=adb_path, devices_spec=config.get('devices_spec')) self.replications = Tests.is_integer(config.get('replications', 1)) self.paths = config.get('paths', []) self.profilers = Profilers(config.get('profilers', {}), config) monkeyrunner_path = config.get('monkeyrunner_path', 'monkeyrunner') self.scripts = Scripts(config.get('scripts', {}), monkeyrunner_path=monkeyrunner_path) self.time_between_run = Tests.is_integer( config.get('time_between_run', 0)) Tests.check_dependencies(self.devices, self.profilers.dependencies()) self.output_root = paths.OUTPUT_DIR self.result_file_structure = None if restart: for device in self.devices: self.prepare_device(device, restart=True)
def __init__(self, config, progress, restart): super(WebExperiment, self).__init__(config, progress, restart) self.browsers = [ BrowserFactory.get_browser(b)(config) for b in config.get('browsers', ['chrome']) ] Tests.check_dependencies(self.devices, [b.package_name for b in self.browsers]) self.duration = Tests.is_integer(config.get('duration', 0)) / 1000
def __init__(self, config): self.logger = logging.getLogger(self.__class__.__name__) self.basedir = None if 'devices' not in config: raise ConfigError('"device" is required in the configuration') adb_path = config.get('adb_path', 'adb') self.devices = Devices(config['devices'], adb_path=adb_path) self.replications = Tests.is_integer(config.get('replications', 1)) self.paths = config.get('paths', []) self.profilers = Profilers(config.get('profilers', {})) monkeyrunner_path = config.get('monkeyrunner_path', 'monkeyrunner') self.scripts = Scripts(config.get('scripts', {}), monkeyrunner_path=monkeyrunner_path) self.time_between_run = Tests.is_integer( config.get('time_between_run', 0)) Tests.check_dependencies(self.devices, self.profilers.dependencies()) self.output_root = paths.OUTPUT_DIR
def __init__(self, config): super(WebExperiment, self).__init__(config) self.browsers = [BrowserFactory.get_browser(b)(config) for b in config.get('browsers', ['chrome'])] Tests.check_dependencies(self.devices, [b.package_name for b in self.browsers])