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 15package { 16 default_team: "trendy_team_partner_eng", 17 default_applicable_licenses: ["tools_acloud_license"], 18} 19 20// Added automatically by a large-scale-change 21// http://go/android-license-faq 22license { 23 name: "tools_acloud_license", 24 visibility: [":__subpackages__"], 25 license_kinds: [ 26 "SPDX-license-identifier-Apache-2.0", 27 ], 28 license_text: [ 29 "LICENSE", 30 ], 31} 32 33python_binary_host { 34 name: "acloud", 35 // Make acloud's built name to acloud-dev default build python3 binary. 36 stem: "acloud-dev", 37 pkg_path: "acloud", 38 main: "public/acloud_main.py", 39 srcs: [ 40 "public/acloud_main.py", 41 "errors.py", 42 ], 43 data: [ 44 "public/data/default.config", 45 ":acloud_version", 46 ], 47 libs: [ 48 "acloud_create", 49 "acloud_delete", 50 "acloud_reconnect", 51 "acloud_internal", 52 "acloud_list", 53 "acloud_pull", 54 "acloud_powerwash", 55 "acloud_metrics", 56 "acloud_proto", 57 "acloud_public", 58 "acloud_restart", 59 "acloud_setup", 60 "acloud_hostcleanup", 61 "py-apitools", 62 "py-dateutil", 63 "py-google-api-python-client", 64 "py-oauth2client", 65 "py-six", 66 ], 67 dist: { 68 targets: ["droidcore"], 69 }, 70 // TODO(b/174041232): Make acloud work with embedded_launcher 71 embedded_launcher: false, 72} 73 74python_test_host { 75 name: "acloud_test", 76 pkg_path: "acloud", 77 main: "acloud_test.py", 78 data: [ 79 "public/data/default.config", 80 ], 81 srcs: [ 82 "acloud_test.py", 83 "errors.py", 84 "public/*_test.py", 85 "public/actions/*_test.py", 86 "internal/lib/*_test.py", 87 "metrics/*.py", 88 ], 89 libs: [ 90 "acloud_create", 91 "acloud_delete", 92 "acloud_reconnect", 93 "acloud_internal", 94 "acloud_list", 95 "acloud_powerwash", 96 "acloud_public", 97 "acloud_pull", 98 "acloud_proto", 99 "acloud_restart", 100 "acloud_setup", 101 "acloud_hostcleanup", 102 "asuite_cc_client", 103 "py-apitools", 104 "py-dateutil", 105 "py-google-api-python-client", 106 "py-oauth2client", 107 ], 108 test_config: "acloud_unittest.xml", 109 test_suites: [ 110 "general-tests", 111 ], 112 test_options: { 113 // TODO(b/270225397) 114 unit_test: false, 115 tags: ["no-remote"], 116 }, 117} 118 119python_library_host { 120 name: "acloud_public", 121 pkg_path: "acloud", 122 srcs: [ 123 "public/*.py", 124 "public/actions/*.py", 125 ], 126 exclude_srcs: [ 127 "public/*_test.py", 128 "public/actions/*_test.py", 129 "public/acloud_main.py", 130 ], 131} 132 133python_library_host { 134 name: "acloud_internal", 135 pkg_path: "acloud", 136 srcs: [ 137 "internal/*.py", 138 "internal/lib/*.py", 139 ], 140 exclude_srcs: [ 141 "internal/lib/*_test.py", 142 ], 143} 144 145python_library_host { 146 name: "acloud_proto", 147 pkg_path: "acloud", 148 srcs: [ 149 "internal/proto/*.proto", 150 ], 151 proto: { 152 canonical_path_from_root: false, 153 }, 154} 155 156python_library_host { 157 name: "acloud_setup", 158 pkg_path: "acloud", 159 srcs: [ 160 "setup/*.py", 161 ], 162 exclude_srcs: [ 163 "setup/*_test.py", 164 ], 165} 166 167python_library_host { 168 name: "acloud_create", 169 pkg_path: "acloud", 170 srcs: [ 171 "create/*.py", 172 ], 173} 174 175python_library_host { 176 name: "acloud_delete", 177 pkg_path: "acloud", 178 srcs: [ 179 "delete/*.py", 180 ], 181} 182 183python_library_host { 184 name: "acloud_list", 185 pkg_path: "acloud", 186 srcs: [ 187 "list/*.py", 188 ], 189} 190 191python_library_host { 192 name: "acloud_reconnect", 193 pkg_path: "acloud", 194 srcs: [ 195 "reconnect/*.py", 196 ], 197} 198 199python_library_host { 200 name: "acloud_pull", 201 pkg_path: "acloud", 202 srcs: [ 203 "pull/*.py", 204 ], 205} 206 207python_library_host { 208 name: "acloud_powerwash", 209 pkg_path: "acloud", 210 srcs: [ 211 "powerwash/*.py", 212 ], 213} 214 215python_library_host { 216 name: "acloud_restart", 217 pkg_path: "acloud", 218 srcs: [ 219 "restart/*.py", 220 ], 221} 222 223python_library_host { 224 name: "acloud_hostcleanup", 225 pkg_path: "acloud", 226 srcs: [ 227 "hostcleanup/*.py", 228 ], 229} 230 231python_library_host { 232 name: "acloud_metrics", 233 pkg_path: "acloud", 234 srcs: [ 235 "metrics/*.py", 236 ], 237 libs: [ 238 "asuite_cc_client", 239 ], 240} 241 242genrule { 243 name: "acloud_version", 244 tool_files: ["gen_version.sh"], 245 cmd: "$(location gen_version.sh) $(out)", 246 out: ["public/data/VERSION"], 247} 248