blob: 36b9d5306819f3d044b955ea4abef55943419f91 [file] [log] [blame]
// Copyright 2019 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package test_platform;
import "chromite/api/test_metadata.proto";
import "chromiumos/common.proto";
import "google/protobuf/duration.proto";
import "test_platform/execution/param.proto";
option go_package = "go.chromium.org/chromiumos/infra/proto/go/test_platform";
// Request represents a request to the ChromeOS Test Platform to run a test,
// set of tests, suite of tests, or test plan on a set of devices (eventually
// also: virtual devices) in the ChromeOS Test Lab.
message Request {
// Params defines parameters that apply to an entire Request.
//
// NEXT_TAG: 11
message Params {
// HardwareAttributes defines the hardware-bound characteristics
// of the devices to run tests on.
message HardwareAttributes {
// Model is the model to run tests against.
string model = 1;
}
HardwareAttributes hardware_attributes = 1;
// SoftwareAttributes defines software characteristics that are strongly
// associated with a device, though not immutable or hardware-bound.
message SoftwareAttributes {
chromiumos.BuildTarget build_target = 2;
}
SoftwareAttributes software_attributes = 2;
// FreeformAttributes defines user-specified device attributes that are
// opaque to the test platform. It is preferrable not to use these, but
// they are provided to cover cases in which the test platform does not
// present a parameter corresponding to the attributes of interest.
message FreeformAttributes {
// SwarmingDimensions are raw swarming bot dimensions, expressed as
// "key:value" strings.
repeated string swarming_dimensions = 1;
}
FreeformAttributes freeform_attributes = 9;
// SoftwareDependency defines mutable software characteristics of the
// devices to run tests on (for instance, the desired version of ChromeOS).
message SoftwareDependency {
oneof dep {
// ChromeOS build name, e.g. "reef-release/R77-12345.0.0"
string chromeos_build = 3;
// Readonly firmware build name, e.g.
// "firmware-reef-9042.B-firmwarebranch/R72-11311.0.0"
string ro_firmware_build = 4;
// Read-write firmware build name, e.g.
// "firmware-reef-9042.B-firmwarebranch/R72-11311.0.0"
string rw_firmware_build = 5;
}
}
repeated SoftwareDependency software_dependencies = 3;
// Scheduling defines parameters that affect how the tests in this
// request are prioritized relative to other requests, and how capacity for
// them is allocated.
message Scheduling {
// ManagedPool enumerates certain large pools of DUTs in the lab.
//
// The distinction between managed / unmanaged pools (below) is historic
// and no longer relevant.
enum ManagedPool {
MANAGED_POOL_UNSPECIFIED = 0;
MANAGED_POOL_CQ = 1;
MANAGED_POOL_BVT = 2;
MANAGED_POOL_SUITES = 3;
MANAGED_POOL_CTS = 4;
MANAGED_POOL_CTS_PERBUILD = 5;
MANAGED_POOL_CONTINUOUS = 6;
MANAGED_POOL_ARC_PRESUBMIT = 7;
MANAGED_POOL_QUOTA = 8;
}
oneof pool {
// Managed pool of devices to run tests in.
ManagedPool managed_pool = 1;
// Unmanaged pool of devices to run tests in.
// Must not be a managed pool.
string unmanaged_pool = 2;
}
// Priority corresponds to a swarming task priority; if specified, it
// should be in the range [50,255]. This priority will be used for
// any swaming tasks created by this run.
//
// Note that the scheduler behavior with a given priority depends on
// other factors, such as pool. In particular, if requests are run in
// a quotascheduler-controlled pool, then this priority will be ignored,
// as priority will be determined by quota account balances.
int64 priority = 4;
// It is an error to set both qs_account and priority at the same time.
// qs_account should be used if the request is scheduled on a pool
// managed by QuotaScheduler. See go/qs-enabled-pools for details.
// If qs_account is set for requests on no QuotaScheduler pools,
// it will be ignored and the request will default to running at
// the lowest priority.
string qs_account = 5;
}
Scheduling scheduling = 4;
// Retry defines parameters that affect how failed tests within
// a request are retried.
message Retry {
// Whether to allow test retries.
bool allow = 1;
// Maximum number of retries of tests within this invocation to allow.
// 0 = unlimited.
int32 max = 2;
}
Retry retry = 5;
// Metadata defines parameters that determine where test definitions
// and metadata are stored and discovered from.
message Metadata {
// A Google Storage path to the location of test metadata to be used.
// For example:
// "gs://chromeos-image-archive/arkham-release/R57-9202.10.11".
string test_metadata_url = 1;
// A Google Storage path to the location of image archive in which to find
// debug symbols to be used in post-process symbolication of crashes. This
// is generally the same as test_metadata_url.
string debug_symbols_archive_url = 2;
}
Metadata metadata = 6;
// Time defines parameters related to timeouts.
message Time {
// Maximum duration for the entire request to be handled.
google.protobuf.Duration maximum_duration = 1;
}
Time time = 7;
// Decorations defines parameters that add additional decorations to
// test runs.
message Decorations {
// AutotestKeyvals are (key, value) pairs that will be added to all
// autotest tasks run.
map<string, string> autotest_keyvals = 1;
// Tags are swarming tags that will be applied to all swarming tasks
// launched.
repeated string tags = 2;
}
Decorations decorations = 8;
// Migrations defines parameters that facilitate gradual migrations between
// different implementations of downstream components.
message Migrations {
// If true, schedule individual tests via buildbucket and run them via
// test_runner recipe.
// Otherwise, schedule individual tests via raw swarming calls and run
// them via skylab_swarming_worker.
// TODO(crbug/1033287): remove when migration is complete.
bool use_test_runner = 1;
// If true, test tasks will perform synchronous offload of the contents
// of $SYNCHRONOUS_OFFLOAD_DIR to a GS bucket. This requires
// use_test_runner to also be set to true: if use_test_runner is set to
// false and enable_synchronous_offload is set to true, the build will
// fail validation.
// If false, such offload will be skipped.
bool enable_synchronous_offload = 2;
// Turn on synchronous offloads even if there is no pubsub topic set.
// Not intended as a long-term change, but useful for testing synchronous
// offloads during rollout.
bool notificationless_offload = 3;
}
Migrations migrations = 12;
// Uniformly applied parameters for all test executions in this request.
test_platform.execution.Param execution_param = 13;
reserved "notifications";
reserved 11;
reserved "legacy";
reserved 10;
}
Params params = 1;
// SuiteRequest defines an individual named suite.
message Suite {
string name = 1;
}
message Test {
message Autotest {
string name = 1;
string test_args = 2;
// Name to be used to display this test's output artifacts, e.g. logs,
// results etc. By default display_name is the same as name.
//
// display_name is especially useful when using test_args to distinguish
// between multiple instances of the same test in a request.
string display_name = 3;
}
oneof harness {
Autotest autotest = 1;
}
}
// Enumeration is a previously enumerated test plan.
//
// This is a copy of test_platform.steps.EnumerationResponse
// Keep in sync.
message Enumeration {
message AutotestInvocation {
chromite.api.AutotestTest test = 1;
string test_args = 2;
string display_name = 3;
map<string, string> result_keyvals = 4;
}
repeated AutotestInvocation autotest_invocations = 2;
}
message TestPlan {
repeated Suite suite = 1;
repeated Test test = 2;
Enumeration enumeration = 3;
}
TestPlan test_plan = 5;
reserved 6, 7;
}