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. 17java_library_host { 18 name: "atest-tradefed-shell", 19} 20 21tradefed_binary_host { 22 name: "atest-tradefed", 23 short_name: "ATEST", 24 full_name: "ATest Test Suite", 25 static_libs: ["atest-tradefed-shell"], 26} 27 28python_defaults { 29 name: "atest_py3_default", 30 pkg_path: "atest", 31 version: { 32 py2: { 33 enabled: false, 34 embedded_launcher: false, 35 }, 36 py3: { 37 enabled: true, 38 embedded_launcher: false, 39 }, 40 }, 41} 42 43python_binary_host { 44 name: "atest", 45 main: "atest.py", 46 srcs: [ 47 "**/*.py", 48 ], 49 exclude_srcs: [ 50 "*_unittest.py", 51 "*/*_unittest.py", 52 "asuite_lib_test/*.py", 53 "proto/*_pb2.py", 54 "proto/__init__.py", 55 "tools/tradefederation/core/proto/__init__.py", 56 "tools/tradefederation/core/proto/*_pb2.py", 57 ], 58 libs: [ 59 "atest_py3_proto", 60 "tradefed-protos-py", 61 ], 62 data: [ 63 "tools/updatedb_darwin.sh", 64 ":asuite_version", 65 ], 66 // Make atest's built name to atest-dev 67 stem: "atest-dev", 68 defaults: ["atest_py3_default"], 69 dist: { 70 targets: ["droidcore"], 71 }, 72} 73 74python_library_host { 75 name: "atest_py3_proto", 76 defaults: ["atest_py3_default"], 77 srcs: [ 78 "proto/*.proto", 79 ], 80 proto: { 81 canonical_path_from_root: false, 82 }, 83} 84 85// Exclude atest_updatedb_unittest due to it's a test for ATest's wrapper 86// of updatedb, but there's no updatedb binary on test server. 87python_test_host { 88 name: "atest_unittests", 89 main: "atest_run_unittests.py", 90 pkg_path: "atest", 91 srcs: [ 92 "**/*.py", 93 ], 94 data: [ 95 "tools/updatedb_darwin.sh", 96 "unittest_data/**/*", 97 "unittest_data/**/.*", 98 ], 99 exclude_srcs: [ 100 "asuite_lib_test/*.py", 101 "proto/*_pb2.py", 102 "proto/__init__.py", 103 "tools/atest_updatedb_unittest.py", 104 "tools/tradefederation/core/proto/__init__.py", 105 "tools/tradefederation/core/proto/*_pb2.py", 106 ], 107 libs: [ 108 "atest_py3_proto", 109 "tradefed-protos-py", 110 ], 111 test_config: "atest_unittests.xml", 112 test_suites: ["general-tests"], 113 defaults: ["atest_py3_default"], 114} 115 116python_test_host { 117 name: "atest_integration_tests", 118 main: "atest_integration_tests.py", 119 pkg_path: "atest", 120 srcs: [ 121 "atest_integration_tests.py", 122 ], 123 data: [ 124 "INTEGRATION_TESTS", 125 ], 126 test_config: "atest_integration_tests.xml", 127 test_suites: ["general-tests"], 128 defaults: ["atest_py3_default"], 129} 130 131