1// Copyright (C) 2018 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 15// Contains proto definition for storing CTS reports. 16 17syntax = "proto2"; 18 19package com.android.cts.apicoverage; 20option java_package = "com.android.cts.apicoverage"; 21option java_outer_classname = "CtsReportProto"; 22 23// from common_report.proto 24// Information about the build on the phone. All the fields 25// correspond to values from android.os.Build. 26// Next Id: 20 27message BuildInfo { 28 optional string board = 1; 29 optional string brand = 2; 30 optional string device = 3; 31 optional string display = 4; 32 optional string fingerprint = 5; 33 optional string id = 6; 34 optional string model = 7; 35 optional string product = 8; 36 message Version { 37 optional string release = 1; 38 optional string sdk = 2; 39 } 40 optional Version version = 9; 41 optional string manufacturer = 10; 42 // This field is deprecated in android.os.Build. Use supported_abi instead. 43 optional string abi = 11 [deprecated = true]; 44 // This field is deprecated in android.os.Build. Use supported_abi instead. 45 optional string abi2 = 12 [deprecated = true]; 46 repeated string supported_abi = 13; 47 repeated string supported_32_bit_abi = 14; 48 repeated string supported_64_bit_abi = 15; 49 // Build.BASE_OS The base OS build the product is based on. See b/23003940 50 optional string base_os = 16; 51 // Build.SECURITY_PATCH The user-visible security patch level. See b/23003940 52 optional string security_patch = 17; 53 // A build fingerprint of the reference device. See go/apfe-reference-build 54 optional string reference_build_fingerprint = 18; 55 // RO Property set for the build. 56 map<string, string> ro_property_map = 19; 57} 58 59// Summary count of the test results. 60message Summary { 61 optional int32 failed = 1; 62 optional int32 not_executed = 2; 63 optional int32 pass = 3; 64 optional int32 timeout = 4; 65 optional int32 warning = 5; 66} 67 68// Information about the device's memory configuration 69message MemoryInfo { 70 // ActivityManager.isLowRamDevice 71 optional bool is_low_ram_device = 1; 72 73 // ActivityManager.getMemoryClass() 74 optional int32 memory_class = 2; 75 76 // ActivityManager.getLargeMemoryClass() 77 optional int32 large_memory_class = 3; 78 79 // MemoryInfo.totalMem 80 optional int64 total_memory = 4; 81} 82 83message CpuInfo { 84 // Runtime.availableProcessors 85 optional int32 available_processors = 1; 86} 87// from common_report.proto ends 88 89// Logical screen density 90// The numbers are in dpi and should match android.util.DisplayMetrics.DENSITY_* 91enum LogicalDensity { 92 LDPI = 120; 93 MDPI = 160; 94 TVDPI = 213; 95 HDPI = 240; 96 DENSITY_260 = 260; 97 DENSITY_280 = 280; 98 DENSITY_300 = 300; 99 XHDPI = 320; 100 DENSITY_340 = 340; 101 DENSITY_360 = 360; 102 // Intermediate density for screens that sit somewhere between DENSITY_XHIGH (320 dpi) and 103 // DENSITY_XXHIGH (480 dpi). 104 DENSITY_400 = 400; 105 DENSITY_420 = 420; 106 XXHDPI = 480; 107 // Intermediate density for screens that sit somewhere between DENSITY_XXHIGH (480 dpi) and 108 // DENSITY_XXXHIGH (640 dpi). 109 DENSITY_560 = 560; 110 XXXHDPI = 640; 111} 112 113// Logical screen size 114// The numbers should match 115// android.content.res.Configuration.SCREENLAYOUT_SIZE_* 116enum LogicalSize { 117 UNDEFINED = 0; 118 SMALL = 1; 119 NORMAL = 2; 120 LARGE = 3; 121 XLARGE = 4; 122} 123 124// Result type of PTS tests defined in: 125// cts/suite/pts/lib/commonutil/src/com/android/pts/util/ResultType.java 126enum ResultType { 127 LOWER_BETTER = 0; 128 HIGHER_BETTER = 1; 129 NEUTRAL = 2; 130 WARNING = 3; 131} 132 133// Result unit of PTS values defined in: 134// cts/suite/pts/lib/commonutil/src/com/android/pts/util/ResultUnit.java 135enum ResultUnit { 136 NONE = 0; 137 MS = 1; 138 FPS = 2; 139 OPS = 3; 140 KBPS = 4; 141 MBPS = 5; 142 BYTE = 6; 143 COUNT = 7; 144 SCORE = 8; 145} 146 147// A CtsReport message encapsulates the output of a Compatibility Test Suite 148// (CTS) run. 149message CtsReport { 150 151 // Test plan that was run, generally "CTS". 152 optional string test_plan = 1; 153 154 // Version of the CTS tool. 155 optional string version = 2; 156 157 optional int64 start_time = 3; 158 optional int64 end_time = 4; 159 160 // Fields describing the particular device under test. 161 // Next Id: 32 162 message DeviceInfo { 163 164 optional string screen_resolution = 1; 165 optional LogicalDensity logical_screen_density = 17; 166 optional LogicalSize logical_screen_size = 18; 167 168 optional string subscriber_id = 2 [deprecated = true]; 169 optional string type = 3 [deprecated = true]; 170 optional string device_id = 4 [deprecated = true]; 171 optional string imei = 5 [deprecated = true]; 172 optional string imsi = 6 [deprecated = true]; 173 optional string keypad = 7; 174 repeated string locale = 8; 175 optional string navigation = 9; 176 optional string network = 10 [deprecated = true]; 177 optional string touch = 11; 178 optional float x_dpi = 12; 179 optional float y_dpi = 13; 180 optional string opengl_es_version = 19; 181 182 // Use BuildInfo.supported_abi instead 183 optional string build_abi = 20 [deprecated = true]; 184 // Use BuildInfo.supported_abi instead 185 optional string build_abi2 = 21 [deprecated = true]; 186 187 optional BuildInfo build_info = 14; 188 optional MemoryInfo memory_info = 29; 189 optional CpuInfo cpu_info = 30; 190 191 // Filesystem partitions. 192 optional string partitions = 22; 193 194 repeated string system_library = 23; 195 // Deprecated. These values are found in the extension list 196 repeated string opengl_texture_format = 24 [deprecated = true]; 197 // GLES20.GL_EXTENSIONS, GL10.GL_EXTENSIONS or GLES30.GL_EXTENSIONS 198 repeated string opengl_extension = 25; 199 // gl.glGetString(GL10.GL_VENDOR) or GLES20.glGetString(GLES20.GL_VENDOR) 200 // or GLES30.glGetString(GLES30.GL_VENDOR) 201 optional string opengl_vendor = 26; 202 // gl.glGetString(GL10.GL_RENDERER) 203 // or GLES20.glGetString(GLES20.GL_RENDERER) 204 // or GLES30.glGetString(GLES30.GL_RENDERER) 205 optional string opengl_renderer = 27; 206 207 // Hardware features that may be available on the device. 208 // This includes features such as camera, gps and compass. 209 message Feature { 210 optional string name = 1; 211 optional string type = 2; 212 optional bool available = 3; 213 optional int32 version = 4; 214 } 215 repeated Feature feature = 15; 216 217 // Running processes. 218 message Process { 219 optional string name = 1; 220 optional int32 uid = 2; 221 } 222 repeated Process process = 16; 223 224 // Configuration.smallestScreenWidthDp 225 optional int32 smallest_screen_width_dp = 28; 226 227 // The value reported from UserManager.getMaxSupportedUsers 228 optional int32 max_supported_users = 31; 229 } 230 optional DeviceInfo device_info = 5; 231 232 // Information about the host running the test suite. 233 message HostInfo { 234 235 // Hostname of the machine running the tests. 236 optional string hostname = 1; 237 238 // Operating system running on the host. 239 message Os { 240 optional string arch = 1; 241 optional string name = 2; 242 optional string version = 3; 243 } 244 optional Os os = 2; 245 246 // Information about the JRE used to run the tests. 247 message JavaEnv { 248 optional string name = 1; 249 optional string version = 2; 250 } 251 optional JavaEnv java_env = 3; 252 253 // CTS version and parameters during runtime. 254 message Cts { 255 optional string version = 1; 256 257 message Parameter { 258 optional string name = 1; 259 optional int32 value = 2; 260 } 261 repeated Parameter parameter = 2; 262 } 263 optional Cts cts = 4; 264 } 265 optional HostInfo host_info = 6; 266 267 optional Summary summary = 7; 268 269 // Group of test suites within a specific java package. 270 message TestPackage { 271 272 // Java package name. 273 optional string deprecated_app_package_name = 1 [deprecated = true]; 274 275 // Unique name describing the test package within the java package. 276 optional string name = 2; 277 optional string deprecated_digest = 3 [deprecated = true]; 278 optional bool deprecated_signature_check = 4 [deprecated = true]; 279 280 // Group of test cases. 281 message TestSuite { 282 283 // Unique name describing the test suite within the test package. 284 optional string name = 1; 285 286 // Group of individual tests. 287 message TestCase { 288 289 // Unique name describing the test case within the test suite. 290 optional string name = 1; 291 optional string priority = 2; 292 293 // Smallest test unit, which ideally tests only one feature or function. 294 message Test { 295 296 // Unique name describing the test within the test case. 297 optional string name = 1; 298 299 // Result of the test run. 300 optional string result = 2; 301 302 // Bug id for known issues. 303 optional string deprecated_known_failure = 3 [deprecated = true]; 304 305 // Time this test was started. 306 optional int64 deprecated_start_time = 4 [deprecated = true]; 307 308 // Time this test completed. 309 optional int64 deprecated_end_time = 5 [deprecated = true]; 310 311 // Captures an exception thrown during the test. 312 message FailedScene { 313 optional string exception_message = 1; 314 optional string stack_trace = 2; 315 } 316 repeated FailedScene failed_scene = 6; 317 318 // Summary of the PTS test. 319 message Summary { 320 optional string message = 1; 321 optional ResultType score_type = 2; 322 optional ResultUnit unit = 3; 323 optional double value = 4; 324 } 325 optional Summary summary = 7; 326 327 // Details of the PTS test. 328 message Details { 329 330 // Set of values captured when running the PTS test. 331 message ValueArray { 332 optional string source = 1; 333 optional string message = 2; 334 optional ResultType score_type = 3; 335 optional ResultUnit unit = 4; 336 repeated double value = 5; 337 } 338 repeated ValueArray value_array = 1; 339 } 340 optional Details details = 8; 341 } 342 repeated Test test = 3; 343 } 344 repeated TestCase test_case = 2; 345 } 346 repeated TestSuite test_suite = 5; 347 348 // abi specifies the ABI the test ran under like "armeabi". 349 optional string abi = 6; 350 } 351 repeated TestPackage test_package = 8; 352}