• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2021 The ChromiumOS Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto3";
6
7package chromiumos.test.api;
8
9option go_package = "go.chromium.org/chromiumos/config/go/test/api";
10
11import "google/protobuf/any.proto";
12import "chromiumos/test/api/provision_state.proto";
13import "chromiumos/test/api/cros_provision_cli.proto";
14import "chromiumos/test/api/test_case_result.proto";
15import "chromiumos/test/api/test_suite.proto";
16import "chromiumos/test/api/cros_test_finder_cli.proto";
17import "chromiumos/test/lab/api/dut.proto";
18import "chromiumos/test/lab/api/ip_endpoint.proto";
19import "chromiumos/test/api/pre_test_service.proto";
20import "chromiumos/test/api/post_test_service.proto";
21
22// CrosToolRunnerProvisionRequest specifies a list of DUTs to be provision.
23message CrosToolRunnerProvisionRequest {
24  message Device {
25    // DUT to be provisioned.
26    chromiumos.test.lab.api.Dut dut = 1;
27    // Provision state is pass through request to the provision service.
28    ProvisionState provision_state = 2;
29    // ContainerMetadataKey is the key to search in the ContainerMetadata map
30    // defined in container_metadata.proto
31    string container_metadata_key = 3;
32  }
33
34  // The device information for each DUT's provision request.
35  repeated Device devices = 1;
36  // The server that can provide inventory service.
37  chromiumos.test.lab.api.IpEndpoint inventory_server = 2;
38  // The path of directory that will store all the cros-provision artifacts.
39  string artifact_dir = 3 ;
40}
41
42// CrosToolRunnerProvisionResponse includes provision result for each DUT.
43message CrosToolRunnerProvisionResponse {
44  // Responses for all the requests specified in
45  // CrosToolRunnerProvisionRequest.details.
46  repeated CrosProvisionResponse responses = 1;
47}
48
49// CrosToolRunnerTestRequest specifies tests to be run.
50message CrosToolRunnerTestRequest {
51  enum CrosTestContainerType {
52    ALL = 0;
53    CQ_LIGHT = 1;
54  }
55
56  message Device {
57    // DUT to be used in test execution.
58    chromiumos.test.lab.api.Dut dut = 1;
59    // ContainerMetadataKey is the key to search in the ContainerMetadata map
60    // defined in container_metadata.proto
61    string container_metadata_key = 2;
62  }
63  // Test suites to run (by tag or explicit list of tests)
64  repeated TestSuite test_suites = 1;
65  // Primary DUT.
66  Device primary_dut = 2;
67  // A list of companion DUTs to be used for running tests.
68  repeated Device companion_duts = 3;
69  // Inventory Server address.
70  chromiumos.test.lab.api.IpEndpoint inventory_server = 4;
71  // The path of directory that will store all the cros-test artifacts.
72  string artifact_dir = 5 ;
73  // Test harness specific metadata
74  google.protobuf.Any metadata = 6;
75  // Supported cros-test container type
76  CrosTestContainerType cros_test_container_type = 7;
77}
78
79// CrosToolRunnerTestResponse includes all test results.
80message CrosToolRunnerTestResponse {
81  repeated TestCaseResult test_case_results = 1;
82  google.protobuf.Any metadata = 2;
83}
84
85// CrosToolRunnerTestFinderRequest specifies a list of test suites
86// with or without tags.
87message CrosToolRunnerTestFinderRequest {
88  // Test suites to run by tag or explicit list of tests.
89  repeated TestSuite test_suites = 1;
90  // The path of directory that will store all the cros-test-finder artifacts.
91  string artifact_dir = 2 ;
92  // ContainerMetadataKey is the key to search in the ContainerMetadata map
93  // defined in container_metadata.proto
94  string container_metadata_key = 3;
95  // The caller should construct the entire request to go to the service. The
96  // test_suites field should not be provided if this field is provided and
97  // vise versa (test_suites field is not deleted for backwards compatibility
98  // reasons)
99  chromiumos.test.api.CrosTestFinderRequest request = 4;
100}
101
102// CrosToolRunnerTestFinderResponse return a lit of test suites
103// without tags.
104message CrosToolRunnerTestFinderResponse {
105  // Test suites to run by an explicit list of tests.
106  repeated TestSuite test_suites = 1;
107}
108
109message CrosToolRunnerPreTestRequest {
110  // The path of directory that will store all the pre-test-request artifacts.
111  string artifact_dir = 1 ;
112  // ContainerMetadataKey is the key to search in the ContainerMetadata map
113  // defined in container_metadata.proto
114  string container_metadata_key = 2;
115  // The caller should construct the entire request to go to the service.
116  FilterFlakyRequest request = 3;
117
118}
119
120// CrosToolRunnerPreTestResponse return filtered list.
121message CrosToolRunnerPreTestResponse {
122  // Service response from the caller.
123  FilterFlakyResponse response = 1;
124}
125
126message CrosToolRunnerPostTestRequest {
127  // The path of directory that will store all the post-test-request artifacts.
128  string artifact_dir = 1 ;
129  // ContainerMetadataKey is the key to search in the ContainerMetadata map
130  // defined in container_metadata.proto
131  string container_metadata_key = 2;
132  // The caller should construct the entire request to go to the service.
133  RunActivitiesRequest request = 3;
134
135  message Device {
136    // DUT to be used in test execution.
137    chromiumos.test.lab.api.Dut dut = 1;
138    // ContainerMetadataKey is the key to search in the ContainerMetadata map
139    // defined in container_metadata.proto
140    string container_metadata_key = 2;
141  }
142  // Primary DUT.
143  Device primary_dut = 4;
144}
145
146message CrosToolRunnerPostTestResponse {
147  // Service response from the caller.
148  RunActivitiesResponse response = 1;
149}
150