• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2019 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// Set of error prone rules to ensure code quality
16// PackageLocation check requires the androidCompatible=false otherwise it does not do anything.
17package {
18    default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
21java_library_host {
22    name: "atest-tradefed-shell",
23    java_resource_dirs: ["res"],
24}
25
26java_library_host {
27    name: "asuite_proto_java",
28    srcs: [
29        "proto/*.proto",
30    ],
31    proto: {
32        type: "full",
33        canonical_path_from_root: false,
34        include_dirs: ["external/protobuf/src"],
35    },
36}
37
38tradefed_binary_host {
39    name: "atest-tradefed",
40    short_name: "ATEST",
41    full_name: "ATest Test Suite",
42    static_libs: ["atest-tradefed-shell"],
43    required: ["atest_tradefed.sh", "atest_script_help.sh"],
44}
45
46python_defaults {
47    name: "atest_default",
48    pkg_path: "atest",
49    version: {
50        py2: {
51            enabled: false,
52            embedded_launcher: false,
53        },
54        py3: {
55            enabled: true,
56            embedded_launcher: false,
57        },
58    },
59}
60
61python_defaults {
62    name: "atest_lib_default",
63    pkg_path: "atest",
64    version: {
65        py2: {
66            enabled: false,
67            embedded_launcher: false,
68        },
69        py3: {
70            enabled: true,
71            embedded_launcher: false,
72        },
73    },
74}
75
76python_defaults {
77    name: "asuite_default",
78    pkg_path: "asuite",
79    version: {
80        py2: {
81            enabled: true,
82            embedded_launcher: false,
83        },
84        py3: {
85            enabled: true,
86            embedded_launcher: false,
87        },
88    },
89}
90
91python_binary_host {
92    name: "atest",
93    main: "atest.py",
94    srcs: [
95        "**/*.py",
96    ],
97    exclude_srcs: [
98        "*_unittest.py",
99        "*/*_unittest.py",
100        "asuite_lib_test/*.py",
101        "proto/*_pb2.py",
102        "proto/__init__.py",
103        "tf_proto/__init__.py",
104        "tf_proto/*_pb2.py",
105    ],
106    libs: [
107        "atest_proto",
108        "tradefed-protos-py",
109        "py-google-api-python-client",
110        "py-oauth2client",
111        "py-six",
112    ],
113    data: [
114        "tools/updatedb_darwin.sh",
115    ],
116    // Make atest's built name to atest-dev
117    stem: "atest-dev",
118    defaults: ["atest_default"],
119    dist: {
120        targets: ["droidcore"],
121    },
122}
123
124python_library_host {
125    name: "atest_proto",
126    defaults: ["atest_default"],
127    srcs: [
128        "proto/*.proto",
129    ],
130    proto: {
131        canonical_path_from_root: false,
132    },
133}
134
135python_library_host {
136    name: "atest_module_info",
137    defaults: ["atest_lib_default"],
138    srcs: [
139        "atest_error.py",
140        "atest_decorator.py",
141        "atest_utils.py",
142        "constants.py",
143        "constants_default.py",
144        "module_info.py",
145    ],
146    libs: [
147        "metrics-protos",
148    ]
149}
150
151python_library_host {
152    name: "asuite_proto",
153    defaults: ["asuite_default"],
154    srcs: [
155        "proto/*.proto",
156    ],
157    proto: {
158        canonical_path_from_root: false,
159    },
160}
161
162python_library_host {
163    name: "asuite_metrics",
164    defaults: ["asuite_default"],
165    srcs: [
166        "asuite_metrics.py",
167    ],
168}
169
170python_library_host {
171    name: "asuite_cc_client",
172    defaults: ["asuite_default"],
173    srcs: [
174        "atest_error.py",
175        "atest_decorator.py",
176        "atest_utils.py",
177        "constants.py",
178        "constants_default.py",
179        "metrics/*.py",
180    ],
181    libs: [
182        "asuite_proto",
183        "asuite_metrics",
184    ],
185}
186
187python_test_host {
188    name: "atest_unittests",
189    main: "atest_run_unittests.py",
190    pkg_path: "atest",
191    srcs: [
192        "**/*.py",
193    ],
194    test_options: {
195        unit_test: true,
196    },
197    data: [
198        "tools/updatedb_darwin.sh",
199        "unittest_data/**/*",
200        "unittest_data/**/.*",
201    ],
202    exclude_srcs: [
203        "asuite_lib_test/*.py",
204        "proto/*_pb2.py",
205        "proto/__init__.py",
206        "tools/atest_updatedb_unittest.py",
207        "tf_proto/__init__.py",
208        "tf_proto/*_pb2.py",
209    ],
210    libs: [
211        "atest_proto",
212        "tradefed-protos-py",
213    ],
214    test_config: "atest_unittests.xml",
215    test_suites: ["general-tests"],
216    defaults: ["atest_default"],
217}
218
219python_test_host {
220    name: "atest_integration_tests",
221    main: "atest_integration_tests.py",
222    pkg_path: "atest",
223    srcs: [
224        "atest_integration_tests.py",
225    ],
226    data: [
227        "INTEGRATION_TESTS",
228    ],
229    test_config: "atest_integration_tests.xml",
230    test_suites: ["null-suite"],
231    defaults: ["atest_default"],
232    test_options: {
233        unit_test: false,
234    },
235}
236
237sh_binary_host {
238    name: "atest_tradefed.sh",
239    src: "atest_tradefed.sh",
240}
241
242sh_binary_host {
243    name: "atest_script_help.sh",
244    src: "atest_script_help.sh",
245}
246