lin
2025-08-21 57113df3a0e2be01232281fad9a5f2c060567981
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
// Copyright 2016 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
 
syntax = "proto2";
 
package android.vts;
option java_package = "com.android.vts.proto";
option java_outer_classname = "VtsReportMessage";
option java_multiple_files = false;
 
 
// To specify test case execution result.
enum TestCaseResult {
  UNKNOWN_RESULT = 0;
  TEST_CASE_RESULT_PASS = 1;
  TEST_CASE_RESULT_FAIL = 2;
  TEST_CASE_RESULT_SKIP = 3;
  TEST_CASE_RESULT_EXCEPTION = 4;
  TEST_CASE_RESULT_TIMEOUT = 5;
}
 
 
// To specify the VTS test type.
enum VtsTestType {
  UNKNOWN_VTS_TESTTYPE = 0;
  VTS_HOST_DRIVEN_STRUCTURAL = 1;
  VTS_HOST_DRIVEN_FUZZING = 2;
  VTS_TARGET_SIDE_GTEST = 3;
  VTS_TARGET_SIDE_FUZZING = 4;
}
 
enum VtsProfilingRegressionMode {
  UNKNOWN_REGRESSION_MODE = 0;
  // disable analysis
  VTS_REGRESSION_MODE_DISABLED = 1;
  // interpret increases in values as regression
  VTS_REGRESSION_MODE_INCREASING = 2;
  // interpret decreases in values as regression
  VTS_REGRESSION_MODE_DECREASING= 3;
}
 
enum VtsProfilingType {
  UNKNOWN_VTS_PROFILING_TYPE = 0;
  // for one sample which measures the time between two profiling points.
  VTS_PROFILING_TYPE_TIMESTAMP = 1;
  // for multiple single-type samples with labels.
  VTS_PROFILING_TYPE_LABELED_VECTOR = 2;
  // for multiple single-type samples without labels.
  VTS_PROFILING_TYPE_UNLABELED_VECTOR = 3;
}
 
// To specify a call flow event.
message AndroidDeviceInfoMessage {
  // product type (e.g., bullhead).
  optional bytes product_type = 1;
 
  // product type variant (e.g., still bullhead or another name).
  optional bytes product_variant = 2;
 
  // build type (e.g., userdebug).
  optional bytes build_flavor = 11;
 
  // Android Build ID.
  optional bytes build_id = 12;
 
  // branch name (e.g., master or nyc-dev).
  optional bytes branch = 21;
 
  // build alias implies the branch name.
  optional bytes build_alias = 22;
 
  // API level
  optional bytes api_level = 31;
 
  // ABI name that is current in use for the test
  optional bytes abi_name = 51;
 
  // ABI bitness that is current in use for the test. Example: '32', '64',
  optional bytes abi_bitness = 52;
 
  // Device USB serial number
  optional bytes serial = 101;
}
 
 
// To specify build info.
message AndroidBuildInfo {
  // build ID.
  optional bytes id = 1;
 
  // device name (e.g., bullhead).
  optional bytes name = 11;
 
  // build type (e.g., userdebug)
  optional bytes build_type = 12;
 
  // branch name (e.g., master or nyc-dev)
  optional bytes branch = 13;
 
  // indicates the latest commit information of each branch (e.g., xml format).
  optional bytes build_summary = 21;
}
 
 
// To specify the information about a host node.
message VtsHostInfo {
  // the host name (i.e., full domain name).
  optional bytes hostname = 1;
}
 
 
// To specify a test case execution report.
message TestCaseReportMessage {
  // the test case name.
  optional bytes name = 1;
 
  // the test result.
  optional TestCaseResult test_result = 11;
 
  // execution start and end time stamp.
  optional int64 start_timestamp = 21;
  optional int64 end_timestamp = 22;
 
  // coverage report per file
  repeated CoverageReportMessage coverage = 31;
 
  // profiling reports
  repeated ProfilingReportMessage profiling = 41;
 
  // systrace report message per file
  repeated SystraceReportMessage systrace = 42 [deprecated=true];
 
  // log for each test case. May contain multiple logs such as logcat, host log,
  // etc.
  repeated LogMessage log = 101;
}
 
 
// To specify a profiling report.
message ProfilingReportMessage {
  // the instrumentation point name.
  optional bytes name = 1;
  optional VtsProfilingType type = 2;
  optional VtsProfilingRegressionMode regression_mode = 3;
 
  // profiling start and end time stamp (for performance).
  optional int64 start_timestamp = 11;
  optional int64 end_timestamp = 12;
 
  repeated bytes label = 21;
  repeated int64 value = 22;
 
  // x-axis and y-axis title labels when displaying the data as a graph
  optional bytes x_axis_label = 31;
  optional bytes y_axis_label = 32;
 
  // a list of strings where each string has the form of 'key=value'.
  // used to tell certain properties of the data (e.g., passthrough vs.
  // binderized).
  repeated bytes options = 41;
}
 
// To specify a systrace report.
message SystraceReportMessage {
  // the target process name used by systrace
  optional bytes process_name = 1;
 
  // the produced html report
  repeated bytes html = 11;
 
  // URLs of the produced html reports
  repeated bytes url = 21;
}
 
// To specify a coverage report.
message CoverageReportMessage {
  // the path to the source file from the project root.
  optional bytes file_path = 11;
 
  // the name of the project where the file can be found
  optional bytes project_name = 12;
 
  // the commit ID identifying the code revision
  optional bytes revision = 13;
 
  // i-th element gives the number of times i-th line is executed.
  repeated int64 line_coverage_vector = 23;
 
  // the number of source code lines that are instrumented for code coverage
  // measurement.
  optional int32 total_line_count = 101;
 
  // the number of source code lines that are executed.
  optional int32 covered_line_count = 102;
 
  // TODO(ryanjcampbell@) delete deprecated field
  // the directory path of a source file.
  optional bytes dir_path = 1 [deprecated=true];
 
  // TODO(ryanjcampbell@) delete deprecated field
  // the name of the source file.
  optional bytes file_name = 2 [deprecated=true];
 
  // TODO(ryanjcampbell@) delete deprecated field
  // produced html report.
  optional bytes html = 3 [deprecated=true];
}
 
// Information for a HAL interface.
message HalInterfaceMessage {
  // HAL package name. e.g. android.hardware.foo.
  optional bytes hal_package_name = 1;
  // HAL (major) version. e.g. 1.
  optional int32 hal_version_major = 2;
  // HAL (minor) version. e.g. 0.
  optional int32 hal_version_minor = 3;
  // HAL interface name. e.g. IFoo.
  optional bytes hal_interface_name = 4;
  // HAL release level (e.g. "current", "27", "28")
  optional bytes hal_release_level = 5;
}
 
// To specify a API coverage report. Currently only for HAL API coverage.
message ApiCoverageReportMessage {
  // Hal interface info.
  optional HalInterfaceMessage hal_interface = 1;
 
  // APIs provided by the HAL with given package, version and interface name.
  repeated bytes hal_api = 11;
 
  // APIs covered by the test.
  repeated bytes covered_hal_api = 12;
}
 
// To specify log report. This can be used either for per-test-module
// log message or per-test-case log message.
message LogMessage {
  // URL of a produced log file (e.g., stdout, stderr).
  optional bytes url = 1;
 
  // Name of a log file.
  optional bytes name = 2;
 
  // Content of log. Caution: do not put too much log in protobuf message,
  // as BigTable for example recommends < 10 MB for each record cell.
  optional bytes content = 3;
}
 
// To specify a resource object (reachable via a URL or contained in the
// message). This can be used to store a log file or an XML (or HTML) report
// file kept in a Google Cloud Storage (GCS) bucket or partner's network file
// system, or hosted by a HTTP server.
message UrlResourceMessage {
  // URL of a resource file.
  optional bytes url = 1;
 
  // Name of a resource file representing its type and does not have to be
  // the same as the exact file name.
  optional bytes name = 2;
 
  // Raw content of a resource file. Used if the file is small.
  optional bytes content = 3;
}
 
// To specify a test execution report.
message TestReportMessage {
  // The test suite name.
  optional bytes test_suite = 1 [deprecated=true];
 
  // The test name.
  optional bytes test = 2;
 
  // The test type
  optional VtsTestType test_type = 3;
 
  // Target device info
  repeated AndroidDeviceInfoMessage device_info = 4;
 
  // Build info
  optional AndroidBuildInfo build_info = 5;
 
  // Email addresses of subscribers to the test results
  repeated bytes subscriber_email = 6;
 
  // Info about the host computer
  optional VtsHostInfo host_info = 7;
 
  // Test case reports
  repeated TestCaseReportMessage test_case = 11;
 
  // Profiling reports
  repeated ProfilingReportMessage profiling = 21;
 
  // Systrace report per file
  repeated SystraceReportMessage systrace = 22  [deprecated=true];
 
  // Execution start and end time stamp.
  optional int64 start_timestamp = 101;
  optional int64 end_timestamp = 102;
 
  // Coverage report per file
  repeated CoverageReportMessage coverage = 103;
 
  // API coverage report for each HAL interface.
  repeated ApiCoverageReportMessage api_coverage = 104;
 
  // Log for a test module. May contain multiple logs such as logcat, host log,
  // etc.
  repeated LogMessage log = 1001;
 
  // URL links for the test run.
  repeated UrlResourceMessage link_resource = 1011;
}
 
// To specify a test execution report.
message TestPlanReportMessage {
  // Keys used to find all TestReportMessage messages of test modules in
  // this plan.
  repeated string test_module_name = 11;
  repeated int64 test_module_start_timestamp = 12;
 
  // The test plan name.
  optional string test_plan_name = 21;
 
  // Report resource flies.
  repeated UrlResourceMessage partner_report = 31;
 
  // Available HAL APIs for coverage measurement.
  // Only used for profiling test plan.
  repeated ApiCoverageReportMessage hal_api_report = 41;
 
  // Detailed information about the execution environment (e.g., branch,
  // build ID, and device) can be found in the associated TestReportMessage(s)
  // which share the same test_plan_execution_id.
}
 
// Proto wrapper for posting data to the VTS Dashboard
message DashboardPostMessage {
  // oauth2.0 access token
  optional string access_token = 1;
 
  repeated TestReportMessage test_report = 2;
  repeated TestPlanReportMessage test_plan_report = 3;
}