Documentation
¶
Overview ¶
Package common provide command utilities and variables for all components in cros-test to use.
Package common provide command utilities and variables for all components in cros-test to use.
Package common provide command utilities and variables for all components in cros-test to use.
Package common provides common functions for cros-test.
Index ¶
- Constants
- func Companions(devices []*api.CrosTestRequest_Device) (chromeOSCompanions []*device.DutInfo, androidCompanions []*device.AndroidInfo, ...)
- func ConvertDutTopologyToHostInfo(dut *device.DutInfo) (map[string]string, []string, error)
- func ExtraArgs(req *api.CrosTestRequest) (args []*api.Arg)
- func PublishTkoStatusFile(resultsDir string, results []*api.TestCaseResult) error
- func TestScanner(stream io.Reader, logger *log.Logger, harness string)
- func TranslateMoblyResults(moblyYaml []byte, resultsRootDir string) ([]*api.TestCaseResult, error)
- func UnpackMetadata(req *api.CrosTestRequest) (args []*api.Arg, resultsRootDir string, err error)
- func WriteHostInfoToFile(resultsDir string, hostname string, dut *device.DutInfo, log *log.Logger) error
- type HostInfo
Constants ¶
const ( TestExecServerRoot = "/tmp/test/cros-test" TestRequestJSONFile = "request.json" TestResultJSONFile = "result.json" TestResultDir = "/tmp/test/results" TestMetadataDir = "/tmp/test/metadata" AutotestDir = "/usr/local/autotest/" )
Constants for different components to use.
const NoStatus = "----"
const Start = "START"
Variables ¶
This section is empty.
Functions ¶
func Companions ¶
func Companions(devices []*api.CrosTestRequest_Device) (chromeOSCompanions []*device.DutInfo, androidCompanions []*device.AndroidInfo, err error)
Companions separates devices to ChromeOS devices and Android devices.
func ConvertDutTopologyToHostInfo ¶
ConvertDutTopologyToHostInfo returns attr map, label list for the attr/labels from the dut info.
func ExtraArgs ¶
func ExtraArgs(req *api.CrosTestRequest) (args []*api.Arg)
ExtraArgs upacks the extra arguements from test reqeusts.
func PublishTkoStatusFile ¶
func PublishTkoStatusFile(resultsDir string, results []*api.TestCaseResult) error
PublishTkoStatusFile publishes the responseProto into a TKO status log in the given resultsDirectory.
func TestScanner ¶
TestScanner makes a scanner to read from test streams.
func TranslateMoblyResults ¶
func TranslateMoblyResults(moblyYaml []byte, resultsRootDir string) ([]*api.TestCaseResult, error)
TranslateMoblyResults translate a mobly test result yaml output to test results.
func UnpackMetadata ¶
UnpackMetadata unpacks the Any metadata field into AutotestExecutionMetadata