luci: Index | Files

package testresults

import ""


Package Files

query.go test_result.go


var AllFields = mask.All(&pb.TestResult{})

AllFields is a field mask that selects all TestResults fields.

func ListMask Uses

func ListMask(readMask *field_mask.FieldMask) (*mask.Mask, error)

ListMask returns mask.Mask converted from field_mask.FieldMask. It returns a default mask with all fields except summary_html if readMask is empty.

func MustParseName Uses

func MustParseName(name string) (invID invocations.ID, testID, resultID string)

MustParseName retrieves the invocation ID, unescaped test id, and result ID.

Panics if the name is invalid. Should be used only with trusted data.

MustParseName is faster than pbutil.ParseTestResultName.

func PopulateDurationField Uses

func PopulateDurationField(tr *pb.TestResult, micros spanner.NullInt64)

PopulateDurationField populates tr.Duration from NullInt64.

func PopulateExpectedField Uses

func PopulateExpectedField(tr *pb.TestResult, maybeUnexpected spanner.NullBool)

PopulateExpectedField populates tr.Expected from NullBool.

func PopulateVariantParams Uses

func PopulateVariantParams(params map[string]interface{}, variantPredicate *pb.VariantPredicate)

PopulateVariantParams populates variantHashEquals and variantContains parameters based on the predicate.

func Read Uses

func Read(ctx context.Context, name string) (*pb.TestResult, error)

Read reads specified TestResult within the transaction. If the TestResult does not exist, the returned error is annotated with NotFound GRPC code.

type Query Uses

type Query struct {
    InvocationIDs invocations.IDSet
    Predicate     *pb.TestResultPredicate
    PageSize      int // must be positive
    PageToken     string
    Mask          *mask.Mask

Query specifies test results to fetch.

func (*Query) Fetch Uses

func (q *Query) Fetch(ctx context.Context) (trs []*pb.TestResult, nextPageToken string, err error)

Fetch returns a page of test results matching q. Returned test results are ordered by parent invocation ID, test ID and result ID.

func (*Query) Run Uses

func (q *Query) Run(ctx context.Context, f func(*pb.TestResult) error) error

Run calls f for test results matching the query. The test results are ordered by parent invocation ID, test ID and result ID.

Package testresults imports 21 packages (graph) and is imported by 7 packages. Updated 2021-01-24. Refresh now. Tools for package owners.