def setUp(self): self.drone_utility = drone_utility.DroneUtility() self._fake_command = '!faketest!' self._fake_proc_info = { 'pid': 3, 'pgid': 4, 'ppid': 2, 'comm': self._fake_command, 'args': '' } self.god = mock.mock_god() self.god.stub_function(self.drone_utility, '_get_process_info')
def archive_results(self, path): results_host = global_config.global_config.get_config_value( 'SCHEDULER', 'results_host', default=None) if not results_host or results_host == 'localhost': return if not path.endswith('/'): path += '/' logging.info('Archiving %s to %s', path, results_host) utility = drone_utility.DroneUtility() utility.sync_send_file_to(results_host, path, path, can_fail=True)
def __init__(self, timestamp_remote_calls=True): super(_LocalDrone, self).__init__(timestamp_remote_calls=timestamp_remote_calls) self.hostname = 'localhost' self._host = local_host.LocalHost() self._drone_utility = drone_utility.DroneUtility()
def __init__(self): super(_LocalDrone, self).__init__() self.hostname = 'localhost' self._drone_utility = drone_utility.DroneUtility()