Documentation ¶
Overview ¶
Package c2e2etest contains constants and utilities for the prebuilt android test APK.
Index ¶
- Constants
- func ApkNameForArch(ctx context.Context, a *arc.ARC) (string, error)
- func GrantApkPermissions(ctx context.Context, a *arc.ARC) error
- func PullLogs(ctx context.Context, a *arc.ARC, ...) (outLogFile, outXMLFile string, err error)
- func RequiredPermissions() []string
- func ValidateXMLLogs(xmlLogFile string) error
- func WaitForCodecReady(ctx context.Context, a *arc.ARC) error
- type VideoMetadata
Constants ¶
const ( // Pkg is the package name of the test APK Pkg = "org.chromium.c2.test" // ActivityName is the name of the test activity ActivityName = ".E2eTestActivity" // X86ApkName is the name of the c2_e2e_test apk for x86/x86_64 devices X86ApkName = "c2_e2e_test_x86.apk" // ArmApkName is the name of the c2_e2e_test apk for arm devices ArmApkName = "c2_e2e_test_arm.apk" )
Variables ¶
This section is empty.
Functions ¶
func ApkNameForArch ¶
ApkNameForArch gets the name of the APK file to install on the DUT.
func GrantApkPermissions ¶
GrantApkPermissions grants the permissions necessary for the test APK.
func PullLogs ¶
func PullLogs(ctx context.Context, a *arc.ARC, arcFilePath, localFilePath, localFilePrefix, textLogName, xmlLogName string) (outLogFile, outXMLFile string, err error)
PullLogs pulls the specified gtest log files
func RequiredPermissions ¶
func RequiredPermissions() []string
RequiredPermissions returns the array of permissions necessary for the test APK.
func ValidateXMLLogs ¶
ValidateXMLLogs validates the given xml gtest log file
Types ¶
type VideoMetadata ¶
type VideoMetadata struct { Profile string `json:"profile"` Width int `json:"width"` Height int `json:"height"` FrameRate int `json:"frame_rate"` NumFrames int `json:"num_frames"` NumFragments int `json:"num_fragments"` MD5Checksums []string `json:"md5_checksums"` }
VideoMetadata stores parsed metadata from test video JSON files, which are external files located in gs://chromiumos-test-assets-public/tast/cros/video/, e.g. test-25fps.h264.json.
func LoadMetadata ¶
func LoadMetadata(filePath string) (*VideoMetadata, error)
LoadMetadata loads a video's metadata from a file.
func (*VideoMetadata) StreamDataArg ¶
func (d *VideoMetadata) StreamDataArg(dataPath string) (string, error)
StreamDataArg returns a string that can be used for an argument to the c2_e2e_test APK. dataPath is the absolute path of the video file.