• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15package {
16    default_applicable_licenses: ["Android-Apache-2.0"],
17    default_team: "trendy_team_adte",
18}
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_lib",
29        "pyfakefs",
30        "ci_test_lib",
31    ],
32    test_options: {
33        unit_test: true,
34    },
35    data: [
36        ":py3-cmd",
37    ],
38}
39
40// This test is only intended to be run locally since it's slow, not hermetic,
41// and requires a lot of system state. It is therefore not marked as `unit_test`
42// and is not part of any test suite. Note that we also don't want to run this
43// test with Bazel since that would require disabling sandboxing and explicitly
44// passing in all the env vars we depend on via the command-line. The test
45// target could be configured to do so but it's not worth doing seeing that
46// we're moving away from Bazel.
47python_test_host {
48    name: "build_test_suites_local_test",
49    main: "build_test_suites_local_test.py",
50    srcs: [
51        "build_test_suites_local_test.py",
52    ],
53    libs: [
54        "build_test_suites_lib",
55        "pyfakefs",
56        "ci_test_lib",
57    ],
58    test_config_template: "AndroidTest.xml.template",
59    test_options: {
60        unit_test: false,
61    },
62}
63
64python_test_host {
65    name: "optimized_targets_test",
66    main: "optimized_targets_test.py",
67    pkg_path: "testdata",
68    srcs: [
69        "optimized_targets_test.py",
70    ],
71    libs: [
72        "build_test_suites_lib",
73        "pyfakefs",
74    ],
75    test_options: {
76        unit_test: true,
77    },
78    data: [
79        ":py3-cmd",
80    ],
81}
82
83python_binary_host {
84    name: "build_test_suites",
85    srcs: [
86        "build_test_suites.py",
87        "optimized_targets.py",
88        "test_mapping_module_retriever.py",
89        "build_context.py",
90        "test_discovery_agent.py",
91        "metrics_agent.py",
92        "buildbot.py",
93    ],
94    main: "build_test_suites.py",
95    libs: [
96        "soong-metrics-proto-py",
97    ],
98}
99
100python_library_host {
101    name: "build_test_suites_lib",
102    srcs: [
103        "build_test_suites.py",
104        "optimized_targets.py",
105        "test_mapping_module_retriever.py",
106        "build_context.py",
107        "test_discovery_agent.py",
108        "metrics_agent.py",
109        "buildbot.py",
110    ],
111    libs: [
112        "soong-metrics-proto-py",
113    ],
114}
115
116python_library_host {
117    name: "ci_test_lib",
118    srcs: [
119        "ci_test_lib.py",
120    ],
121}
122