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