1// Copyright 2023 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 "chromiumos/test/lab/api/ip_endpoint.proto"; 12import "google/protobuf/any.proto"; 13 14 15// PostTestService acts as a post-test landing point for needed services/actions. 16// For example: 17// - getting the fw versions for RDB uploading 18// - getting crash logs in the event of a harness crash 19// - getting specific file from the DUT 20// Could be expanded to include harness agnostic post-test cleanups, repairs, etc. 21service PostTestService { 22 // StartUp prepares the post test service by providing 23 // necessary input values for initialization prior to 24 // calling any other provision related service calls. 25 rpc StartUp(PostTestStartUpRequest) 26 returns (PostTestStartUpResponse); 27 28 rpc RunActivity(RunActivityRequest) 29 returns (RunActivityResponse) { 30 option deprecated = true; 31 }; 32 33 rpc RunActivities(RunActivitiesRequest) 34 returns (RunActivitiesResponse); 35} 36 37// PostTestStartUpRequest provides a generic form for initializing 38// any post test service. This provides a route for initialization 39// rather than using the CLI arguments to provide this info. 40message PostTestStartUpRequest { 41 chromiumos.test.lab.api.IpEndpoint dut_server = 1; 42 // Specific metadata to the individual PostTest service implementation. 43 google.protobuf.Any metadata = 2; 44} 45 46// PostTestStartUpResponse provides a status message to signal 47// what the result of startup call was. 48message PostTestStartUpResponse { 49 enum Status { 50 // In proto3, zero value fields are indistinguishable from unset fields, 51 // by design. They are not sent on the wire either. 52 // SHOULD NOT BE USED. 53 STATUS_UNSPECIFIED = 0; 54 STATUS_SUCCESS = 1; 55 STATUS_INVALID_REQUEST = 2; 56 STATUS_STARTUP_FAILED = 3; 57 } 58 Status status = 1; 59} 60 61// Specific request to run. Must be from the list below. 62message RunActivityRequest { 63 Request request = 1; 64} 65 66// NEXT TAG: 7 67message Request { 68 oneof request { 69 GetFWInfoRequest get_fw_info_request = 1; 70 GetFilesFromDUTRequest get_files_from_dut_request = 2; 71 GetGfxInfoRequest get_gfx_info_request = 3; 72 GetAvlInfoRequest get_avl_info_request = 4; 73 GetGscInfoRequest get_gsc_info_request = 5; 74 GetServoInfoRequest get_servo_info_request = 6; 75 } 76} 77 78// Request to run post process activities. 79// NEXT TAG: 4 80message RunActivitiesRequest { 81 repeated Request requests = 1; 82 // Address of the DUT Server. 83 chromiumos.test.lab.api.IpEndpoint dut_server = 2; 84 85 // Test results corresponding to "chromiumos.test.artifact.TestResult" proto. 86 // Note that the TestResult proto cannot be imported directly due to the 87 // cyclic import issue. 88 google.protobuf.Any test_result = 3; 89} 90 91message RunActivitiesResponse { 92 repeated RunActivityResponse responses = 1; 93} 94 95// GetFWInfo gets the fwInfo needed for rdb uploads from DUT. 96message GetFWInfoRequest {} 97 98// GetFilesFromDUT will gather files from the DUT post test. 99message GetFilesFromDUTRequest{ 100 repeated string files = 1; 101} 102 103// GetGfxInfo captures graphics/hardware_probe values for reporting. 104message GetGfxInfoRequest {} 105 106// GetAvlInfoRequest captures AVL qualification values for reporting. 107// NEXT TAG: 2 108message GetAvlInfoRequest { 109 // Mapping from test name to its own avl info JSON file location. 110 // Location format: 111 // "<local_output_dir>/cros-test/artifact/tast/tests/<test_name>/avl_info.json" 112 map<string, string> avl_files = 1 [deprecated = true]; 113} 114 115// GetGscInfoRequest captures GSC devboard tags for reporting. 116// NEXT TAG: 2 117message GetGscInfoRequest { 118 // Mapping from test name to its own GSC devboard tags file location. 119 // Location format: 120 // "<local_output_dir>/cros-test/results/tast/tests/<test_name>/result_tags.json" 121 map<string, string> gsc_files = 1 [deprecated = true]; 122} 123 124// GetServoInfoRequest captures the servo information for reporting. 125// NEXT TAG: 1 126message GetServoInfoRequest {} 127 128// Specific response to be matched with the request. 129// NEXT TAG: 7 130message RunActivityResponse { 131 oneof response { 132 GetFWInfoResponse get_fw_info_response = 1; 133 GetFilesFromDUTResponse get_files_from_dut_response = 2; 134 GetGfxInfoResponse get_gfx_info_response = 3; 135 GetAvlInfoResponse get_avl_info_response = 4; 136 GetGscInfoResponse get_gsc_info_response = 5; 137 GetServoInfoResponse get_servo_info_response = 6; 138 } 139} 140 141// GetFWInfoResponse provides the value of each field from the DUT. 142message GetFWInfoResponse { 143 string ro_fwid = 1; 144 string rw_fwid = 2; 145 string kernel_version = 3; 146 string gsc_ro = 4; 147 string gsc_rw = 5; 148} 149 150 151// GetFWInfoResponse is a list of filemaps in relation to the service. 152message GetFilesFromDUTResponse{ 153 repeated FileMap file_map = 1; 154} 155 156// FileMap file_name:location in relation to the service. 157message FileMap { 158 string file_name = 1; 159 string file_location = 2; 160} 161 162// GetGfxInfoResponse contents of the reporting section of graphics/hardware_probe 163message GetGfxInfoResponse { 164 map<string, string> gfx_labels = 1; 165} 166 167// GetAvlInfoResponse contents of the reporting section of AVL qualification 168// info. 169// NEXT TAG: 2 170message GetAvlInfoResponse { 171 // Mapping from test name to its avl info. 172 map<string, AvlInfo> avl_infos = 1; 173} 174 175// AvlInfo AVL qualification info for a test run. 176// NEXT TAG: 4 177message AvlInfo { 178 string avl_part_model = 1; 179 string avl_part_firmware = 2; 180 string avl_component_type = 3; 181} 182 183// GetGscInfoResponse contents of the reporting section of GSC devboard info. 184// NEXT TAG: 2 185message GetGscInfoResponse { 186 // Mapping from test name to its GSC devboard info: 187 // "chromiumos.test.artifact.GscInfo". Note that the GscInfo proto cannot 188 // be imported directly due to cyclic import issue. 189 map<string, google.protobuf.Any> gsc_infos = 1; 190} 191 192// GetServoInfoResponse contents of the information from the servo file 193// NEXT TAG: 2 194message GetServoInfoResponse { 195 // Stores servo info: 196 // "chromiumos.test.artifact.BuildMetadata.ServoInfo". Note that the ServoInfo proto cannot 197 // be imported directly due to cyclic import issue. 198 google.protobuf.Any servo_info = 1; 199} 200