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: [ |
| 28 | "build_test_suites", |
| 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: [ |
| 59 | "build_test_suites", |
| 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 | |
| 74 | python_library_host { |
| 75 | name: "build_test_suites", |
| 76 | srcs: [ |
| 77 | "build_test_suites.py", |
Luca Farsi | 040fabe | 2024-05-22 17:21:47 -0700 | [diff] [blame] | 78 | "optimized_targets.py", |
Luca Farsi | b130e79 | 2024-08-22 12:04:41 -0700 | [diff] [blame^] | 79 | "build_context.py", |
Luca Farsi | db13644 | 2024-03-26 10:55:21 -0700 | [diff] [blame] | 80 | ], |
| 81 | } |
| 82 | |
| 83 | python_library_host { |
| 84 | name: "ci_test_lib", |
| 85 | srcs: [ |
| 86 | "ci_test_lib.py", |
| 87 | ], |
| 88 | } |