Home | History | Annotate | Download | only in proto
      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 
     17 syntax = "proto2";
     18 
     19 package com.android.cts.apicoverage;
     20 option java_package = "com.android.cts.apicoverage";
     21 option 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
     27 message 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.
     60 message 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
     69 message 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 
     83 message 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_*
     91 enum LogicalDensity {
     92   LDPI = 120;
     93   DENSITY_140 = 140;
     94   MDPI = 160;
     95   DENSITY_180 = 180;
     96   DENSITY_200 = 200;
     97   TVDPI = 213;
     98   DENSITY_220 = 220;
     99   HDPI = 240;
    100   DENSITY_260 = 260;
    101   DENSITY_280 = 280;
    102   DENSITY_300 = 300;
    103   XHDPI = 320;
    104   DENSITY_340 = 340;
    105   DENSITY_360 = 360;
    106   // Intermediate density for screens that sit somewhere between DENSITY_XHIGH (320 dpi) and
    107   // DENSITY_XXHIGH (480 dpi).
    108   DENSITY_400 = 400;
    109   DENSITY_420 = 420;
    110   DENSITY_440 = 440;
    111   XXHDPI = 480;
    112   // Intermediate density for screens that sit somewhere between DENSITY_XXHIGH (480 dpi) and
    113   // DENSITY_XXXHIGH (640 dpi).
    114   DENSITY_560 = 560;
    115   DENSITY_600 = 600;
    116   XXXHDPI = 640;
    117 }
    118 
    119 // Logical screen size
    120 // The numbers should match
    121 // android.content.res.Configuration.SCREENLAYOUT_SIZE_*
    122 enum LogicalSize {
    123   UNDEFINED = 0;
    124   SMALL = 1;
    125   NORMAL = 2;
    126   LARGE = 3;
    127   XLARGE = 4;
    128 }
    129 
    130 // Result type of PTS tests defined in:
    131 // cts/suite/pts/lib/commonutil/src/com/android/pts/util/ResultType.java
    132 enum ResultType {
    133   LOWER_BETTER = 0;
    134   HIGHER_BETTER = 1;
    135   NEUTRAL = 2;
    136   WARNING = 3;
    137 }
    138 
    139 // Result unit of PTS values defined in:
    140 // cts/suite/pts/lib/commonutil/src/com/android/pts/util/ResultUnit.java
    141 enum ResultUnit {
    142   NONE = 0;
    143   MS = 1;
    144   FPS = 2;
    145   OPS = 3;
    146   KBPS = 4;
    147   MBPS = 5;
    148   BYTE = 6;
    149   COUNT = 7;
    150   SCORE = 8;
    151 }
    152 
    153 // A CtsReport message encapsulates the output of a Compatibility Test Suite
    154 // (CTS) run.
    155 message CtsReport {
    156 
    157   // Test plan that was run, generally "CTS".
    158   optional string test_plan = 1;
    159 
    160   // Version of the CTS tool.
    161   optional string version = 2;
    162 
    163   optional int64 start_time = 3;
    164   optional int64 end_time = 4;
    165 
    166   // Fields describing the particular device under test.
    167   // Next Id: 32
    168   message DeviceInfo {
    169 
    170     optional string screen_resolution = 1;
    171     optional LogicalDensity logical_screen_density = 17;
    172     optional LogicalSize logical_screen_size = 18;
    173 
    174     optional string subscriber_id = 2 [deprecated = true];
    175     optional string type = 3 [deprecated = true];
    176     optional string device_id = 4 [deprecated = true];
    177     optional string imei = 5 [deprecated = true];
    178     optional string imsi = 6 [deprecated = true];
    179     optional string keypad = 7;
    180     repeated string locale = 8;
    181     optional string navigation = 9;
    182     optional string network = 10 [deprecated = true];
    183     optional string touch = 11;
    184     optional float x_dpi = 12;
    185     optional float y_dpi = 13;
    186     optional string opengl_es_version = 19;
    187 
    188     // Use BuildInfo.supported_abi instead
    189     optional string build_abi = 20 [deprecated = true];
    190     // Use BuildInfo.supported_abi instead
    191     optional string build_abi2 = 21 [deprecated = true];
    192 
    193     optional BuildInfo build_info = 14;
    194     optional MemoryInfo memory_info = 29;
    195     optional CpuInfo cpu_info = 30;
    196 
    197     // Filesystem partitions.
    198     optional string partitions = 22;
    199 
    200     repeated string system_library = 23;
    201     // Deprecated. These values are found in the extension list
    202     repeated string opengl_texture_format = 24 [deprecated = true];
    203     // GLES20.GL_EXTENSIONS,  GL10.GL_EXTENSIONS or GLES30.GL_EXTENSIONS
    204     repeated string opengl_extension = 25;
    205     // gl.glGetString(GL10.GL_VENDOR) or GLES20.glGetString(GLES20.GL_VENDOR)
    206     // or GLES30.glGetString(GLES30.GL_VENDOR)
    207     optional string opengl_vendor = 26;
    208     // gl.glGetString(GL10.GL_RENDERER)
    209     // or GLES20.glGetString(GLES20.GL_RENDERER)
    210     // or GLES30.glGetString(GLES30.GL_RENDERER)
    211     optional string opengl_renderer = 27;
    212 
    213     // Hardware features that may be available on the device.
    214     // This includes features such as camera, gps and compass.
    215     message Feature {
    216       optional string name = 1;
    217       optional string type = 2;
    218       optional bool available = 3;
    219       optional int32 version = 4;
    220     }
    221     repeated Feature feature = 15;
    222 
    223     // Running processes.
    224     message Process {
    225       optional string name = 1;
    226       optional int32 uid = 2;
    227     }
    228     repeated Process process = 16;
    229 
    230     // Configuration.smallestScreenWidthDp
    231     optional int32 smallest_screen_width_dp = 28;
    232 
    233     // The value reported from UserManager.getMaxSupportedUsers
    234     optional int32 max_supported_users = 31;
    235   }
    236   optional DeviceInfo device_info = 5;
    237 
    238   // Information about the host running the test suite.
    239   message HostInfo {
    240 
    241     // Hostname of the machine running the tests.
    242     optional string hostname = 1;
    243 
    244     // Operating system running on the host.
    245     message Os {
    246       optional string arch = 1;
    247       optional string name = 2;
    248       optional string version = 3;
    249     }
    250     optional Os os = 2;
    251 
    252     // Information about the JRE used to run the tests.
    253     message JavaEnv {
    254       optional string name = 1;
    255       optional string version = 2;
    256     }
    257     optional JavaEnv java_env = 3;
    258 
    259     // CTS version and parameters during runtime.
    260     message Cts {
    261       optional string version = 1;
    262 
    263       message Parameter {
    264         optional string name = 1;
    265         optional int32 value = 2;
    266       }
    267       repeated Parameter parameter = 2;
    268     }
    269     optional Cts cts = 4;
    270   }
    271   optional HostInfo host_info = 6;
    272 
    273   optional Summary summary = 7;
    274 
    275   // Group of test suites within a specific java package.
    276   message TestPackage {
    277 
    278     // Java package name.
    279     optional string deprecated_app_package_name = 1 [deprecated = true];
    280 
    281     // Unique name describing the test package within the java package.
    282     optional string name = 2;
    283     optional string deprecated_digest = 3 [deprecated = true];
    284     optional bool deprecated_signature_check = 4 [deprecated = true];
    285 
    286     // Group of test cases.
    287     message TestSuite {
    288 
    289       // Unique name describing the test suite within the test package.
    290       optional string name = 1;
    291 
    292       // Group of individual tests.
    293       message TestCase {
    294 
    295         // Unique name describing the test case within the test suite.
    296         optional string name = 1;
    297         optional string priority = 2;
    298 
    299         // Smallest test unit, which ideally tests only one feature or function.
    300         message Test {
    301 
    302           // Unique name describing the test within the test case.
    303           optional string name = 1;
    304 
    305           // Result of the test run.
    306           optional string result = 2;
    307 
    308           // Bug id for known issues.
    309           optional string deprecated_known_failure = 3 [deprecated = true];
    310 
    311           // Time this test was started.
    312           optional int64 deprecated_start_time = 4 [deprecated = true];
    313 
    314           // Time this test completed.
    315           optional int64 deprecated_end_time = 5 [deprecated = true];
    316 
    317           // Captures an exception thrown during the test.
    318           message FailedScene {
    319             optional string exception_message = 1;
    320             optional string stack_trace = 2;
    321           }
    322           repeated FailedScene failed_scene = 6;
    323 
    324           // Summary of the PTS test.
    325           message Summary {
    326             optional string message = 1;
    327             optional ResultType score_type = 2;
    328             optional ResultUnit unit = 3;
    329             optional double value = 4;
    330           }
    331           optional Summary summary = 7;
    332 
    333           // Details of the PTS test.
    334           message Details {
    335 
    336             // Set of values captured when running the PTS test.
    337             message ValueArray {
    338               optional string source = 1;
    339               optional string message = 2;
    340               optional ResultType score_type = 3;
    341               optional ResultUnit unit = 4;
    342               repeated double value = 5;
    343             }
    344             repeated ValueArray value_array = 1;
    345           }
    346           optional Details details = 8;
    347         }
    348         repeated Test test = 3;
    349       }
    350       repeated TestCase test_case = 2;
    351     }
    352     repeated TestSuite test_suite = 5;
    353 
    354     // abi specifies the ABI the test ran under like "armeabi".
    355     optional string abi = 6;
    356   }
    357   repeated TestPackage test_package = 8;
    358 }
    359