blob: aa89744ce4cd4ec7c327fec845a5db4affd31bee [file] [log] [blame]
Motomu Utsumiceb2a752022-10-04 18:38:04 +09001//
2// Copyright (C) 2019 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
16
17package {
18 default_applicable_licenses: ["Android-Apache-2.0"],
19}
20
Patrick Rohrf0f0ac02023-01-18 02:54:41 -080021// cronet_test_java_defaults can be used to specify a java_defaults target that
22// either enables or disables Cronet tests. This is used to disable Cronet
23// tests on tm-mainline-prod where the required APIs are not present.
24cronet_test_java_defaults = "CronetTestJavaDefaultsEnabled"
25// This is a placeholder comment to avoid merge conflicts
26// as cronet_test_java_defaults may have different values
27// depending on the branch
28
Patrick Rohr68394242023-01-18 06:19:02 -080029java_defaults {
30 name: "CronetTestJavaDefaultsEnabled",
31 enabled: true,
Dan Stahraf33f012023-03-02 16:09:07 +000032 // TODO(danstahr): move to unconditional static_libs once the T branch is abandoned
33 static_libs: [
34 "truth",
35 ],
Patrick Rohr68394242023-01-18 06:19:02 -080036}
37
38java_defaults {
39 name: "CronetTestJavaDefaultsDisabled",
40 enabled: false,
41}
42
43java_defaults {
44 name: "CronetTestJavaDefaults",
45 defaults: [cronet_test_java_defaults],
46}
47
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000048android_library {
49 name: "CtsNetHttpTestsLib",
Dan Stahraf33f012023-03-02 16:09:07 +000050 defaults: [
51 "cts_defaults",
52 "CronetTestJavaDefaults",
53 ],
Chidera Olibie4fad0c32022-11-23 18:53:54 +000054 sdk_version: "test_current",
Chidera Olibiebe5cf702022-12-14 19:42:34 +000055 srcs: [
56 "src/**/*.java",
57 "src/**/*.kt",
58 ],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090059 static_libs: [
Chidera Olibie0a5befb2023-02-14 14:53:37 +000060 "androidx.test.ext.junit",
Chidera Olibie4fad0c32022-11-23 18:53:54 +000061 "ctstestrunner-axt",
Chidera Olibiebe5cf702022-12-14 19:42:34 +000062 "ctstestserver",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090063 "junit",
Stefano Duo7351f472023-01-16 15:56:58 +000064 "hamcrest-library",
Chidera Olibie0a5befb2023-02-14 14:53:37 +000065 "kotlin-test",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090066 ],
67 libs: [
Motomu Utsumiceb2a752022-10-04 18:38:04 +090068 "android.test.base",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090069 "androidx.annotation_annotation",
Patrick Rohr04a633a2023-01-17 23:36:16 -080070 "framework-tethering",
Chidera Olibiebe5cf702022-12-14 19:42:34 +000071 "org.apache.http.legacy",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090072 ],
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000073}
Motomu Utsumiceb2a752022-10-04 18:38:04 +090074
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000075android_test {
76 name: "CtsNetHttpTestCases",
77 defaults: [
78 "cts_defaults",
79 "CronetTestJavaDefaults",
80 ],
81 sdk_version: "test_current",
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000082 static_libs: ["CtsNetHttpTestsLib"],
Chidera Olibie4fad0c32022-11-23 18:53:54 +000083 // Tag this as a cts test artifact
84 test_suites: [
85 "cts",
86 "general-tests",
87 "mts-tethering"
Motomu Utsumiceb2a752022-10-04 18:38:04 +090088 ],
89}