• 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";
20
21
22// To specify test case execution result.
23enum TestCaseResult {
24  UNKNOWN_RESULT = 0;
25  TEST_CASE_RESULT_PASS = 1;
26  TEST_CASE_RESULT_FAIL = 2;
27  TEST_CASE_RESULT_SKIP = 3;
28  TEST_CASE_RESULT_EXCEPTION = 4;
29  TEST_CASE_RESULT_TIMEOUT = 5;
30}
31
32
33// To specify the VTS test type.
34enum VtsTestType {
35  UNKNOWN_VTS_TESTTYPE = 0;
36  VTS_HOST_DRIVEN_STRUCTURAL = 1;
37  VTS_HOST_DRIVEN_FUZZING = 2;
38  VTS_TARGET_SIDE_GTEST = 3;
39  VTS_TARGET_SIDE_FUZZING = 4;
40}
41
42enum VtsProfilingRegressionMode {
43  UNKNOWN_REGRESSION_MODE = 0;
44  // disable analysis
45  VTS_REGRESSION_MODE_DISABLED = 1;
46  // interpret increases in values as regression
47  VTS_REGRESSION_MODE_INCREASING = 2;
48  // interpret decreases in values as regression
49  VTS_REGRESSION_MODE_DECREASING= 3;
50}
51
52enum VtsProfilingType {
53  UNKNOWN_VTS_PROFILING_TYPE = 0;
54  // for one sample which measures the time between two profiling points.
55  VTS_PROFILING_TYPE_TIMESTAMP = 1;
56  // for multiple single-type samples with labels.
57  VTS_PROFILING_TYPE_LABELED_VECTOR = 2;
58  // for multiple single-type samples without labels.
59  VTS_PROFILING_TYPE_UNLABELED_VECTOR = 3;
60}
61
62// To specify a call flow event.
63message AndroidDeviceInfoMessage {
64  // product type (e.g., bullhead).
65  optional bytes product_type = 1;
66
67  // product type variant (e.g., still bullhead or another name).
68  optional bytes product_variant = 2;
69
70  // build type (e.g., userdebug).
71  optional bytes build_flavor = 11;
72
73  // Android Build ID.
74  optional bytes build_id = 12;
75
76  // branch name (e.g., master or nyc-dev).
77  optional bytes branch = 21;
78
79  // build alias implies the branch name.
80  optional bytes build_alias = 22;
81
82  // API level
83  optional bytes api_level = 31;
84
85  // ABI name that is current in use for the test
86  optional bytes abi_name = 51;
87
88  // ABI bitness that is current in use for the test. Example: '32', '64',
89  optional bytes abi_bitness = 52;
90
91  // Device USB serial number
92  optional bytes serial = 101;
93}
94
95
96// To specify build info.
97message AndroidBuildInfo {
98  // build ID.
99  optional bytes id = 1;
100
101  // device name (e.g., bullhead).
102  optional bytes name = 11;
103
104  // build type (e.g., userdebug)
105  optional bytes build_type = 12;
106
107  // branch name (e.g., master or nyc-dev)
108  optional bytes branch = 13;
109
110  // indicates the latest commit information of each branch (e.g., xml format).
111  optional bytes build_summary = 21;
112}
113
114
115// To specify the information about a host node.
116message VtsHostInfo {
117  // the host name (i.e., full domain name).
118  optional bytes hostname = 1;
119}
120
121
122// To specify a test case execution report.
123message TestCaseReportMessage {
124  // the test case name.
125  optional bytes name = 1;
126
127  // the test result.
128  optional TestCaseResult test_result = 11;
129
130  // execution start and end time stamp.
131  optional int64 start_timestamp = 21;
132  optional int64 end_timestamp = 22;
133
134  // coverage report per file
135  repeated CoverageReportMessage coverage = 31;
136
137  // profiling reports
138  repeated ProfilingReportMessage profiling = 41;
139
140  // systrace report message per file
141  repeated SystraceReportMessage systrace = 42;
142
143  // log for each test case. May contain multiple logs such as logcat, host log,
144  // etc.
145  repeated LogMessage log = 101;
146}
147
148
149// To specify a profiling report.
150message ProfilingReportMessage {
151  // the instrumentation point name.
152  optional bytes name = 1;
153  optional VtsProfilingType type = 2;
154  optional VtsProfilingRegressionMode regression_mode = 3;
155
156  // profiling start and end time stamp (for performance).
157  optional int64 start_timestamp = 11;
158  optional int64 end_timestamp = 12;
159
160  repeated bytes label = 21;
161  repeated int64 value = 22;
162
163  // x-axis and y-axis title labels when displaying the data as a graph
164  optional bytes x_axis_label = 31;
165  optional bytes y_axis_label = 32;
166
167  // a list of strings where each string has the form of 'key=value'.
168  // used to tell certain properties of the data (e.g., passthrough vs.
169  // binderized).
170  repeated bytes options = 41;
171}
172
173// To specify a systrace report.
174message SystraceReportMessage {
175  // the target process name used by systrace
176  optional bytes process_name = 1;
177
178  // the produced html report
179  repeated bytes html = 11;
180
181  // URLs of the produced html reports
182  repeated bytes url = 21;
183}
184
185// To specify a coverage report.
186message CoverageReportMessage {
187  // the path to the source file from the project root.
188  optional bytes file_path = 11;
189
190  // the name of the project where the file can be found
191  optional bytes project_name = 12;
192
193  // the commit ID identifying the code revision
194  optional bytes revision = 13;
195
196  // i-th element gives the number of times i-th line is executed.
197  repeated int32 line_coverage_vector = 23;
198
199  // the number of source code lines that are instrumented for code coverage
200  // measurement.
201  optional int32 total_line_count = 101;
202
203  // the number of source code lines that are executed.
204  optional int32 covered_line_count = 102;
205
206  // TODO(ryanjcampbell@) delete deprecated field
207  // the directory path of a source file.
208  optional bytes dir_path = 1 [deprecated=true];
209
210  // TODO(ryanjcampbell@) delete deprecated field
211  // the name of the source file.
212  optional bytes file_name = 2 [deprecated=true];
213
214  // TODO(ryanjcampbell@) delete deprecated field
215  // produced html report.
216  optional bytes html = 3 [deprecated=true];
217}
218
219// To specify log report. This can be used either for per-test-module
220// log message or per-test-case log message.
221message LogMessage {
222  // URLs of the produced log files. May contains multiple files such as stdout,
223  // stderr, etc.
224  optional bytes url = 1;
225
226  // Name of log.
227  optional bytes name = 2;
228
229  // content of log. Caution: do not put too much log in protobuf message,
230  // as bigtable recommends < 10 mb for each record cell
231  optional bytes content = 3;
232}
233
234// To specify a test execution report.
235message TestReportMessage {
236  // The test suite name..
237  optional bytes test_suite = 1;
238
239  // The test name.
240  optional bytes test = 2;
241
242  // The test type
243  optional VtsTestType test_type = 3;
244
245  // Target device info
246  repeated AndroidDeviceInfoMessage device_info = 4;
247
248  // Build info
249  optional AndroidBuildInfo build_info = 5;
250
251  // Email addresses of subscribers to the test results
252  repeated bytes subscriber_email = 6;
253
254  // Info about the host computer
255  optional VtsHostInfo host_info = 7;
256
257  // Test case reports
258  repeated TestCaseReportMessage test_case = 11;
259
260  // Profiling reports
261  repeated ProfilingReportMessage profiling = 21;
262
263  // Systrace report per file
264  repeated SystraceReportMessage systrace = 22;
265
266  // Execution start and end time stamp.
267  optional int64 start_timestamp = 101;
268  optional int64 end_timestamp = 102;
269
270  // Coverage report per file
271  repeated CoverageReportMessage coverage = 103;
272
273  // Log for a test module. May contain multiple logs such as logcat, host log,
274  // etc.
275  repeated LogMessage log = 1001;
276}
277
278// Proto wrapper for posting data to the VTS Dashboard
279message DashboardPostMessage {
280  // oauth2.0 access token
281  optional string access_token = 1;
282
283  repeated TestReportMessage test_report = 2;
284}
285