blob: 41bfbc907830bb46171a28d3df3a68f4feba829e [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,
32}
33
34java_defaults {
35 name: "CronetTestJavaDefaultsDisabled",
36 enabled: false,
37}
38
39java_defaults {
40 name: "CronetTestJavaDefaults",
41 defaults: [cronet_test_java_defaults],
42}
43
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000044android_library {
45 name: "CtsNetHttpTestsLib",
Chidera Olibie4fad0c32022-11-23 18:53:54 +000046 sdk_version: "test_current",
Chidera Olibied66799a2023-01-24 20:22:56 +000047 min_sdk_version: "30",
Chidera Olibiebe5cf702022-12-14 19:42:34 +000048 srcs: [
49 "src/**/*.java",
50 "src/**/*.kt",
51 ],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090052 static_libs: [
Chidera Olibie0a5befb2023-02-14 14:53:37 +000053 "androidx.test.ext.junit",
Chidera Olibie4fad0c32022-11-23 18:53:54 +000054 "ctstestrunner-axt",
Chidera Olibiebe5cf702022-12-14 19:42:34 +000055 "ctstestserver",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090056 "junit",
Stefano Duo7351f472023-01-16 15:56:58 +000057 "hamcrest-library",
Chidera Olibie0a5befb2023-02-14 14:53:37 +000058 "kotlin-test",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090059 ],
60 libs: [
Motomu Utsumiceb2a752022-10-04 18:38:04 +090061 "android.test.base",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090062 "androidx.annotation_annotation",
Patrick Rohr04a633a2023-01-17 23:36:16 -080063 "framework-tethering",
Chidera Olibiebe5cf702022-12-14 19:42:34 +000064 "org.apache.http.legacy",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090065 ],
Chidera Olibied66799a2023-01-24 20:22:56 +000066 lint: { test: true }
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000067}
Motomu Utsumiceb2a752022-10-04 18:38:04 +090068
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000069android_test {
70 name: "CtsNetHttpTestCases",
71 defaults: [
72 "cts_defaults",
73 "CronetTestJavaDefaults",
74 ],
75 sdk_version: "test_current",
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000076 static_libs: ["CtsNetHttpTestsLib"],
Chidera Olibie4fad0c32022-11-23 18:53:54 +000077 // Tag this as a cts test artifact
78 test_suites: [
79 "cts",
80 "general-tests",
81 "mts-tethering"
Motomu Utsumiceb2a752022-10-04 18:38:04 +090082 ],
83}