blob: 89bc8aaf27e7ee8d295b2c8134f8caa5d505a7bf [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
15python_defaults {
16 name: "acloud_default",
Kevin Chengee6030f2018-06-26 10:55:30 -070017 pkg_path: "acloud",
herbertxue615af072018-05-24 09:39:17 +000018 version: {
19 py2: {
chojoycec5ee4a72020-07-23 23:32:25 +080020 enabled: false,
herbertxue615af072018-05-24 09:39:17 +000021 embedded_launcher: false,
chojoyce2a82d302019-12-24 18:13:36 +080022 libs: [
23 "py-pyopenssl",
24 ]
herbertxue615af072018-05-24 09:39:17 +000025 },
26 py3: {
chojoycec5ee4a72020-07-23 23:32:25 +080027 enabled: true,
herbertxue615af072018-05-24 09:39:17 +000028 embedded_launcher: false,
29 },
30 },
31}
32
33python_binary_host {
34 name: "acloud",
chojoycec5ee4a72020-07-23 23:32:25 +080035 // Make acloud's built name to acloud-dev default build python3 binary.
herbertxue00b241b2019-04-08 12:04:44 +080036 stem: "acloud-dev",
herbertxue615af072018-05-24 09:39:17 +000037 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +000038 main: "public/acloud_main.py",
39 srcs: [
40 "public/acloud_main.py",
Sam Chiu81bdc652018-06-29 18:45:08 +080041 "errors.py"
herbertxue615af072018-05-24 09:39:17 +000042 ],
43 data: [
44 "public/data/default.config",
Roland Levillain3550f0e2020-09-08 19:05:25 +010045 ":acloud_version",
herbertxue615af072018-05-24 09:39:17 +000046 ],
47 libs: [
Kevin Cheng3087af52018-08-13 13:26:50 -070048 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070049 "acloud_delete",
Jaewoong Jung2a029f02019-01-24 13:21:42 -080050 "acloud_reconnect",
herbertxue615af072018-05-24 09:39:17 +000051 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +080052 "acloud_list",
herbertxue61bfd972019-09-24 15:51:52 +080053 "acloud_pull",
herbertxue2ebd4142020-07-30 19:37:37 +080054 "acloud_powerwash",
Sam Chiu5029a252018-11-06 20:54:13 +080055 "acloud_metrics",
herbertxue615af072018-05-24 09:39:17 +000056 "acloud_proto",
Kevin Cheng6001db32018-10-23 12:34:20 -070057 "acloud_public",
Kevin Chengee6030f2018-06-26 10:55:30 -070058 "acloud_setup",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070059 "py-apitools",
Kevin Cheng31e84292018-05-30 16:08:50 -070060 "py-dateutil",
Kevin Cheng7639d5f2018-06-14 13:44:46 -070061 "py-google-api-python-client",
62 "py-oauth2client",
chojoyce92d884b2019-10-14 16:53:17 +080063 "py-six",
herbertxue615af072018-05-24 09:39:17 +000064 ],
Jaewoong Jung2a029f02019-01-24 13:21:42 -080065 dist: {
66 targets: ["droidcore"],
67 },
herbertxue615af072018-05-24 09:39:17 +000068}
69
Kevin Chengda4f07a2018-06-26 10:25:05 -070070python_test_host {
71 name: "acloud_test",
72 main: "acloud_test.py",
73 defaults: ["acloud_default"],
Kevin Cheng4fce0bc2018-08-13 11:51:34 -070074 data: [
75 "public/data/default.config",
76 ],
Kevin Chengda4f07a2018-06-26 10:25:05 -070077 srcs: [
78 "acloud_test.py",
Kevin Chengccfac9b2018-09-21 09:50:35 -070079 "errors.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070080 "public/*_test.py",
81 "public/actions/*_test.py",
82 "internal/lib/*_test.py",
Sam Chiue791f602019-05-03 15:18:10 +080083 "metrics/*.py",
Kevin Chengda4f07a2018-06-26 10:25:05 -070084 ],
85 libs: [
Kevin Cheng86d43c72018-08-30 10:59:14 -070086 "acloud_create",
Kevin Chengeb85e862018-10-09 15:35:13 -070087 "acloud_delete",
herbertxue61bfd972019-09-24 15:51:52 +080088 "acloud_reconnect",
Kevin Chengda4f07a2018-06-26 10:25:05 -070089 "acloud_internal",
Sam Chiu5029a252018-11-06 20:54:13 +080090 "acloud_list",
herbertxue61bfd972019-09-24 15:51:52 +080091 "acloud_pull",
Kevin Chengda4f07a2018-06-26 10:25:05 -070092 "acloud_proto",
Kevin Cheng86d43c72018-08-30 10:59:14 -070093 "acloud_public",
Sam Chiu4bb604a2018-10-05 18:29:10 +080094 "acloud_setup",
Sam Chiue791f602019-05-03 15:18:10 +080095 "asuite_cc_client",
Kevin Chengda4f07a2018-06-26 10:25:05 -070096 "py-apitools",
97 "py-dateutil",
98 "py-google-api-python-client",
Kevin Cheng60db1bc2018-09-24 12:20:25 -070099 "py-mock",
Kevin Chengda4f07a2018-06-26 10:25:05 -0700100 "py-oauth2client",
101 ],
Kevin Chengcecb7fe2018-10-02 10:40:18 -0700102 test_config: "acloud_unittest.xml",
Dan Shi7f4cd092020-11-02 11:59:42 -0800103 test_suites: [
104 "general-tests",
Dan Shi7f4cd092020-11-02 11:59:42 -0800105 ],
Dan Shiee3af522020-11-17 21:03:13 -0800106 test_options: {
107 unit_test: true,
108 }
Kevin Chengda4f07a2018-06-26 10:25:05 -0700109}
110
111python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000112 name: "acloud_public",
113 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000114 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700115 "public/*.py",
116 "public/actions/*.py",
herbertxue615af072018-05-24 09:39:17 +0000117 ],
118 exclude_srcs: [
119 "public/*_test.py",
120 "public/actions/*_test.py",
121 "public/acloud_main.py",
122 ]
123}
124
Kevin Chengda4f07a2018-06-26 10:25:05 -0700125python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000126 name: "acloud_internal",
127 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000128 srcs: [
Kevin Chengda4f07a2018-06-26 10:25:05 -0700129 "internal/*.py",
130 "internal/lib/*.py",
herbertxue615af072018-05-24 09:39:17 +0000131 ],
132 exclude_srcs: [
herbertxue615af072018-05-24 09:39:17 +0000133 "internal/lib/*_test.py",
134 ]
135}
136
Kevin Chengda4f07a2018-06-26 10:25:05 -0700137python_library_host {
herbertxue615af072018-05-24 09:39:17 +0000138 name: "acloud_proto",
139 defaults: ["acloud_default"],
herbertxue615af072018-05-24 09:39:17 +0000140 srcs: [
Kevin Cheng8131d752018-06-06 14:38:43 -0700141 "internal/proto/*.proto",
herbertxue615af072018-05-24 09:39:17 +0000142 ],
Kevin Cheng8131d752018-06-06 14:38:43 -0700143 proto: {
144 canonical_path_from_root: false,
145 },
herbertxue615af072018-05-24 09:39:17 +0000146}
Kevin Chengee6030f2018-06-26 10:55:30 -0700147
148python_library_host{
149 name: "acloud_setup",
150 defaults: ["acloud_default"],
151 srcs: [
152 "setup/*.py",
153 ],
Sam Chiu81bdc652018-06-29 18:45:08 +0800154 exclude_srcs: [
155 "setup/*_test.py",
156 ],
Kevin Chengee6030f2018-06-26 10:55:30 -0700157}
Kevin Cheng3087af52018-08-13 13:26:50 -0700158
159python_library_host{
160 name: "acloud_create",
161 defaults: ["acloud_default"],
162 srcs: [
163 "create/*.py",
164 ],
165}
Kevin Chengeb85e862018-10-09 15:35:13 -0700166
167python_library_host{
168 name: "acloud_delete",
169 defaults: ["acloud_default"],
170 srcs: [
171 "delete/*.py",
172 ],
173}
Kevin Cheng6001db32018-10-23 12:34:20 -0700174
175python_library_host{
Sam Chiu5029a252018-11-06 20:54:13 +0800176 name: "acloud_list",
177 defaults: ["acloud_default"],
178 srcs: [
179 "list/*.py",
180 ],
181}
182
183python_library_host{
cylan4569dca2018-11-02 12:12:53 +0800184 name: "acloud_reconnect",
185 defaults: ["acloud_default"],
186 srcs: [
187 "reconnect/*.py",
188 ],
189}
190
191python_library_host{
herbertxue61bfd972019-09-24 15:51:52 +0800192 name: "acloud_pull",
193 defaults: ["acloud_default"],
194 srcs: [
195 "pull/*.py",
196 ],
197}
198
199python_library_host{
herbertxue2ebd4142020-07-30 19:37:37 +0800200 name: "acloud_powerwash",
201 defaults: ["acloud_default"],
202 srcs: [
203 "powerwash/*.py",
204 ],
205}
206
207python_library_host{
Kevin Cheng6001db32018-10-23 12:34:20 -0700208 name: "acloud_metrics",
209 defaults: ["acloud_default"],
210 srcs: [
211 "metrics/*.py",
212 ],
213 libs: [
Sam Chiue791f602019-05-03 15:18:10 +0800214 "asuite_cc_client",
Kevin Cheng6001db32018-10-23 12:34:20 -0700215 "asuite_metrics",
216 ],
217}
cylan9af14692020-02-21 18:11:35 +0800218
219genrule {
220 name: "acloud_version",
221 tool_files: ["gen_version.sh"],
222 cmd: "$(location gen_version.sh) $(out)",
223 out: ["public/data/VERSION"],
224}