loganal

package
v0.0.0-...-2f6ede8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package loganal contains functions for analyzing build and test logs produced by all.bash.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Classify

func Classify(fs []*Failure) map[Failure][]int

Classify groups a set of failures in to canonicalized failure classes. The returned map maps from each failure class to the indexes of the input failures in that class. Each input failure will be in exactly one failure class.

Types

type Failure

type Failure struct {
	// Package is the Go package of this failure. In the case of a
	// testing.T failure, this will be the package of the test.
	Package string

	// Test identifies the failed test function. If this is not a
	// testing.T failure, this will be "".
	Test string

	// Message is the summarized failure message. This will be one
	// line of text.
	Message string

	// FullMessage is a substring of the log that captures the
	// entire failure message. It may be many lines long.
	FullMessage string

	// Function is the fully qualified name of the function where
	// this failure happened, if known. This helps distinguish
	// between generic errors like "out of bounds" and is more
	// stable for matching errors than file/line.
	Function string

	// File is the source file where this failure happened, if
	// known.
	File string

	// Line is the source line where this failure happened, if
	// known.
	Line int

	// OS and Arch are the GOOS and GOARCH of this failure.
	OS, Arch string
}

Failure records a failure extracted from an all.bash log.

func Extract

func Extract(m string, os, arch string) ([]*Failure, error)

Extract parses the failures from all.bash log m.

func (Failure) String

func (f Failure) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL