blob: 104f517ccdd3cf0deb0338d596d946479c9fb109 [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
74python_library_host {
75 name: "build_test_suites",
76 srcs: [
77 "build_test_suites.py",
Luca Farsi040fabe2024-05-22 17:21:47 -070078 "optimized_targets.py",
Luca Farsidb136442024-03-26 10:55:21 -070079 ],
80}
81
82python_library_host {
83 name: "ci_test_lib",
84 srcs: [
85 "ci_test_lib.py",
86 ],
87}