compatibility

package
v0.0.0-...-0342304 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2024 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package compatibility provides functions for backwards compatiblity with test platform.

Copyright 2022 The ChromiumOS Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2023 The ChromiumOS Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestableBuilds

func TestableBuilds(
	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(
	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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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