Documentation
¶
Overview ¶
Package compatibility provides functions for backwards compatibility with test platform.
Package compatibility provides functions for backwards compatibility with test platform.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestableBuilds ¶
func TestableBuilds( ctx context.Context, hwTestPlans []*test_api_v1.HWTestPlan, vmTestPlans []*test_api_v1.VMTestPlan, builds []*bbpb.Build, builderConfigs *chromiumos.BuilderConfigs, dutAttributeList *testpb.DutAttributeList, ) ([]*bbpb.Build, error)
TestableBuilds computes the builds in generateTestPlanReq that could possibly match a CoverageRule in hwTestPlans or vmTestPlans. A build can match a CoverageRule if its target matches the target(s), variant, and profile required by the CoverageRule. The builds in generateTestPlanReq do not necessarily need to be completed with test artifacts, they just need to have build target information set on the input property. TestableBuilds is different from ToCTP1, which actually selects specific builds and programs to test based off completed builds; TestableBuilds computes which builds could possibly be tested, e.g. to know which builds to collect.
func ToCTP1 ¶
func ToCTP1( ctx context.Context, rnd *rand.Rand, hwTestPlans []*test_api_v1.HWTestPlan, vmTestPlans []*test_api_v1.VMTestPlan, generateTestPlanReq *testplans.GenerateTestPlanRequest, dutAttributeList *testpb.DutAttributeList, boardPriorityList *testplans.BoardPriorityList, builderConfigs *chromiumos.BuilderConfigs, ) (*testplans.GenerateTestPlanResponse, error)
ToCTP1 converts a [VM|HW]TestPlan to a GenerateTestPlansResponse, which can be used with CTP1.
[HW|VM]TestPlan protos target CTP2, this method is meant to provide backwards compatibility with CTP1. Because CTP1 does not support rules-based testing, there are some limitations to the [HW|VM]TestPlans that can be converted:
- Both the "attr-program" and "swarming-pool" DutAttributes must be used in each DutTarget. The "attr-design" and "misc-license" DutAttributes are optional.
- Multiple values for "attr-program" are allowed, a program will be chosen randomly proportional to the board's priority in boardPriorityList (lowest priority is most likely to get chosen, negative priorities are allowed, programs without a priority get priority 0).
- Only TestCaseIds are supported for hardware testing, and only TestCaseTagCriteria are supported for VM testing.
- generateTestPlanReq is needed to provide Build protos for the builds being tested.
- builderConfigs is needed to provide Portage profile information for the builds being tested.
Types ¶
This section is empty.