wilco

package
v0.0.0-...-9474aff Latest Latest
Warning

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

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

Documentation

Overview

Package wilco contains local Tast tests that exercise functionality specific to the wilco project (custom EC, dock, DTC VM etc). Anything that is applicable to all devices should be placed in other directories.

See https://goto.google.com/wilco for more details.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIGetConfigurationDataEmpty

func APIGetConfigurationDataEmpty(ctx context.Context, s *testing.State)

func APIGetDriveSystemData

func APIGetDriveSystemData(ctx context.Context, s *testing.State)

func APIGetEcTelemetry

func APIGetEcTelemetry(ctx context.Context, s *testing.State)

func APIGetOsVersion

func APIGetOsVersion(ctx context.Context, s *testing.State)

func APIGetProcData

func APIGetProcData(ctx context.Context, s *testing.State)

func APIGetStatefulPartitionAvailableCapacityEnrolled

func APIGetStatefulPartitionAvailableCapacityEnrolled(ctx context.Context, s *testing.State)

APIGetStatefulPartitionAvailableCapacityEnrolled tests GetStatefulPartitionAvailableCapacity gRPC API.

func APIGetSysfsData

func APIGetSysfsData(ctx context.Context, s *testing.State)

func APIGetVPDField

func APIGetVPDField(ctx context.Context, s *testing.State)

func APIHandleBluetoothDataChanged

func APIHandleBluetoothDataChanged(ctx context.Context, s *testing.State)

func APIHandleECNotification

func APIHandleECNotification(ctx context.Context, s *testing.State)

func APIHandleMessageFromUIEnrolled

func APIHandleMessageFromUIEnrolled(ctx context.Context, s *testing.State)

APIHandleMessageFromUIEnrolled tests Wilco DTC HandleMessageFromUi gRPC API.

func APIHandlePowerEvent

func APIHandlePowerEvent(ctx context.Context, s *testing.State)

func APIInvalidEnum

func APIInvalidEnum(ctx context.Context, s *testing.State)

func APIPerformWebRequestEnrolled

func APIPerformWebRequestEnrolled(ctx context.Context, s *testing.State)

APIPerformWebRequestEnrolled tests PerformWebRequest gRPC API.

func APIPerformWebRequestError

func APIPerformWebRequestError(ctx context.Context, s *testing.State)

func APIRequestBluetoothDataNotification

func APIRequestBluetoothDataNotification(ctx context.Context, s *testing.State)

func APIRoutineEnrolled

func APIRoutineEnrolled(ctx context.Context, s *testing.State)

func APISendMessageToUIEnrolled

func APISendMessageToUIEnrolled(ctx context.Context, s *testing.State)

APISendMessageToUIEnrolled tests Wilco DTC SendMessageToUi gRPC API.

func ECEvent

func ECEvent(ctx context.Context, s *testing.State)

ECEvent tests the Wilco EC is able to generate EC events and that the kernel properly passes them along to userspace to read. Normally, the EC triggers events on hardware changes, such as battery errors. For testing, we can send a special command to the EC, and the EC will generate a hardcoded fake event.

See http://chromium.googlesource.com/chromiumos/third_party/kernel/+/283563c976eefc1ab2e83049665d42b23bda95b5/drivers/platform/chrome/wilco_ec/debugfs.c#221 for the kernel driver that sends the test event command, and see http://chromium.googlesource.com/chromiumos/third_party/kernel/+/283563c976eefc1ab2e83049665d42b23bda95b5/drivers/platform/chrome/wilco_ec/event.c for the kernel driver that reads events from the EC.

func ECRTC

func ECRTC(ctx context.Context, s *testing.State)

ECRTC tests the RTC contained within the EC on Wilco devices. As a first check it reads the current time. Then, for a more detailed check, it sets the time to a fake time, sleeps for a bit, and reads the time again. The RTC better have updated itself. The test attempts to reset the RTC back to time.Now() after failure or completion.

func ECTelemetry

func ECTelemetry(ctx context.Context, s *testing.State)

ECTelemetry tests the Wilco EC's ability to respond to telemetry commands. The Wilco EC is able to return telemetry information (such as temperature and fan state) via sysfs: You write a binary command to the sysfs file, the kernel driver performs some filtering on the command to ensure it is valid, and the EC returns the binary result, to be read from the same file. You must keep the file descriptor open between the read and write for the response to be kept. This test checks for end-to-end communication with the EC, and checks that the driver performs some basic filtering and validity checks. Since the responses are variable and opaque binary data, it's impractical to actually check the values of the responses.

See https://chromium.googlesource.com/chromiumos/third_party/kernel/+/ea0f6a09a7a993fc7c781fd8ca675b29c42d4719/drivers/platform/chrome/wilco_ec/telemetry.c for the kernel driver.

func NewWilcoFixture

func NewWilcoFixture(vmTestMode bool) *wilcoDTCFixture

NewWilcoFixture returns a wilcoDTCFixture object reference that implements FixtureImpl interface.

func VMDTC

func VMDTC(ctx context.Context, s *testing.State)

func VMStart

func VMStart(ctx context.Context, s *testing.State)

Types

type PowerMenuService

type PowerMenuService struct {
	// contains filtered or unexported fields
}

PowerMenuService implements tast.cros.power.PowerMenuService.

func (*PowerMenuService) CloseChrome

func (p *PowerMenuService) CloseChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*PowerMenuService) IsPowerMenuPresent

func (p *PowerMenuService) IsPowerMenuPresent(ctx context.Context, req *empty.Empty) (*pb.IsPowerMenuPresentResponse, error)

func (*PowerMenuService) NewChrome

func (p *PowerMenuService) NewChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

type WilcoService

type WilcoService struct {
	// contains filtered or unexported fields
}

WilcoService implements tast.cros.wilco.WilcoService.

func (*WilcoService) ExecuteRoutine

func (*WilcoService) GetConfigurationData

func (c *WilcoService) GetConfigurationData(ctx context.Context, req *empty.Empty) (*wpb.GetConfigurationDataResponse, error)

func (*WilcoService) GetStatus

func (c *WilcoService) GetStatus(ctx context.Context, req *empty.Empty) (*wpb.GetStatusResponse, error)

func (*WilcoService) RestartVM

func (c *WilcoService) RestartVM(ctx context.Context, req *wpb.RestartVMRequest) (*empty.Empty, error)

func (*WilcoService) SendMessageToUi

func (*WilcoService) StartDPSLListener

func (c *WilcoService) StartDPSLListener(ctx context.Context, req *wpb.StartDPSLListenerRequest) (*empty.Empty, error)

func (*WilcoService) StopDPSLListener

func (c *WilcoService) StopDPSLListener(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*WilcoService) TestGetAvailableRoutines

func (c *WilcoService) TestGetAvailableRoutines(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*WilcoService) TestGetStatefulPartitionAvailableCapacity

func (c *WilcoService) TestGetStatefulPartitionAvailableCapacity(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*WilcoService) TestPerformWebRequest

func (c *WilcoService) TestPerformWebRequest(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*WilcoService) TestRoutineCancellation

func (c *WilcoService) TestRoutineCancellation(ctx context.Context, req *wpb.ExecuteRoutineRequest) (*empty.Empty, error)

func (*WilcoService) WaitForHandleConfigurationDataChanged

func (c *WilcoService) WaitForHandleConfigurationDataChanged(ctx context.Context, req *empty.Empty) (*empty.Empty, error)

func (*WilcoService) WaitForHandleMessageFromUi

func (c *WilcoService) WaitForHandleMessageFromUi(ctx context.Context, req *empty.Empty) (*wpb.WaitForHandleMessageFromUiResponse, error)

Directories

Path Synopsis
Package bt contains helper functions to work with Bluetooth.
Package bt contains helper functions to work with Bluetooth.
Package wilcoextension contains constants and helpers to work with the extension that can interact with the Wilco DTC VM.
Package wilcoextension contains constants and helpers to work with the extension that can interact with the Wilco DTC VM.

Jump to

Keyboard shortcuts

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