Lines Matching refs:self
82 def __init__(self, suite_dir, major, agent_list, hdc_tools):
83 self.suite_dir = suite_dir
84 self.major = major
85 self.agent_list = agent_list
86 self.hdc_tools = hdc_tools
217 def exec_agent(self, device, target_name, result_path, options):
218 driver = get_current_driver(device, target_name, self.hdc_tools)
223 resource_dir = get_resource_dir(self.suite_dir, device.name)
225 self._make_agent_desc_file(device)
226 device.push_file(os.path.join(self.suite_dir, "agent.desc"),
231 suite_path = os.path.join(self.suite_dir, target_name)
233 return self._check_thread(device, target_name)
235 def exec_major(self, device, target_name, result_path, options):
236 driver = get_current_driver(device, target_name, self.hdc_tools)
241 resource_dir = get_resource_dir(self.suite_dir, device.name)
242 self._make_major_desc_file()
243 device.push_file(os.path.join(self.suite_dir, "major.desc"),
248 suite_path = os.path.join(self.suite_dir, target_name)
251 def _make_agent_desc_file(self, device):
255 if self.hdc_tools != "hdc":
256 if self._query_device_uuid(self.major) != '':
258 device_uuid_list, self._query_device_uuid(self.major))
260 if self._query_device_ip(device) != "":
262 agent_ip_list, self._query_device_ip(device))
264 for agent in self.agent_list:
265 if self._query_device_uuid(agent):
267 device_uuid_list, self._query_device_uuid(agent))
272 config_agent_file = os.path.join(self.suite_dir, "agent.desc")
273 self._write_device_config(config_info, config_agent_file)
275 if self._query_device_agent_uuid(self.major):
277 device_uuid_list, self._query_device_agent_uuid(self.major))
279 if self._query_device_hdc_ip(device):
281 agent_ip_list, self._query_device_hdc_ip(device))
283 for agent in self.agent_list:
284 if self._query_device_agent_uuid(agent):
286 device_uuid_list, self._query_device_agent_uuid(agent))
291 config_agent_file = os.path.join(self.suite_dir, "agent.desc")
292 self._write_device_config(config_info, config_agent_file)
294 def _make_major_desc_file(self):
298 if self.hdc_tools != "hdc":
299 if self._query_device_uuid(self.major) != "NoneTyple":
301 device_uuid_list, self._query_device_uuid(self.major))
303 for agent in self.agent_list:
304 if self._query_device_ip(agent) != "" and self._query_device_uuid(agent) != "":
305 agent_ip_list = "{}{},".format(agent_ip_list, self._query_device_ip(agent))
307 device_uuid_list, self._query_device_uuid(agent))
312 config_major_file = os.path.join(self.suite_dir, "major.desc")
313 self._write_device_config(config_info, config_major_file)
315 if self._query_device_major_uuid(self.major):
317 device_uuid_list, self._query_device_major_uuid(self.major))
319 for agent in self.agent_list:
320 if self._query_device_major_uuid(agent):
321 agent_ip_list = "{}{},".format(agent_ip_list, self._query_device_hdc_ip(agent))
323 device_uuid_list, self._query_device_major_uuid(agent))
327 config_major_file = os.path.join(self.suite_dir, "major.desc")
328 self._write_device_config(config_info, config_major_file)