Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 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 | // [START declaration] |
| 16 | syntax = "proto3"; |
| 17 | package com_android_cts_releaseparser; |
| 18 | // [END declaration] |
| 19 | |
| 20 | // [START java_declaration] |
| 21 | option java_package = "com.android.cts.releaseparser"; |
| 22 | option java_outer_classname = "ReleaseProto"; |
| 23 | // [END java_declaration] |
| 24 | |
| 25 | // [START messages] |
| 26 | message Option { |
| 27 | string name = 1; |
| 28 | string key = 2; |
| 29 | string value =3; |
| 30 | } |
| 31 | |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 32 | message TestModuleConfig { |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 33 | string module_name = 1; |
| 34 | string component = 2; |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 35 | string description = 3; |
| 36 | repeated Option options = 4; |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 37 | |
| 38 | message TargetPreparer { |
| 39 | string test_class = 1; |
| 40 | repeated Option options = 2; |
| 41 | } |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 42 | repeated TargetPreparer target_preparers = 5; |
| 43 | repeated string test_file_names = 6; |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 44 | |
| 45 | message TestClass { |
| 46 | string test_class = 1; |
| 47 | string package = 2; |
| 48 | repeated Option options = 3; |
| 49 | } |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 50 | repeated TestClass test_classes = 7; |
| 51 | repeated string test_jars = 8; |
| 52 | } |
| 53 | |
| 54 | // An entry in a release |
| 55 | message Entry { |
| 56 | // Name |
| 57 | string name = 1; |
| 58 | |
| 59 | enum EntryType { |
| 60 | FOLDER = 0; |
| 61 | FILE = 1; |
| 62 | CONFIG = 2; |
| 63 | JAR = 3; |
| 64 | APK = 4; |
| 65 | EXE = 5; |
| 66 | SO = 6; |
| 67 | } |
| 68 | // Type |
| 69 | EntryType type = 2; |
| 70 | |
| 71 | // Size |
| 72 | int64 size = 3; |
| 73 | // Content ID |
| 74 | string content_id = 4; |
| 75 | // Parent folder |
| 76 | string parent_folder = 5; |
| 77 | // Relative path |
| 78 | string relative_path = 6; |
| 79 | |
| 80 | // TestModule.config message |
| 81 | TestModuleConfig test_module_config = 7; |
| 82 | } |
| 83 | |
| 84 | message ReleaseContent { |
| 85 | // Name |
| 86 | string name = 1; |
| 87 | // Version |
| 88 | string version = 2; |
| 89 | // Build Number |
| 90 | string build_number = 3; |
| 91 | // Content ID |
| 92 | string content_id = 4; |
| 93 | string fullname = 5; |
| 94 | string target_arch = 6; |
| 95 | string test_suite_tradefed = 7; |
| 96 | // File Entries |
Sam Lin | 4dffe37 | 2018-05-23 21:28:53 -0700 | [diff] [blame^] | 97 | map<string, Entry> entries = 8; |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 98 | repeated string known_failures = 9; |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 99 | } |
| 100 | |
| 101 | message Annotation { |
| 102 | int32 visibility = 1; |
| 103 | string type = 2; |
| 104 | |
| 105 | message Element { |
| 106 | string name = 1; |
| 107 | string value = 2; |
| 108 | } |
| 109 | repeated Element elements = 3; |
| 110 | } |
| 111 | |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 112 | enum TestClassType { |
| 113 | UNKNOWN = 0; |
| 114 | JUNIT3 = 1; |
| 115 | JUNIT4 = 2; |
| 116 | PARAMETERIZED = 3; |
| 117 | JAVAHOST = 4; |
| 118 | } |
| 119 | |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 120 | message TestSuite { |
| 121 | string name = 1; |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 122 | // Version |
| 123 | string version = 2; |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 124 | // Build Number |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 125 | string build_number = 3; |
| 126 | // Content ID |
| 127 | string content_id = 4; |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 128 | |
| 129 | enum TestType { |
| 130 | UNKNOWN = 0; |
| 131 | ANDROIDJUNIT = 1; |
| 132 | JAVAHOST = 2; |
| 133 | GTEST = 3; |
| 134 | LIBCORE = 4; |
| 135 | DALVIK = 5; |
| 136 | DEQP = 6; |
| 137 | } |
| 138 | |
| 139 | message Module { |
| 140 | string name = 1; |
| 141 | string config_file = 2; |
| 142 | TestType test_type = 3; |
| 143 | string test_class = 4; |
| 144 | |
| 145 | message Package { |
| 146 | string name = 1; |
| 147 | string package_file = 2; |
| 148 | string content_id = 3; |
| 149 | string op_codes = 4; |
| 150 | |
| 151 | message Class { |
| 152 | string name = 1; |
| 153 | string type = 2; |
| 154 | string super_class = 3; |
| 155 | string interface = 4; |
| 156 | TestClassType test_class_type = 5; |
| 157 | repeated Annotation annotations = 6; |
| 158 | |
| 159 | message Method { |
| 160 | string defining_class = 1; |
| 161 | string name = 2; |
| 162 | string parameters = 3; |
| 163 | string return_type = 4; |
| 164 | int32 access_flags = 5; |
| 165 | string known_failure_filter = 6; |
| 166 | repeated Annotation annotations = 7; |
| 167 | } |
| 168 | repeated Method methods = 7; |
| 169 | |
| 170 | message Field { |
| 171 | string defining_class = 1; |
| 172 | string name = 2; |
| 173 | string type = 3; |
| 174 | int32 access_flags = 4; |
| 175 | string initial_value = 5; |
| 176 | repeated Annotation annotations = 6; |
| 177 | } |
| 178 | repeated Field fields = 8; |
| 179 | } |
| 180 | repeated Class classes = 5; |
| 181 | } |
| 182 | repeated Package packages = 5; |
| 183 | } |
| 184 | repeated Module modules = 5; |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 185 | } |
Sam Lin | 6d03af8 | 2018-05-16 13:23:14 -0700 | [diff] [blame] | 186 | |
Sam Lin | fb36f6a | 2018-05-08 21:56:47 -0700 | [diff] [blame] | 187 | // [END messages] |