Home | History | Annotate | Download | only in server

Lines Matching refs:host

66         host, at, outputdir = self._install()
67 # TODO(kevcheng): remove when host client install is supported for
69 if not host.is_client_install_supported:
70 logging.debug('host client install not supported, skipping %s:',
75 host.erase_dir_contents(outputdir)
76 func(self, mytest, host, at, outputdir)
91 # for now support a single host
92 self.host = None
103 if not self.host:
105 self.host = hosts.create_target_machine(
107 # TODO(kevcheng): remove when host client install is supported for
109 if not self.host.is_client_install_supported:
110 return self.host, None, None
112 tmp_dir = self.host.get_tmp_dir(parent="/tmp/sysinfo")
113 self.autotest = autotest.Autotest(self.host)
115 self.outputdir = self.host.get_tmp_dir()
117 # if installation fails roll back the host
119 self.host.close()
121 logging.exception("Unable to close host %s",
122 self.host.hostname)
123 self.host = None
127 # TODO(kevcheng): remove when host client install is supported for
129 if not self.host.is_client_install_supported:
130 return self.host, None, None
134 autodir = self.host.get_autodir()
135 if not autodir or not self.host.path_exists(autodir):
139 if not self.host.path_exists(self.outputdir):
140 self.host.run('mkdir -p %s' % self.outputdir)
142 return self.host, self.autotest, self.outputdir
145 def _pull_pickle(self, host, outputdir):
150 host.get_file(os.path.join(outputdir, "sysinfo.pickle"), path)
154 def _push_pickle(self, host, outputdir):
158 host.send_file(self.pickle,
164 def _pull_sysinfo_keyval(self, host, outputdir, mytest):
168 host.get_file(os.path.join(outputdir, "sysinfo"), mytest.outputdir)
173 host.get_file(os.path.join(outputdir, "keyval"), path)
181 def before_hook(self, mytest, host, at, outputdir):
186 self._pull_pickle(host, outputdir)
191 def before_iteration_hook(self, mytest, host, at, outputdir):
194 self._push_pickle(host, outputdir);
202 self._pull_pickle(host, outputdir)
207 def after_iteration_hook(self, mytest, host, at, outputdir):
209 self._push_pickle(host, outputdir);
217 self._pull_pickle(host, outputdir)
222 def after_hook(self, mytest, host, at, outputdir):
223 self._push_pickle(host, outputdir);
228 self._pull_sysinfo_keyval(host, outputdir, mytest)
232 if self.host and self.autotest:
238 self.host.close()
240 self.host.erase_dir_contents(self.outputdir)
245 logging.exception('Error cleaning up the sysinfo autotest/host '
289 # add in a hook that calls host.log_kernel if we can
292 host = dargs[mytest.host_parameter]
293 if host:
294 host.log_kernel()