runtimeprobe

package
v0.0.0-...-683b059 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package runtimeprobe provides utilities for runtime_probe tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenericTest

func GenericTest(ctx context.Context, s *testing.State, categories []string, getComponents GetComponentsFunc, allowExtraComponents bool)

GenericTest probes components with category |categories| on a device using Runtime Probe D-Bus call and checks if the result matches the host info labels. If there is not a valid component label, the test will be skipped (pass). If a valid component in the host info labels is not probed, the test will fail. If a probed component is not in the host info labels, the test will fail if |allowExtraComponents| is false. Otherwise, the test will pass.

Types

type Component

type Component interface {
	GetName() string
	GetInformation() *rppb.Information
}

Component represents runtime_probe component interface.

type GetComponentsFunc

type GetComponentsFunc func(result *rppb.ProbeResult, category string) ([]Component, error)

GetComponentsFunc represents the function to get specific category of components from rppb.ProbeResult.

Jump to

Keyboard shortcuts

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