Lines Matching refs:moblab
64 def quickmerge(moblab): argument
80 if int(moblab.port) != 22:
81 ssh_cmd += ' -p %s' % moblab.port
86 (moblab.hostname, moblab_host.AUTOTEST_INSTALL_DIR))
90 def add_adb_host(moblab, adb_hostname): argument
101 moblab.enable_adb_testing()
102 if all([host.hostname != adb_hostname for host in moblab.afe.get_hosts()]):
103 moblab.add_dut(adb_hostname)
107 def schedule_test(moblab, host, test, test_args): argument
129 job = moblab.afe.create_job(
134 job_page = _AFE_JOB_PAGE_TEMPLATE % dict(moblab=moblab.web_address,
143 def get_all_jobs(moblab, parent_job): argument
153 jobs_list = moblab.afe.get_jobs(id=parent_job.id)
154 jobs_list.extend(moblab.afe.get_jobs(parent_job=parent_job.id))
158 def wait_for_test_completion(moblab, host, parent_job): argument
169 while (moblab.afe.get_jobs(id=parent_job.id, not_yet_run=True,
171 or moblab.afe.get_jobs(parent_job=parent_job.id, not_yet_run=True,
173 afe_host = moblab.afe.get_hosts(hostnames=(host,))[0]
175 moblab.afe.abort_jobs(
176 [j.id for j in get_all_jobs(moblab, parent_job)])
178 moblab=moblab.web_address, host_id=afe_host.id)
185 def copy_results(moblab, parent_job): argument
195 for job in get_all_jobs(moblab, parent_job):
196 moblab.get_file('/usr/local/autotest/results/%d-moblab' % job.id,
201 def output_results(moblab, parent_job): argument
208 solo_test_run = len(moblab.afe.get_jobs(parent_job=parent_job.id)) == 0
209 rc = run_suite.ResultCollector(moblab.web_address, moblab.afe, moblab.tko,
220 moblab, _ = brillo_common.get_moblab_and_devserver_port(args.moblab_host)
223 quickmerge(moblab)
226 adb_host = add_adb_host(moblab, args.adb_host)
229 test_job = schedule_test(moblab, adb_host, args.test_name, args.test_args)
230 wait_for_test_completion(moblab, adb_host, test_job)
233 local_results_folder = copy_results(moblab, test_job)
234 output_results(moblab, test_job)