c2e2etest

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: 13 Imported by: 0

Documentation

Overview

Package c2e2etest contains constants and utilities for the prebuilt android test APK.

Index

Constants

View Source
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

func ApkNameForArch(ctx context.Context, a *arc.ARC) (string, error)

ApkNameForArch gets the name of the APK file to install on the DUT.

func GrantApkPermissions

func GrantApkPermissions(ctx context.Context, a *arc.ARC) error

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

func ValidateXMLLogs(xmlLogFile string) error

ValidateXMLLogs validates the given xml gtest log file

func WaitForCodecReady

func WaitForCodecReady(ctx context.Context, a *arc.ARC) error

WaitForCodecReady waits for an already running E2eTestActivity to finish setup of its codec.

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.

Jump to

Keyboard shortcuts

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