blob: d13f695ddce3752a8ccc5df6f3cdb960d86459cb [file] [log] [blame]
Chidera Olibied46c92f2023-02-08 19:01:15 +00001// Copyright (C) 2023 The Android Open Source Project
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 // See: http://go/android-license-faq
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
Chidera Olibie5b959542023-03-21 15:43:41 +000020java_genrule {
21 name: "net-http-test-jarjar-rules",
Chidera Olibie9c03bf12023-04-14 10:37:06 +000022 defaults: ["CronetTestJavaDefaults"],
Chidera Olibie5b959542023-03-21 15:43:41 +000023 tool_files: [
24 ":NetHttpTestsLibPreJarJar{.jar}",
25 "jarjar_excludes.txt",
26 ],
27 tools: [
28 "jarjar-rules-generator",
29 ],
30 out: ["net_http_test_jarjar_rules.txt"],
31 cmd: "$(location jarjar-rules-generator) " +
32 "$(location :NetHttpTestsLibPreJarJar{.jar}) " +
33 "--prefix android.net.http.internal " +
34 "--excludes $(location jarjar_excludes.txt) " +
35 "--output $(out)",
36}
37
Chidera Olibied46c92f2023-02-08 19:01:15 +000038android_library {
39 name: "NetHttpTestsLibPreJarJar",
Chidera Olibie9c03bf12023-04-14 10:37:06 +000040 defaults: ["CronetTestJavaDefaults"],
Mohannad Farrag9c6801f2023-03-23 12:45:45 +000041 srcs: [":cronet_aml_javatests_sources"],
Chidera Olibie5b959542023-03-21 15:43:41 +000042 sdk_version: "module_current",
Chidera Olibied66799a2023-01-24 20:22:56 +000043 min_sdk_version: "30",
Chidera Olibied46c92f2023-02-08 19:01:15 +000044 static_libs: [
Mohannad Farrag9c6801f2023-03-23 12:45:45 +000045 "cronet_testserver_utils",
Chidera Olibied46c92f2023-02-08 19:01:15 +000046 "androidx.test.ext.junit",
47 "androidx.test.rules",
48 "junit",
49 ],
50 libs: [
51 "android.test.base",
Chidera Olibieef007412023-04-13 09:37:30 +000052 "framework-tethering-pre-jarjar",
Chidera Olibieea825f52023-03-28 15:39:15 +000053 // android.net.Network apis
54 "framework-connectivity",
Chidera Olibief6498e72023-03-29 22:47:51 +000055 // android.net.TrafficStats apis
56 "framework-connectivity-t",
Chidera Olibied66799a2023-01-24 20:22:56 +000057 ],
58 lint: { test: true }
Chidera Olibied46c92f2023-02-08 19:01:15 +000059}
60
61android_test {
62 name: "NetHttpTests",
63 defaults: [
64 "CronetTestJavaDefaults",
65 "mts-target-sdk-version-current",
66 ],
Chidera Olibied46c92f2023-02-08 19:01:15 +000067 static_libs: ["NetHttpTestsLibPreJarJar"],
Chidera Olibie5b959542023-03-21 15:43:41 +000068 jarjar_rules: ":net-http-test-jarjar-rules",
Chidera Olibie4a755a72023-03-20 18:08:14 +000069 jni_libs: [
Mohannad Farrag9c6801f2023-03-23 12:45:45 +000070 "cronet_aml_components_cronet_android_cronet_tests__testing"
Chidera Olibie4a755a72023-03-20 18:08:14 +000071 ],
Chidera Olibied46c92f2023-02-08 19:01:15 +000072 test_suites: [
73 "general-tests",
74 "mts-tethering",
75 ],
76}
77