blob: 0dfbd376d9e157b19754bbbfc7cbd334fef4e87d [file] [log] [blame]
Luca Farsidb136442024-03-26 10:55:21 -07001// 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
15package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
Luca Farsi040fabe2024-05-22 17:21:47 -070017 default_team: "trendy_team_adte",
Luca Farsidb136442024-03-26 10:55:21 -070018}
19
20python_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.
52python_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
Luca Farsib9c54642024-08-13 17:16:33 -070074python_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: [
82 "build_test_suites",
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 Farsidb136442024-03-26 10:55:21 -070098python_library_host {
99 name: "build_test_suites",
100 srcs: [
101 "build_test_suites.py",
Luca Farsi040fabe2024-05-22 17:21:47 -0700102 "optimized_targets.py",
Luca Farsib9c54642024-08-13 17:16:33 -0700103 "test_mapping_module_retriever.py",
Luca Farsib130e792024-08-22 12:04:41 -0700104 "build_context.py",
Mingjun Yangd448be22024-10-15 05:37:00 +0000105 "test_discovery_agent.py",
Luca Farsidb136442024-03-26 10:55:21 -0700106 ],
107}
108
109python_library_host {
110 name: "ci_test_lib",
111 srcs: [
112 "ci_test_lib.py",
113 ],
114}