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 ], 56 libs: [ 57 "atest_py3_proto", 58 ], 59 data: [ 60 "tools/updatedb_darwin.sh", 61 ":asuite_version", 62 ], 63 // Make atest's built name to atest-dev 64 stem: "atest-dev", 65 defaults: ["atest_py3_default"], 66 dist: { 67 targets: ["droidcore"], 68 }, 69} 70 71python_library_host { 72 name: "atest_py3_proto", 73 defaults: ["atest_py3_default"], 74 srcs: [ 75 "proto/*.proto", 76 ], 77 proto: { 78 canonical_path_from_root: false, 79 }, 80} 81 82// Exclude atest_updatedb_unittest due to it's a test for ATest's wrapper 83// of updatedb, but there's no updatedb binary on test server. 84python_test_host { 85 name: "atest_unittests", 86 main: "atest_run_unittests.py", 87 pkg_path: "atest", 88 srcs: [ 89 "**/*.py", 90 ], 91 data: [ 92 "tools/updatedb_darwin.sh", 93 "unittest_data/**/*", 94 "unittest_data/**/.*", 95 ], 96 exclude_srcs: [ 97 "asuite_lib_test/*.py", 98 "proto/*_pb2.py", 99 "proto/__init__.py", 100 "tools/atest_updatedb_unittest.py", 101 ], 102 libs: [ 103 "atest_py3_proto", 104 ], 105 test_config: "atest_unittests.xml", 106 test_suites: ["general-tests"], 107 defaults: ["atest_py3_default"], 108} 109 110python_test_host { 111 name: "atest_integration_tests", 112 main: "atest_integration_tests.py", 113 pkg_path: "atest", 114 srcs: [ 115 "atest_integration_tests.py", 116 ], 117 data: [ 118 "INTEGRATION_TESTS", 119 ], 120 test_config: "atest_integration_tests.xml", 121 test_suites: ["general-tests"], 122 defaults: ["atest_py3_default"], 123} 124 125