Documentation
¶
Overview ¶
Package common is the common package.
Package common is the common package.
Package common is the common package.
Index ¶
- func AddFlexibleTFFlag(tp *api.InternalTestplan)
- func Converter(deps []*api.TestCase_Dependency) []*api.TestCase_Dependency
- func ExtractBucketAndPrefixFromPath(gcsPath string) (bucketName, prefix string, err error)
- func FindNewestDirInGcsBucket(ctx context.Context, gcsBasePath string, bucket *storage.BucketHandle, ...) (string, error)
- func GenerateSuiteInfo() *api.SuiteInfo
- func GenerateSuiteInfoTF() *api.SuiteInfo
- func GenerateTestMetadata() []*api.TestCaseMetadata
- func PullAllFilesFromGcsDir(ctx context.Context, bucket *storage.BucketHandle, dir string, postfix string) ([][]byte, error)
- func TestSuiteFromTestplan(req *api.InternalTestplan) ([]*api.TestSuite, error)
- func TranslateTCMtoCTPTC(matchingTests []*api.TestCaseMetadata) (CTPTCs []*api.CTPTestCase)
- type AbstractFinder
- type FinderHarness
- type FinderInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFlexibleTFFlag ¶
func AddFlexibleTFFlag(tp *api.InternalTestplan)
append the magical `FlexibleTF` key on the suiteArgs to be processed by cros-test.
func Converter ¶
func Converter(deps []*api.TestCase_Dependency) []*api.TestCase_Dependency
Converter will convert and revert the TC dependency in case its in the legacy style.
func GenerateSuiteInfo ¶
GenerateSuiteInfo creates SuiteInfo to be used in unittests.
func GenerateSuiteInfoTF ¶
GenerateSuiteInfo creates SuiteInfo to be used in unittests.
func GenerateTestMetadata ¶
func GenerateTestMetadata() []*api.TestCaseMetadata
GenerateTestMetadata creates TestCaseMetadata to be used in unittests.
func PullAllFilesFromGcsDir ¶
func PullAllFilesFromGcsDir(ctx context.Context, bucket *storage.BucketHandle, dir string, postfix string) ([][]byte, error)
PullAllFilesFromGcsDir will grab all the files from a dir matching the postfix
func TestSuiteFromTestplan ¶
func TestSuiteFromTestplan(req *api.InternalTestplan) ([]*api.TestSuite, error)
TestSuiteFromTestplan will create the TestSuite from the TestPlan (req).
func TranslateTCMtoCTPTC ¶
func TranslateTCMtoCTPTC(matchingTests []*api.TestCaseMetadata) (CTPTCs []*api.CTPTestCase)
TranslateTCMtoCTPTC will translate []*api.TestCaseMetadata to []*api.CTPTestCase
Types ¶
type AbstractFinder ¶
type AbstractFinder struct { FinderInterface FinderHarness FinderHarness Testplan *api.InternalTestplan Logger *log.Logger // contains filtered or unexported fields }
AbstractFinder satisfies the executor requirement that is common to all.
func NewAbstractFinder ¶
func NewAbstractFinder(ctx context.Context, req *api.InternalTestplan, exType FinderHarness, log *log.Logger) *AbstractFinder
NewAbstractFinder provides a new Abstract Finder
func (*AbstractFinder) GetFinderHarness ¶
func (ex *AbstractFinder) GetFinderHarness() FinderHarness
GetFinderHarness returns the type of the FinderHarness.
type FinderHarness ¶
type FinderHarness string
type FinderInterface ¶
type FinderInterface interface { // GetFinderHarness returns the executor type. GetFinderHarness() FinderHarness // ExecuteCommand executes the provided command via current executor. FindTestsAB() (*api.InternalTestplan, error) }
FinderInterface defines the contract an executor will have to satisfy.