Lines Matching +full:- +full:- +full:host
2 # Use of this source code is governed by a BSD-style license that can be
158 @param host_resultdir The result directory for this host for this test run.
166 def _find_orphaned_crashdumps(host): argument
167 """Return file paths of crashdumps on host.
169 @param host A host object of the device.
171 return host.list_files_glob(os.path.join(constants.CRASH_DIR, '*'))
174 def report_crashdumps(host): argument
175 """Report on crashdumps for host.
180 @param host A host object of the device we're to pull crashes from.
182 for crashfile in _find_orphaned_crashdumps(host):
183 logging.warning('Host crashdump exists: %s', crashfile)
184 host.job.record('INFO', None, None,
185 'Host crashdump exists: %s' % (crashfile,))
187 host_resultdir = _get_host_resultdir(host)
190 host.job.record('INFO', None, None,
194 def fetch_orphaned_crashdumps(host, infodir): argument
198 @param host A host object of the device we're to pull crashes from.
200 @return The list of minidumps that we pulled back from the host.
206 if not host.check_cached_up_status():
207 logging.warning('Host %s did not answer to ping, skip fetching '
208 'orphaned crashdumps.', host.hostname)
212 for file in _find_orphaned_crashdumps(host):
214 collect_log_file(host, file, infodir, clean=False)
230 @param host_resultdir The result directory for this host for this test run.
244 def _get_host_resultdir(host): argument
245 """Get resultdir for host.
247 @param host A host object of the device we're to pull crashes from.
249 return getattr(getattr(host, 'job', None), 'resultdir', None)
252 def get_host_infodir(host): argument
253 """Get infodir for host.
255 @param host A host object of the device we're to pull crashes from.
257 host_resultdir = _get_host_resultdir(host)
258 return os.path.join(host_resultdir, 'crashinfo.%s' % host.hostname)
261 def get_site_crashdumps(host, test_start_time): argument
263 Copy all of the crashdumps from a host to the results directory.
265 @param host The host object from which to pull crashes
269 host_resultdir = _get_host_resultdir(host)
270 infodir = get_host_infodir(host)
272 orphans = fetch_orphaned_crashdumps(host, infodir)
276 # - If one server job runs several client jobs we will only record
278 # - We will record these crashdumps whether or not we successfully
280 if host.job and minidumps or orphans:
281 host.job.record('INFO', None, None, 'Start crashcollection record')
283 host.job.record('INFO', None, 'New Crash Dump', minidump)
285 host.job.record('INFO', None, 'Orphaned Crash Dump', orphan)
286 host.job.record('INFO', None, None, 'End crashcollection record')
291 report_bug_from_crash(host, minidump)
304 def find_package_of(host, exec_name): argument
308 @param host A host object that has the executable.
312 # Run "portageq owners" on "host" to determine which package owns
314 # tab-prefixed path names. For example, owners of "python:"
316 # sys-devel/gdb-7.7.1-r2
318 # chromeos-base/dev-install-0.0.1-r711
320 # dev-lang/python-2.7.3-r7
327 # stat: cannot stat '@@@ sys-devel/gdb-7.7.1-r2 @@@': ...
329 # stat: cannot stat '@@@ chromeos-base/dev-install-0.0.1-r711 @@@': ...
330 # 755 -rwxr-xr-x /usr/bin/python
331 # stat: cannot stat '@@@ dev-lang/python-2.7.3-r7 @@@': ...
332 # 755 drwxr-xr-x /etc/env.d/python
336 # the path existed on "host."
338 # (not directories), in this case "chromeos-base/dev-install-0.0.1-r711."
344 r'| sed -e "s/^[^\t].*/@@@ & @@@/" -e "s/^\t//"'
346 ' | xargs -0 -r stat -L -c "%a %A %n" 2>&1')
347 portageq = host.run(cmd, ignore_status=True)
353 path_re = re.compile('^([0-7]{3,}) (.)')
362 isfile = match.group(2) == '-'
383 def report_bug_from_crash(host, minidump_path): argument
385 Given a host to query and a minidump, file a bug about the crash.
387 @param host A host object that is where the dump came from
399 package = find_package_of(host, parts[1].strip())