blob: b54f74bd7137d0a8fbc8e705bd2f94f2539849ac [file] [log] [blame]
syntax = "proto3";
package chromite.api;
option go_package = "go.chromium.org/chromiumos/infra/proto/go/chromite/api";
import "chromite/api/build_api.proto";
import "chromite/api/sysroot.proto";
import "chromiumos/common.proto";
import "chromiumos/metrics.proto";
// Proto for executing test-related functionality.
message BuildTargetUnitTestRequest {
message Flags {
// Assume the sysroot is empty.
bool empty_sysroot = 1;
// Whether a toolchain change has occurred.
bool toolchain_changed = 2;
// Whether to produce code coverage data.
bool code_coverage = 3;
}
// The build target being tested.
chromiumos.BuildTarget build_target = 1;
// The path where the result tarball should be saved.
string result_path = 2;
// The chroot containing the sysroot.
chromiumos.Chroot chroot = 3;
// The flags.
Flags flags = 4;
// Skipped packages.
repeated chromiumos.PackageInfo package_blacklist = 5;
// Packages to be tested.
// Defaults to all testable packages when none are given.
repeated chromiumos.PackageInfo packages = 6;
}
message BuildTargetUnitTestResponse {
// The unittest tarball that was created.
string tarball_path = 1;
// The list of packages that failed.
repeated chromiumos.PackageInfo failed_packages = 2;
// The metric events that occurred during the running of BuildTargetUnitTest.
repeated chromiumos.MetricEvent events = 3;
}
// Chromite UnitTest request.
message ChromiteUnitTestRequest {
// The chroot to use to execute the endpoint.
chromiumos.Chroot chroot = 1;
}
message ChromiteUnitTestResponse {
}
message ChromitePytestRequest {
// The chroot to use to execute the endpoint.
chromiumos.Chroot chroot = 1;
}
message ChromitePytestResponse {
}
message CrosSigningTestRequest {
// Required if not in default location.
// The chroot where the tests should be executed.
chromiumos.Chroot chroot = 1;
}
message CrosSigningTestResponse {
}
// Run the debug_info_test script.
message DebugInfoTestRequest {
// The sysroot to tests.
chromite.api.Sysroot sysroot = 1;
// The chroot to use to execute the endpoint.
chromiumos.Chroot chroot = 2;
}
message DebugInfoTestResponse {
}
message VmTestRequest {
// The build target under test. Required.
chromiumos.BuildTarget build_target = 1;
// The chroot in which to run commands. Required.
chromiumos.Chroot chroot = 2;
// Required. The VM image path.
chromiumos.Path vm_path = 3;
// Options for SSHing into the VM.
message SshOptions {
// Path to the private key to the VM.
chromiumos.Path private_key_path = 1;
// SSH port to communicate with VM.
int32 port = 2;
}
// Options for SSHing into the VM.
SshOptions ssh_options = 4;
// The program that manages and runs the tests in the VM.
enum TestHarness {
// No test harness specified.
UNSPECIFIED = 0;
// Run tests with Tast.
TAST = 1;
// Run tests with Autotest.
AUTOTEST = 2;
}
TestHarness test_harness = 5;
// A specific VM test to run.
message VmTest {
// The name pattern for the VM test.
// For Autotest, this pattern matches against the test suite name.
// For Tast, this pattern matches against the Tast test name.
string pattern = 1;
}
// All VM tests that should be run. At least one must be specified.
repeated VmTest vm_tests = 6;
}
message VmTestResponse {
}
message MoblabVmTestRequest {
// Chroot in which to run the VM tests.
chromiumos.Chroot chroot = 1;
// Data used in the test.
message Payload {
// Directory containing the payload.
chromiumos.Path path = 1;
}
// Effectively the full output produced by the image builder.
Payload image_payload = 2;
// Payloads to be loaded into the Moblab VM's cache.
repeated Payload cache_payloads = 3;
}
message MoblabVmTestResponse {
}
message SimpleChromeWorkflowTestRequest {
// The sysroot for which SimpleChrome flow will be run.
// The path and build_target are required.
// Chrome will be built for the specified board using the sysroot.
Sysroot sysroot = 1;
// Chrome source directory under which chromium will be built and tested
// using cros chrome-sdk.
string chrome_root = 2;
// Options for using goma when building Chrome.
chromiumos.GomaConfig goma_config = 3;
}
message SimpleChromeWorkflowTestResponse {
}
// The test service.
service TestService {
option (service_options) = {
module: "test",
service_chroot_assert: INSIDE,
};
// Run a build target's ebuild unit tests.
rpc BuildTargetUnitTest(BuildTargetUnitTestRequest)
returns (BuildTargetUnitTestResponse) {
option (method_options) = {
method_chroot_assert: OUTSIDE,
};
}
// Run the chromite unit tests.
rpc ChromiteUnitTest(ChromiteUnitTestRequest) returns (ChromiteUnitTestResponse);
// Run Pytest in chromite.
rpc ChromitePytest(ChromitePytestRequest) returns (ChromitePytestResponse);
// Run the cros-signing unit tests.
rpc CrosSigningTest(CrosSigningTestRequest) returns (CrosSigningTestResponse);
// Run the debug info tests on a sysroot.
rpc DebugInfoTest(DebugInfoTestRequest) returns (DebugInfoTestResponse);
// Run VM tests and report failures.
rpc VmTest(VmTestRequest) returns (VmTestResponse);
// Run Moblab VM tests and report failures.
rpc MoblabVmTest(MoblabVmTestRequest) returns (MoblabVmTestResponse) {
option (method_options) = {
method_chroot_assert: OUTSIDE,
};
}
// Run the Simple Chrome workflow unit tests.
rpc SimpleChromeWorkflowTest(SimpleChromeWorkflowTestRequest)
returns (SimpleChromeWorkflowTestResponse) {
option (method_options) = {
method_chroot_assert: OUTSIDE,
};
}
}