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 ¶
- func APIGetConfigurationDataEmpty(ctx context.Context, s *testing.State)
- func APIGetDriveSystemData(ctx context.Context, s *testing.State)
- func APIGetEcTelemetry(ctx context.Context, s *testing.State)
- func APIGetOsVersion(ctx context.Context, s *testing.State)
- func APIGetProcData(ctx context.Context, s *testing.State)
- func APIGetStatefulPartitionAvailableCapacityEnrolled(ctx context.Context, s *testing.State)
- func APIGetSysfsData(ctx context.Context, s *testing.State)
- func APIGetVPDField(ctx context.Context, s *testing.State)
- func APIHandleBluetoothDataChanged(ctx context.Context, s *testing.State)
- func APIHandleECNotification(ctx context.Context, s *testing.State)
- func APIHandleMessageFromUIEnrolled(ctx context.Context, s *testing.State)
- func APIHandlePowerEvent(ctx context.Context, s *testing.State)
- func APIInvalidEnum(ctx context.Context, s *testing.State)
- func APIPerformWebRequestEnrolled(ctx context.Context, s *testing.State)
- func APIPerformWebRequestError(ctx context.Context, s *testing.State)
- func APIRequestBluetoothDataNotification(ctx context.Context, s *testing.State)
- func APIRoutineEnrolled(ctx context.Context, s *testing.State)
- func APISendMessageToUIEnrolled(ctx context.Context, s *testing.State)
- func ECEvent(ctx context.Context, s *testing.State)
- func ECRTC(ctx context.Context, s *testing.State)
- func ECTelemetry(ctx context.Context, s *testing.State)
- func NewWilcoFixture(vmTestMode bool) *wilcoDTCFixture
- func VMDTC(ctx context.Context, s *testing.State)
- func VMStart(ctx context.Context, s *testing.State)
- type PowerMenuService
- func (p *PowerMenuService) CloseChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (p *PowerMenuService) IsPowerMenuPresent(ctx context.Context, req *empty.Empty) (*pb.IsPowerMenuPresentResponse, error)
- func (p *PowerMenuService) NewChrome(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- type WilcoService
- func (c *WilcoService) ExecuteRoutine(ctx context.Context, req *wpb.ExecuteRoutineRequest) (*wpb.ExecuteRoutineResponse, error)
- func (c *WilcoService) GetConfigurationData(ctx context.Context, req *empty.Empty) (*wpb.GetConfigurationDataResponse, error)
- func (c *WilcoService) GetStatus(ctx context.Context, req *empty.Empty) (*wpb.GetStatusResponse, error)
- func (c *WilcoService) RestartVM(ctx context.Context, req *wpb.RestartVMRequest) (*empty.Empty, error)
- func (c *WilcoService) SendMessageToUi(ctx context.Context, req *wpb.SendMessageToUiRequest) (*wpb.SendMessageToUiResponse, error)
- func (c *WilcoService) StartDPSLListener(ctx context.Context, req *wpb.StartDPSLListenerRequest) (*empty.Empty, error)
- func (c *WilcoService) StopDPSLListener(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (c *WilcoService) TestGetAvailableRoutines(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (c *WilcoService) TestGetStatefulPartitionAvailableCapacity(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (c *WilcoService) TestPerformWebRequest(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (c *WilcoService) TestRoutineCancellation(ctx context.Context, req *wpb.ExecuteRoutineRequest) (*empty.Empty, error)
- func (c *WilcoService) WaitForHandleConfigurationDataChanged(ctx context.Context, req *empty.Empty) (*empty.Empty, error)
- func (c *WilcoService) WaitForHandleMessageFromUi(ctx context.Context, req *empty.Empty) (*wpb.WaitForHandleMessageFromUiResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APIGetStatefulPartitionAvailableCapacityEnrolled ¶
APIGetStatefulPartitionAvailableCapacityEnrolled tests GetStatefulPartitionAvailableCapacity gRPC API.
func APIHandleMessageFromUIEnrolled ¶
APIHandleMessageFromUIEnrolled tests Wilco DTC HandleMessageFromUi gRPC API.
func APIPerformWebRequestEnrolled ¶
APIPerformWebRequestEnrolled tests PerformWebRequest gRPC API.
func APISendMessageToUIEnrolled ¶
APISendMessageToUIEnrolled tests Wilco DTC SendMessageToUi gRPC API.
func ECEvent ¶
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 ¶
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 ¶
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.
Types ¶
type PowerMenuService ¶
type PowerMenuService struct {
// contains filtered or unexported fields
}
PowerMenuService implements tast.cros.power.PowerMenuService.
func (*PowerMenuService) CloseChrome ¶
func (*PowerMenuService) IsPowerMenuPresent ¶
func (p *PowerMenuService) IsPowerMenuPresent(ctx context.Context, req *empty.Empty) (*pb.IsPowerMenuPresentResponse, error)
type WilcoService ¶
type WilcoService struct {
// contains filtered or unexported fields
}
WilcoService implements tast.cros.wilco.WilcoService.
func (*WilcoService) ExecuteRoutine ¶
func (c *WilcoService) ExecuteRoutine(ctx context.Context, req *wpb.ExecuteRoutineRequest) (*wpb.ExecuteRoutineResponse, error)
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 (c *WilcoService) SendMessageToUi(ctx context.Context, req *wpb.SendMessageToUiRequest) (*wpb.SendMessageToUiResponse, error)
func (*WilcoService) StartDPSLListener ¶
func (c *WilcoService) StartDPSLListener(ctx context.Context, req *wpb.StartDPSLListenerRequest) (*empty.Empty, error)
func (*WilcoService) StopDPSLListener ¶
func (*WilcoService) TestGetAvailableRoutines ¶
func (*WilcoService) TestGetStatefulPartitionAvailableCapacity ¶
func (*WilcoService) TestPerformWebRequest ¶
func (*WilcoService) TestRoutineCancellation ¶
func (c *WilcoService) TestRoutineCancellation(ctx context.Context, req *wpb.ExecuteRoutineRequest) (*empty.Empty, error)
func (*WilcoService) WaitForHandleConfigurationDataChanged ¶
func (*WilcoService) WaitForHandleMessageFromUi ¶
func (c *WilcoService) WaitForHandleMessageFromUi(ctx context.Context, req *empty.Empty) (*wpb.WaitForHandleMessageFromUiResponse, error)
Source Files ¶
- api_get_configuration_data_empty.go
- api_get_drive_system_data.go
- api_get_ec_telemetry.go
- api_get_os_version.go
- api_get_proc_data.go
- api_get_stateful_partition_available_capacity_enrolled.go
- api_get_sysfs_data.go
- api_get_vpd_field.go
- api_handle_bluetooth_data_changed.go
- api_handle_ec_notification.go
- api_handle_message_from_ui_enrolled.go
- api_handle_power_event.go
- api_invalid_enum.go
- api_perform_web_request_enrolled.go
- api_perform_web_request_error.go
- api_request_bluetooth_data_notification.go
- api_routine_enrolled.go
- api_send_message_to_ui_enrolled.go
- doc.go
- ec_event.go
- ec_rtc.go
- ec_telemetry.go
- fixture.go
- power_menu_service.go
- vm_dtc.go
- vm_start.go
- wilco_service.go
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. |