blob: 547597273910016d66995524a55bc0479f4fbc34 [file] [edit]
syntax = "proto2";
package continuous_tests;
// When building proto outside of google3, it fails to build if any
// enum values in the same message have the same name, because
// natively enum values in a message are all siblings instead of being
// local-scoped within their parent enum. As a result, we cannot
// follow the google3 best practice to have the 0th enum value by DEFAULT
// in all cases. These protos get copied to google3 via copybara, and in
// google3 we get linter warnings when any enum values have the same name.
// (-- api-linter: enum_default_value=disabled --)
message BuildTargets {
enum BranchType {
ALL = 0;
MASTER = 1;
RELEASE = 2;
}
// Branch can be specified either by name or type.
message Branch {
oneof BranchSpec {
BranchType type = 1;
string name = 2;
}
}
enum Variant {
DEFAULT = 0; // all variants
ENG = 1;
USER = 2;
ARM = 3;
X86 = 4;
X64 = 5;
ARM64 = 6;
USERDEBUG = 7;
}
// Branch types under test (default = All branch types).
optional BranchType branch_types = 1;
// Strings of product capabilities for the types of products under test.
// Product capabilities are defined in:
// https://cs.corp.google.com/eureka_internal/builder/masters/configs/eureka/build_config.protoascii
repeated string product_types = 2;
// Specific product(s) under test. Prefer using product_types where possible.
repeated string products = 3;
// Variants under test.
optional Variant variants = 4;
// (Optional) The builder_name builds being targeted.
// When unused (default), catatester will target all builder_names that
// match every specified <product>-<variant> combination.
// Set this to explicitly set builder_names for targeting non-conventional
// builds: i.e. steak-yeti, biggie-mesh.
// This is additive to any branch_types specified.
repeated string builder_names = 5;
// Branches under test (default = All branches).
repeated Branch branches = 6;
}
message Schedule {
// Cron-based scheduler string for how often to test new builds.
optional string cron = 1;
enum Policy {
DEFAULT = 0; // by default, LATEST_UNTESTED_BUILD
LATEST_UNTESTED = 1; // will backfill older untested builds
LATEST = 2; // will test latest even if already tested before
LATEST_MINUS_ONE = 3; // will test latest minus one untested OTA
}
// Scheduler policy for which build to test.
optional Policy policy = 2;
}
message BotRequirement {
optional string bot_dimension = 1;
optional string value = 2;
}
message CastOsModule {
optional string cipd_package = 1;
optional string cipd_version = 2;
}
message TestTarget {
enum Recipe {
HOME_RUNNER = 0;
DEVICE_UNIT_TEST_RUNNER = 1;
OTA_INSTALLABLE_RUNNER = 2;
LIBASSISTANT_RUNNER = 3;
FUCHSIA_GUNIT_RUNNER = 4; // Deprecated
FUCHSIA_RUNNER = 5;
VIRTUAL_DEVICE_RUNNER = 6;
}
enum Priority {
DEFAULT = 0; // Controller currently interprets default == medium
CRITICAL = 1;
MEDIUM = 2;
HIGH = 3;
LOW = 4;
}
// Path to the test config file. (relative to test_configs_root).
optional string config = 1;
// By default, catatester will run all test cases in the test config.
// Set this if you wish to run only a specific subset of named test cases that
// are defined in the test config file.
repeated string test_cases = 2;
// Name of the binary to execute for this test config.
optional string binary_name = 3;
// Test priority.
optional Priority priority = 4;
// Whether this test target is enabled (default = true).
optional bool enabled = 5 [default = true];
// The luci-py recipe to use for running the swarming task.
optional Recipe recipe = 6;
// The test timeout (mins). Does not include ota install time.
optional int32 test_timeout_mins = 7 [default = 60];
// Names of test groups that this test belongs to.
// Test group tags must be defined in test_group_tags.
repeated string test_groups = 8;
// Optional list of testbed requirements that the test requires.
repeated BotRequirement testbed_requirements = 9;
// the key of the cipd_refs map to be used for this test.
optional string cipd_refs_key = 10 [default = 'internal'];
// Bot pool to use for allocation. Default value set by controller.
optional string bot_pool = 11;
// CastOs Modules to install before running the test.
repeated CastOsModule castos_modules = 12;
// Whether to skip setting default bot dimensions when scheduling the test.
// If True, all dimensions (other than pool) must be set in
// testbed_requirements.
optional bool skip_default_dimensions = 13;
}
enum BuildPlatform {
DEFAULT = 0;
CATABUILDER = 1;
ANDROID_BUILD = 2;
}
message ContinuousTest {
optional TestTarget test_target = 1;
repeated BuildTargets build_targets = 2;
}
message ScheduledTest {
optional TestTarget test_target = 1;
repeated BuildTargets build_targets = 2;
// Set if you want a cron-based scheduler for running tests.
// When not set (by default), catatester will test every matching new build
// continuously.
optional Schedule schedule = 3;
repeated string branches = 4;
optional string repo = 5 [default = "internal"];
// (Optional) The platform where the build comes from.
// By default, every build is from Catabuilder.
optional BuildPlatform build_platform = 6 [default = CATABUILDER];
}
message ContinuousTestsConfig {
// Relative path from continuous-tests repo to the test configs root dir.
optional string test_configs_root = 1;
// Continuous test targets.
repeated ContinuousTest continuous_test = 2;
// Scheduled test targets.
repeated ScheduledTest scheduled_test = 3;
// Priority-Ordering of branch types.
repeated BuildTargets.BranchType branch_type_priorities = 4;
// Branch names that we no longer want to test.
repeated string disabled_branches = 5;
// Build restrictions for certain products.
// Useful for new products where we don't have enough inventory to test every
// build_target permutation desired by the tests.
message BuildRestrictions {
repeated BuildTargets.BranchType allowed_branch_types = 1;
repeated BuildTargets.Variant allowed_variants = 2;
}
map<string, BuildRestrictions> build_restrictions = 6;
// Defines common test group tags.
repeated string test_group_tags = 7;
// Device modules passed to the test runner to instantiate the correct
// device class during the execution of tests.
message DeviceModule {
optional string device_module = 1;
optional string device_class = 2;
}
map<string, DeviceModule> device_modules = 8;
// Per repo CIPD references
message CipdRef {
optional string package_name = 1;
optional string version = 2;
optional string path = 3;
}
message CipdRefs {
repeated CipdRef refs = 1;
}
map<string, CipdRefs> cipd_refs = 9;
}