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., master 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., master 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; 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 int32 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// To specify log report. This can be used either for per-test-module 221// log message or per-test-case log message. 222message LogMessage { 223 // URL of a produced log file (e.g., stdout, stderr). 224 optional bytes url = 1; 225 226 // Name of a log file. 227 optional bytes name = 2; 228 229 // Content of log. Caution: do not put too much log in protobuf message, 230 // as BigTable for example recommends < 10 MB for each record cell. 231 optional bytes content = 3; 232} 233 234// To specify a resource object (reachable via a URL or contained in the 235// message). This can be used to store a log file or an XML (or HTML) report 236// file kept in a Google Cloud Storage (GCS) bucket or partner's network file 237// system, or hosted by a HTTP server. 238message UrlResourceMessage { 239 // URL of a resource file. 240 optional bytes url = 1; 241 242 // Name of a resource file representing its type and does not have to be 243 // the same as the exact file name. 244 optional bytes name = 2; 245 246 // Raw content of a resource file. Used if the file is small. 247 optional bytes content = 3; 248} 249 250// To specify a test execution report. 251message TestReportMessage { 252 // The test suite name.. 253 optional bytes test_suite = 1 [deprecated=true]; 254 255 // The test name. 256 optional bytes test = 2; 257 258 // The test type 259 optional VtsTestType test_type = 3; 260 261 // Target device info 262 repeated AndroidDeviceInfoMessage device_info = 4; 263 264 // Build info 265 optional AndroidBuildInfo build_info = 5; 266 267 // Email addresses of subscribers to the test results 268 repeated bytes subscriber_email = 6; 269 270 // Info about the host computer 271 optional VtsHostInfo host_info = 7; 272 273 // Test case reports 274 repeated TestCaseReportMessage test_case = 11; 275 276 // Profiling reports 277 repeated ProfilingReportMessage profiling = 21; 278 279 // Systrace report per file 280 repeated SystraceReportMessage systrace = 22; 281 282 // Execution start and end time stamp. 283 optional int64 start_timestamp = 101; 284 optional int64 end_timestamp = 102; 285 286 // Coverage report per file 287 repeated CoverageReportMessage coverage = 103; 288 289 // Log for a test module. May contain multiple logs such as logcat, host log, 290 // etc. 291 repeated LogMessage log = 1001; 292} 293 294// To specify a test execution report. 295message TestPlanReportMessage { 296 // Keys used to find all TestReportMessage messages of test modules in 297 // this plan. 298 repeated string test_module_name = 11; 299 repeated int64 test_module_start_timestamp = 12; 300 301 // The test plan name. 302 optional string test_plan_name = 21; 303 304 // Report resource flies. 305 repeated UrlResourceMessage partner_report = 31; 306 307 // Detailed information about the execution environment (e.g., branch, 308 // build ID, and device) can be found in the associated TestReportMessage(s) 309 // which share the same test_plan_execution_id. 310} 311 312// Proto wrapper for posting data to the VTS Dashboard 313message DashboardPostMessage { 314 // oauth2.0 access token 315 optional string access_token = 1; 316 317 repeated TestReportMessage test_report = 2; 318 repeated TestPlanReportMessage test_plan_report = 3; 319} 320