blob: 9f92dba28eda440b832112f433b7e23ed64a2876 [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 Olibiebe5cf702022-12-14 19:42:34 +000047 srcs: [
48 "src/**/*.java",
49 "src/**/*.kt",
50 ],
Motomu Utsumiceb2a752022-10-04 18:38:04 +090051 static_libs: [
Chidera Olibie0a5befb2023-02-14 14:53:37 +000052 "androidx.test.ext.junit",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090053 "androidx.test.rules",
54 "androidx.core_core",
Chidera Olibie4fad0c32022-11-23 18:53:54 +000055 "ctstestrunner-axt",
Chidera Olibiebe5cf702022-12-14 19:42:34 +000056 "ctstestserver",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090057 "junit",
Stefano Duo7351f472023-01-16 15:56:58 +000058 "hamcrest-library",
Chidera Olibie0a5befb2023-02-14 14:53:37 +000059 "kotlin-test",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090060 ],
61 libs: [
62 "android.test.runner",
63 "android.test.base",
64 "android.test.mock",
65 "androidx.annotation_annotation",
Patrick Rohr04a633a2023-01-17 23:36:16 -080066 "framework-tethering",
Chidera Olibiebe5cf702022-12-14 19:42:34 +000067 "org.apache.http.legacy",
Motomu Utsumiceb2a752022-10-04 18:38:04 +090068 ],
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000069}
Motomu Utsumiceb2a752022-10-04 18:38:04 +090070
Chidera Olibiee3e2e7f2023-02-08 19:12:10 +000071android_test {
72 name: "CtsNetHttpTestCases",
73 defaults: [
74 "cts_defaults",
75 "CronetTestJavaDefaults",
76 ],
77 sdk_version: "test_current",
78 compile_multilib: "both", // Include both the 32 and 64 bit versions
79 static_libs: ["CtsNetHttpTestsLib"],
Chidera Olibie4fad0c32022-11-23 18:53:54 +000080 // Tag this as a cts test artifact
81 test_suites: [
82 "cts",
83 "general-tests",
84 "mts-tethering"
Motomu Utsumiceb2a752022-10-04 18:38:04 +090085 ],
86}