1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
package(default_visibility = ["//visibility:private"])
filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//src:__pkg__"],
)
filegroup(
name = "test-deps",
testonly = 1,
srcs = ["//src:bazel"],
data = ["//src/tools/remote:worker"],
)
py_library(
name = "test_base",
testonly = 1,
srcs = ["test_base.py"],
data = [":test-deps"],
visibility = [
"//src/test/py/bazel:__pkg__",
"//third_party/def_parser:__pkg__",
"//tools/android:__pkg__",
],
)
py_test(
name = "action_temp_test",
size = "medium",
srcs = ["action_temp_test.py"],
deps = [":test_base"],
)
py_test(
name = "cc_import_test",
size = "medium",
srcs = ["cc_import_test.py"],
deps = [":test_base"],
)
py_test(
name = "py_test",
size = "medium",
srcs = ["py_test.py"],
deps = [":test_base"],
)
py_test(
name = "bazel_server_mode_test",
size = "medium",
srcs = ["bazel_server_mode_test.py"],
deps = [":test_base"],
)
py_test(
name = "bazel_clean_test",
size = "medium",
srcs = ["bazel_clean_test.py"],
deps = [":test_base"],
)
py_test(
name = "bazel_external_repository_test",
size = "medium",
srcs = ["bazel_external_repository_test.py"],
data = glob(["testdata/bazel_external_repository_test/**"]),
deps = [":test_base"],
)
py_test(
name = "bazel_windows_test",
size = "medium",
srcs = select({
"//src/conditions:windows": ["bazel_windows_test.py"],
"//conditions:default": ["empty_test.py"],
}),
main = select({
"//src/conditions:windows": "bazel_windows_test.py",
"//conditions:default": "empty_test.py",
}),
deps = select({
"//src/conditions:windows": [":test_base"],
"//conditions:default": [],
}),
)
py_test(
name = "windows_remote_test",
size = "medium",
srcs = select({
"//src/conditions:windows": ["windows_remote_test.py"],
"//conditions:default": ["empty_test.py"],
}),
main = select({
"//src/conditions:windows": "windows_remote_test.py",
"//conditions:default": "empty_test.py",
}),
deps = select({
"//src/conditions:windows": [":test_base"],
"//conditions:default": [],
}),
)
py_test(
name = "launcher_test",
size = "medium",
srcs = ["launcher_test.py"],
tags = ["manual"], # TODO(b/72827255): Reenable once it works.
deps = [":test_base"],
)
py_test(
name = "runfiles_test",
timeout = "long",
srcs = ["runfiles_test.py"],
data = glob(["testdata/runfiles_test/**"]),
deps = [
":test_base",
"//third_party/py/six",
],
)
py_test(
name = "bazel_windows_cpp_test",
size = "large",
srcs = select({
"//src/conditions:windows": ["bazel_windows_cpp_test.py"],
"//conditions:default": ["empty_test.py"],
}),
main = select({
"//src/conditions:windows": "bazel_windows_cpp_test.py",
"//conditions:default": "empty_test.py",
}),
deps = select({
"//src/conditions:windows": [":test_base"],
"//conditions:default": [],
}),
)
py_test(
name = "query_test",
size = "medium",
srcs = ["query_test.py"],
deps = [":test_base"],
)
test_suite(
name = "windows_tests",
tags = [
"-no_windows",
"-slow",
],
visibility = ["//visibility:private"],
)
test_suite(
name = "all_windows_tests",
tests = [
":windows_tests",
],
visibility = ["//src:__pkg__"],
)
|