blob: c6e7534663c735e949bbcf8f53191dcb4b65769b [file] [log] [blame]
herbertxue615af072018-05-24 09:39:17 +00001// 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
Bob Badour940bf242021-02-03 22:21:31 -080015package {
16 default_applicable_licenses: ["tools_acloud_license"],
17}
18
19// Added automatically by a large-scale-change
20// http://go/android-license-faq
21license {
22 name: "tools_acloud_license",
23 visibility: [":__subpackages__"],
24 license_kinds: [
25 "SPDX-license-identifier-Apache-2.0",
26 ],
27 license_text: [
28 "LICENSE",
29 ],
30}
31
herbertxue615af072018-05-24 09:39:17 +000032python_defaults {
33 name: "acloud_default",
Kevin Chengee6030f2018-06-26 10:55:30 -070034 pkg_path: "acloud",
herbertxue615af072018-05-24 09:39:17 +000035 version: {
36 py2: {
chojoycec5ee4a72020-07-23 23:32:25 +080037 enabled: false,
herbertxue615af072018-05-24 09:39:17 +000038 embedded_launcher: false,
chojoyce2a82d302019-12-24 18:13:36 +080039 libs: [
40 "py-pyopenssl",
41 ]
herbertxue615af072018-05-24 09:39:17 +000042 },
43 py3: {
chojoycec5ee4a72020-07-23 23:32:25 +080044 enabled: true,
herbertxue615af072018-05-24 09:39:17 +000045 embedded_launcher: false,
46 },
47 },
48}
49
50python_binary_host {
51 name: "acloud",
chojoycec5ee4a72020-07-23 23:32:25 +080052 // Make acloud's built name to acloud-dev default build python3 binary.
herbertxue00b241b2019-04-08 12:04:44 +080053 stem: "acloud-dev",
herbertxue615af072018-05-24 09:39:17 +000054 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +000055 main: "public/acloud_main.py",
56 srcs: [
57 "public/acloud_main.py",
Sam Chiu81bdc652018-06-29 18:45:08 +080058 "errors.py"
herbertxue615af072018-05-24 09:39:17 +000059 ],
60 data: [
61 "public/data/default.config",
Roland Levillain3550f0e2020-09-08 19:05:25 +010062 ":acloud_version",
herbertxue615af072018-05-24 09:39:17 +000063 ],
64 libs: [
Kevin Cheng3087af52018-08-13 13:26:50 -070065 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070066 "acloud_delete",
Jaewoong Jung2a029f02019-01-24 13:21:42 -080067 "acloud_reconnect",
herbertxue615af072018-05-24 09:39:17 +000068 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +080069 "acloud_list",
herbertxue61bfd972019-09-24 15:51:52 +080070 "acloud_pull",
herbertxue2ebd4142020-07-30 19:37:37 +080071 "acloud_powerwash",
Sam Chiu5029a252018-11-06 20:54:13 +080072 "acloud_metrics",
herbertxue615af072018-05-24 09:39:17 +000073 "acloud_proto",
Kevin Cheng6001db32018-10-23 12:34:20 -070074 "acloud_public",
herbertxue282e2a52021-01-13 19:49:05 +080075 "acloud_restart",
Kevin Chengee6030f2018-06-26 10:55:30 -070076 "acloud_setup",
chojoyce8faf8852021-07-12 12:26:28 +080077 "acloud_hostcleanup",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070078 "py-apitools",
Kevin Cheng31e84292018-05-30 16:08:50 -070079 "py-dateutil",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070080 "py-google-api-python-client",
81 "py-oauth2client",
chojoyce92d884b2019-10-14 16:53:17 +080082 "py-six",
herbertxue615af072018-05-24 09:39:17 +000083 ],
Jaewoong Jung2a029f02019-01-24 13:21:42 -080084 dist: {
85 targets: ["droidcore"],
86 },
herbertxue615af072018-05-24 09:39:17 +000087}
88
Kevin Chengda4f07a2018-06-26 10:25:05 -070089python_test_host {
90 name: "acloud_test",
91 main: "acloud_test.py",
92 defaults: ["acloud_default"],
Kevin Cheng4fce0bc2018-08-13 11:51:34 -070093 data: [
94 "public/data/default.config",
95 ],
Kevin Chengda4f07a2018-06-26 10:25:05 -070096 srcs: [
97 "acloud_test.py",
Kevin Chengccfac9b2018-09-21 09:50:35 -070098 "errors.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070099 "public/*_test.py",
100 "public/actions/*_test.py",
101 "internal/lib/*_test.py",
Sam Chiue791f602019-05-03 15:18:10 +0800102 "metrics/*.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700103 ],
104 libs: [
Kevin Cheng86d43c72018-08-30 10:59:14 -0700105 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -0700106 "acloud_delete",
herbertxue61bfd972019-09-24 15:51:52 +0800107 "acloud_reconnect",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700108 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +0800109 "acloud_list",
herbertxue873c9562021-04-07 14:42:19 +0800110 "acloud_powerwash",
111 "acloud_public",
herbertxue61bfd972019-09-24 15:51:52 +0800112 "acloud_pull",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700113 "acloud_proto",
herbertxue282e2a52021-01-13 19:49:05 +0800114 "acloud_restart",
Sam Chiu4bb604a2018-10-05 18:29:10 +0800115 "acloud_setup",
chojoyce8faf8852021-07-12 12:26:28 +0800116 "acloud_hostcleanup",
Sam Chiue791f602019-05-03 15:18:10 +0800117 "asuite_cc_client",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700118 "py-apitools",
119 "py-dateutil",
120 "py-google-api-python-client",
121 "py-oauth2client",
122 ],
Kevin Chengcecb7fe2018-10-02 10:40:18 -0700123 test_config: "acloud_unittest.xml",
Dan Shi7f4cd092020-11-02 11:59:42 -0800124 test_suites: [
125 "general-tests",
Dan Shi7f4cd092020-11-02 11:59:42 -0800126 ],
Dan Shiee3af522020-11-17 21:03:13 -0800127 test_options: {
128 unit_test: true,
129 }
Kevin Chengda4f07a2018-06-26 10:25:05 -0700130}
131
132python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000133 name: "acloud_public",
134 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000135 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700136 "public/*.py",
137 "public/actions/*.py",
herbertxue615af072018-05-24 09:39:17 +0000138 ],
139 exclude_srcs: [
140 "public/*_test.py",
141 "public/actions/*_test.py",
142 "public/acloud_main.py",
143 ]
144}
145
Kevin Chengda4f07a2018-06-26 10:25:05 -0700146python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000147 name: "acloud_internal",
148 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000149 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700150 "internal/*.py",
151 "internal/lib/*.py",
herbertxue615af072018-05-24 09:39:17 +0000152 ],
153 exclude_srcs: [
herbertxue615af072018-05-24 09:39:17 +0000154 "internal/lib/*_test.py",
155 ]
156}
157
Kevin Chengda4f07a2018-06-26 10:25:05 -0700158python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000159 name: "acloud_proto",
160 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000161 srcs: [
Kevin Cheng8131d752018-06-06 14:38:43 -0700162 "internal/proto/*.proto",
herbertxue615af072018-05-24 09:39:17 +0000163 ],
Kevin Cheng8131d752018-06-06 14:38:43 -0700164 proto: {
165 canonical_path_from_root: false,
166 },
herbertxue615af072018-05-24 09:39:17 +0000167}
Kevin Chengee6030f2018-06-26 10:55:30 -0700168
169python_library_host{
170 name: "acloud_setup",
171 defaults: ["acloud_default"],
172 srcs: [
173 "setup/*.py",
174 ],
Sam Chiu81bdc652018-06-29 18:45:08 +0800175 exclude_srcs: [
176 "setup/*_test.py",
177 ],
Kevin Chengee6030f2018-06-26 10:55:30 -0700178}
Kevin Cheng3087af52018-08-13 13:26:50 -0700179
180python_library_host{
181 name: "acloud_create",
182 defaults: ["acloud_default"],
183 srcs: [
184 "create/*.py",
185 ],
186}
Kevin Chengeb85e862018-10-09 15:35:13 -0700187
188python_library_host{
189 name: "acloud_delete",
190 defaults: ["acloud_default"],
191 srcs: [
192 "delete/*.py",
193 ],
194}
Kevin Cheng6001db32018-10-23 12:34:20 -0700195
196python_library_host{
Sam Chiu5029a252018-11-06 20:54:13 +0800197 name: "acloud_list",
198 defaults: ["acloud_default"],
199 srcs: [
200 "list/*.py",
201 ],
202}
203
204python_library_host{
cylan4569dca2018-11-02 12:12:53 +0800205 name: "acloud_reconnect",
206 defaults: ["acloud_default"],
207 srcs: [
208 "reconnect/*.py",
209 ],
210}
211
212python_library_host{
herbertxue61bfd972019-09-24 15:51:52 +0800213 name: "acloud_pull",
214 defaults: ["acloud_default"],
215 srcs: [
216 "pull/*.py",
217 ],
218}
219
220python_library_host{
herbertxue2ebd4142020-07-30 19:37:37 +0800221 name: "acloud_powerwash",
222 defaults: ["acloud_default"],
223 srcs: [
224 "powerwash/*.py",
225 ],
226}
227
228python_library_host{
herbertxue282e2a52021-01-13 19:49:05 +0800229 name: "acloud_restart",
230 defaults: ["acloud_default"],
231 srcs: [
232 "restart/*.py",
233 ],
234}
235
236python_library_host{
chojoyce8faf8852021-07-12 12:26:28 +0800237 name: "acloud_hostcleanup",
238 defaults: ["acloud_default"],
239 srcs: [
240 "hostcleanup/*.py",
241 ],
242}
243
244python_library_host{
Kevin Cheng6001db32018-10-23 12:34:20 -0700245 name: "acloud_metrics",
246 defaults: ["acloud_default"],
247 srcs: [
248 "metrics/*.py",
249 ],
250 libs: [
Sam Chiue791f602019-05-03 15:18:10 +0800251 "asuite_cc_client",
Kevin Cheng6001db32018-10-23 12:34:20 -0700252 "asuite_metrics",
253 ],
254}
cylan9af14692020-02-21 18:11:35 +0800255
256genrule {
257 name: "acloud_version",
258 tool_files: ["gen_version.sh"],
259 cmd: "$(location gen_version.sh) $(out)",
260 out: ["public/data/VERSION"],
261}