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]
16syntax = "proto3";
17package com_android_cts_apicoverage;
18// [END declaration]
19
20// [START java_declaration]
21option java_package = "com.android.cts.apicoverage";
22option java_outer_classname = "TestSuiteProto";
23// [END java_declaration]
24
25// [START messages]
26message Option {
27    string name = 1;
28    string key = 2;
29    string value =3;
30}
31
32message ConfigMetadata {
33    string module_name = 1;
34    string component = 2;
35    repeated Option options = 3;
36
37    message TargetPreparer {
38        string test_class = 1;
39        repeated Option options = 2;
40    }
41    repeated TargetPreparer target_preparers = 4;
42
43    message TestClass {
44        string test_class = 1;
45        string package = 2;
46        repeated Option options = 3;
47    }
48    repeated TestClass test_classes = 5;
49}
50
51message Annotation {
52    int32 visibility = 1;
53    string type = 2;
54
55    message Element {
56        string name = 1;
57        string value = 2;
58    }
59    repeated Element elements = 3;
60}
61
62message TestSuite {
63    string name = 1;
64
65    message Package {
66        string name = 1;
67
68        enum Type {
69            ANDROIDJUNIT = 0;
70            JAVAHOST = 1;
71            GTEST = 2;
72            DEQP = 3;
73            LIBCORE = 4;
74            DALVIK = 5;
75        }
76        Type type = 2;
77
78        message Class {
79            string name = 1;
80            string type = 2;
81            string super_class = 3;
82            string interface = 4;
83
84            enum ClassType {
85                UNKNOWN = 0;
86                JUNIT3 = 1;
87                JUNIT4 = 2;
88                PARAMETERIZED = 3;
89                JAVAHOST = 4;
90            }
91
92            ClassType class_type = 5;
93            repeated Annotation annotations = 6;
94
95            message Method {
96                string defining_class = 1;
97                string name = 2;
98                string parameters = 3;
99                string return_type = 4;
100                int32 access_flags = 5;
101                repeated Annotation annotations = 6;
102            }
103            repeated Method methods = 7;
104
105            message Field {
106                string defining_class = 1;
107                string name = 2;
108                string type = 3;
109                int32 access_flags = 4;
110                string initial_value = 5;
111                repeated Annotation annotations = 6;
112            }
113            repeated Field fields = 8;
114            string apk = 9;
115        }
116        repeated Class classes = 3;
117        string op_codes = 4;
118    }
119    repeated Package packages = 2;
120}
121
122// target File Metadata for e.g. config, apk, jar, exe, so
123message FileMetadata {
124    string description = 1;
125    ConfigMetadata config_metadata = 2;
126}
127
128// An entry in a Test Suire Release messages: cts, etc.
129message Entry {
130    // Entry ID
131    string id = 1;
132    // Name
133    string name = 2;
134
135    enum EntryType {
136        FOLDER = 0;
137        FILE = 1;
138        CONFIG = 2;
139        JAR = 3;
140        APK = 4;
141        EXE = 5;
142        SO = 6;
143    }
144
145    // Type
146    EntryType type = 3;
147    // Size
148    int64 size = 4;
149    // Content ID
150    string content_id = 5;
151    // Parent entry ID
152    string parent_id = 6;
153    // Relative path
154    string relative_path = 7;
155
156    FileMetadata file_metadata = 8;
157}
158
159// Test Suite Release: cts, etc.
160message TestSuiteContent {
161    // Entry ID
162    string id = 1;
163    // Name
164    string name = 2;
165    // Version
166    string version = 3;
167    // Build ID
168    string bid = 4;
169    // Content ID
170    string content_id = 5;
171    // File Entries
172    repeated Entry file_entries = 6;
173    repeated string known_failures = 7;
174}
175// [END messages]
176