Documentation
¶
Index ¶
- Variables
- func ArcCameraUID() (int, error)
- func IsV1Legacy(ctx context.Context) (bool, error)
- func RunTest(ctx context.Context, cfg TestConfig) (retErr error)
- type ServiceTestConfigGenerator
- type TestConfig
- func DeviceTestConfig() TestConfig
- func FrameTestConfig() TestConfig
- func JDATestConfig() TestConfig
- func JEATestConfig() TestConfig
- func JEAUSBTestConfig() TestConfig
- func ModuleTestConfig() TestConfig
- func PerfTestConfig() TestConfig
- func PortraitModeTestConfig(generatePerfLog bool, portraitModeTestFile string) TestConfig
- func PreviewTestConfig() TestConfig
- func RecordingTestConfig() TestConfig
- func StillCaptureTestConfig() TestConfig
- func StillCaptureZSLTestConfig() TestConfig
- func StreamTestConfig() TestConfig
Constants ¶
This section is empty.
Variables ¶
var ServiceTestConfigGenerators = map[cameraboxpb.HAL3CameraTest]ServiceTestConfigGenerator{ cameraboxpb.HAL3CameraTest_DEVICE: defaultServiceCfgGenerator{DeviceTestConfig}, cameraboxpb.HAL3CameraTest_FRAME: defaultServiceCfgGenerator{FrameTestConfig}, cameraboxpb.HAL3CameraTest_JDA: defaultServiceCfgGenerator{JDATestConfig}, cameraboxpb.HAL3CameraTest_JEA: defaultServiceCfgGenerator{JEATestConfig}, cameraboxpb.HAL3CameraTest_MODULE: defaultServiceCfgGenerator{ModuleTestConfig}, cameraboxpb.HAL3CameraTest_PERF: defaultServiceCfgGenerator{PerfTestConfig}, cameraboxpb.HAL3CameraTest_PREVIEW: defaultServiceCfgGenerator{PreviewTestConfig}, cameraboxpb.HAL3CameraTest_RECORDING: defaultServiceCfgGenerator{RecordingTestConfig}, cameraboxpb.HAL3CameraTest_STILL_CAPTURE: defaultServiceCfgGenerator{StillCaptureTestConfig}, cameraboxpb.HAL3CameraTest_STREAM: defaultServiceCfgGenerator{StreamTestConfig}, cameraboxpb.HAL3CameraTest_FACE_DETECTION: faceDetectionServiceCfgGenerator{}, }
ServiceTestConfigGenerators maps from test type to test config generator for HAL3Service.
Functions ¶
func ArcCameraUID ¶
ArcCameraUID returns the user id used by camera service and camera test binary.
func IsV1Legacy ¶
IsV1Legacy returns true if the built-in camera is not qualified for Android Camera HALv3 LIMITED hardware level.
Types ¶
type ServiceTestConfigGenerator ¶
type ServiceTestConfigGenerator interface {
TestConfig(req *cameraboxpb.RunTestRequest) TestConfig
}
ServiceTestConfigGenerator generates |TestConfig| from test request for HAL3Service.
type TestConfig ¶
type TestConfig struct { // CameraHALs is a list of camera HALs to test, such as "usb". If // unspecified, all available camera HALs would be tested. CameraHALs []string // CameraFacing is the facing of the camera to test, such as "front" or // "back". This field and CameraHALs are mutually exclusive. CameraFacing string // GtestFilter would be passed to cros_camera_test as the value of // --gtest_filter command line switch. GtestFilter string // GeneratePerfLog describes whether the performance log file should be // generated by cros_camera_test. GeneratePerfLog bool // RequireRecordingParams describes whether the recording parameters should // be generated for cros_camera_test. RequireRecordingParams bool // ForceJPEGHWEnc is the flag to enforce hardware encode for JPEG, so it // won't fall back to SW encode when the HW encode failed. ForceJPEGHWEnc bool // ForceJPEGHWDec is the flag to enforce hardware decode for JPEG, so it // won't fall back to SW decode when the HW decode failed. ForceJPEGHWDec bool // ConnectToCameraService is the flag to connect to the cros-camera service, // instead of loading camera HALs. ConnectToCameraService bool // PortraitModeTestData is the portrait mode test data to be downloaded. PortraitModeTestData string // Number of faces should be detected for face detection test. ExpectedNumFaces string }
TestConfig is the config for HAL3 tests.
func DeviceTestConfig ¶
func DeviceTestConfig() TestConfig
DeviceTestConfig returns test config for running HAL3Device test.
func FrameTestConfig ¶
func FrameTestConfig() TestConfig
FrameTestConfig returns test config for running HAL3Frame test.
func JDATestConfig ¶
func JDATestConfig() TestConfig
JDATestConfig returns test config for running HAL3JDA test.
func JEATestConfig ¶
func JEATestConfig() TestConfig
JEATestConfig returns test config for running HAL3JEA test.
func JEAUSBTestConfig ¶
func JEAUSBTestConfig() TestConfig
JEAUSBTestConfig returns test config for running HAL3JEA test on USB HAL.
func ModuleTestConfig ¶
func ModuleTestConfig() TestConfig
ModuleTestConfig returns test config for running HAL3Module test.
func PerfTestConfig ¶
func PerfTestConfig() TestConfig
PerfTestConfig returns test config for running HAL3Perf test.
func PortraitModeTestConfig ¶
func PortraitModeTestConfig(generatePerfLog bool, portraitModeTestFile string) TestConfig
PortraitModeTestConfig returns test config for running HAL3PortraitMode test.
func PreviewTestConfig ¶
func PreviewTestConfig() TestConfig
PreviewTestConfig returns test config for running HAL3Preview test.
func RecordingTestConfig ¶
func RecordingTestConfig() TestConfig
RecordingTestConfig returns test config for running HAL3Recording test.
func StillCaptureTestConfig ¶
func StillCaptureTestConfig() TestConfig
StillCaptureTestConfig returns test config for running HAL3StillCapture test.
func StillCaptureZSLTestConfig ¶
func StillCaptureZSLTestConfig() TestConfig
StillCaptureZSLTestConfig returns test config for running HAL3StillCaptureZSL test.
func StreamTestConfig ¶
func StreamTestConfig() TestConfig
StreamTestConfig returns test config for running HAL3Stream test.