Luca Farsi | db13644 | 2024-03-26 10:55:21 -0700 | [diff] [blame] | 1 | // Copyright 2024 Google Inc. All rights reserved. |
| 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 | package { |
| 16 | default_applicable_licenses: ["Android-Apache-2.0"], |
Luca Farsi | 040fabe | 2024-05-22 17:21:47 -0700 | [diff] [blame] | 17 | default_team: "trendy_team_adte", |
Luca Farsi | db13644 | 2024-03-26 10:55:21 -0700 | [diff] [blame] | 18 | } |
| 19 | |
| 20 | python_test_host { |
| 21 | name: "build_test_suites_test", |
| 22 | main: "build_test_suites_test.py", |
| 23 | pkg_path: "testdata", |
| 24 | srcs: [ |
| 25 | "build_test_suites_test.py", |
| 26 | ], |
| 27 | libs: [ |
Luca Farsi | 10adf35 | 2024-11-06 14:23:36 -0800 | [diff] [blame] | 28 | "build_test_suites_lib", |
Luca Farsi | db13644 | 2024-03-26 10:55:21 -0700 | [diff] [blame] | 29 | "pyfakefs", |
| 30 | "ci_test_lib", |
| 31 | ], |
| 32 | test_options: { |
| 33 | unit_test: true, |
| 34 | }, |
| 35 | data: [ |
| 36 | ":py3-cmd", |
| 37 | ], |
| 38 | version: { |
| 39 | py3: { |
| 40 | embedded_launcher: true, |
| 41 | }, |
| 42 | }, |
| 43 | } |
| 44 | |
| 45 | // This test is only intended to be run locally since it's slow, not hermetic, |
| 46 | // and requires a lot of system state. It is therefore not marked as `unit_test` |
| 47 | // and is not part of any test suite. Note that we also don't want to run this |
| 48 | // test with Bazel since that would require disabling sandboxing and explicitly |
| 49 | // passing in all the env vars we depend on via the command-line. The test |
| 50 | // target could be configured to do so but it's not worth doing seeing that |
| 51 | // we're moving away from Bazel. |
| 52 | python_test_host { |
| 53 | name: "build_test_suites_local_test", |
| 54 | main: "build_test_suites_local_test.py", |
| 55 | srcs: [ |
| 56 | "build_test_suites_local_test.py", |
| 57 | ], |
| 58 | libs: [ |
Luca Farsi | 10adf35 | 2024-11-06 14:23:36 -0800 | [diff] [blame] | 59 | "build_test_suites_lib", |
Luca Farsi | db13644 | 2024-03-26 10:55:21 -0700 | [diff] [blame] | 60 | "pyfakefs", |
| 61 | "ci_test_lib", |
| 62 | ], |
| 63 | test_config_template: "AndroidTest.xml.template", |
| 64 | test_options: { |
| 65 | unit_test: false, |
| 66 | }, |
| 67 | version: { |
| 68 | py3: { |
| 69 | embedded_launcher: true, |
| 70 | }, |
| 71 | }, |
| 72 | } |
| 73 | |
Luca Farsi | b9c5464 | 2024-08-13 17:16:33 -0700 | [diff] [blame] | 74 | python_test_host { |
| 75 | name: "optimized_targets_test", |
| 76 | main: "optimized_targets_test.py", |
| 77 | pkg_path: "testdata", |
| 78 | srcs: [ |
| 79 | "optimized_targets_test.py", |
| 80 | ], |
| 81 | libs: [ |
Luca Farsi | 10adf35 | 2024-11-06 14:23:36 -0800 | [diff] [blame] | 82 | "build_test_suites_lib", |
Luca Farsi | b9c5464 | 2024-08-13 17:16:33 -0700 | [diff] [blame] | 83 | "pyfakefs", |
| 84 | ], |
| 85 | test_options: { |
| 86 | unit_test: true, |
| 87 | }, |
| 88 | data: [ |
| 89 | ":py3-cmd", |
| 90 | ], |
| 91 | version: { |
| 92 | py3: { |
| 93 | embedded_launcher: true, |
| 94 | }, |
| 95 | }, |
| 96 | } |
| 97 | |
Luca Farsi | 10adf35 | 2024-11-06 14:23:36 -0800 | [diff] [blame] | 98 | python_binary_host { |
Luca Farsi | db13644 | 2024-03-26 10:55:21 -0700 | [diff] [blame] | 99 | name: "build_test_suites", |
| 100 | srcs: [ |
| 101 | "build_test_suites.py", |
Luca Farsi | 040fabe | 2024-05-22 17:21:47 -0700 | [diff] [blame] | 102 | "optimized_targets.py", |
Luca Farsi | b9c5464 | 2024-08-13 17:16:33 -0700 | [diff] [blame] | 103 | "test_mapping_module_retriever.py", |
Luca Farsi | b130e79 | 2024-08-22 12:04:41 -0700 | [diff] [blame] | 104 | "build_context.py", |
Mingjun Yang | d448be2 | 2024-10-15 05:37:00 +0000 | [diff] [blame] | 105 | "test_discovery_agent.py", |
Luca Farsi | 2b3b093 | 2024-11-06 14:41:15 -0800 | [diff] [blame] | 106 | "metrics_agent.py", |
| 107 | "buildbot.py", |
Luca Farsi | db13644 | 2024-03-26 10:55:21 -0700 | [diff] [blame] | 108 | ], |
Luca Farsi | 10adf35 | 2024-11-06 14:23:36 -0800 | [diff] [blame] | 109 | main: "build_test_suites.py", |
Luca Farsi | 10adf35 | 2024-11-06 14:23:36 -0800 | [diff] [blame] | 110 | libs: [ |
| 111 | "soong-metrics-proto-py", |
| 112 | ], |
| 113 | } |
| 114 | |
| 115 | python_library_host { |
| 116 | name: "build_test_suites_lib", |
| 117 | srcs: [ |
| 118 | "build_test_suites.py", |
| 119 | "optimized_targets.py", |
| 120 | "test_mapping_module_retriever.py", |
| 121 | "build_context.py", |
| 122 | "test_discovery_agent.py", |
Luca Farsi | 2b3b093 | 2024-11-06 14:41:15 -0800 | [diff] [blame] | 123 | "metrics_agent.py", |
| 124 | "buildbot.py", |
Luca Farsi | 10adf35 | 2024-11-06 14:23:36 -0800 | [diff] [blame] | 125 | ], |
Luca Farsi | 7d85971 | 2024-11-06 16:09:16 -0800 | [diff] [blame^] | 126 | libs: [ |
| 127 | "soong-metrics-proto-py", |
| 128 | ], |
Luca Farsi | db13644 | 2024-03-26 10:55:21 -0700 | [diff] [blame] | 129 | } |
| 130 | |
| 131 | python_library_host { |
| 132 | name: "ci_test_lib", |
| 133 | srcs: [ |
| 134 | "ci_test_lib.py", |
| 135 | ], |
| 136 | } |