blob: 2e8ac53eb2fcab8215a4f628ae665243abb34ce9 [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",
22 tool_files: [
23 ":NetHttpTestsLibPreJarJar{.jar}",
24 "jarjar_excludes.txt",
25 ],
26 tools: [
27 "jarjar-rules-generator",
28 ],
29 out: ["net_http_test_jarjar_rules.txt"],
30 cmd: "$(location jarjar-rules-generator) " +
31 "$(location :NetHttpTestsLibPreJarJar{.jar}) " +
32 "--prefix android.net.http.internal " +
33 "--excludes $(location jarjar_excludes.txt) " +
34 "--output $(out)",
35}
36
Chidera Olibied46c92f2023-02-08 19:01:15 +000037android_library {
38 name: "NetHttpTestsLibPreJarJar",
Mohannad Farrag16ba0622023-03-22 11:37:15 +000039 srcs: [":cronet_aml_javatests_sources"],
Chidera Olibie5b959542023-03-21 15:43:41 +000040 sdk_version: "module_current",
Chidera Olibied66799a2023-01-24 20:22:56 +000041 min_sdk_version: "30",
Chidera Olibied46c92f2023-02-08 19:01:15 +000042 static_libs: [
Chidera Olibie5b959542023-03-21 15:43:41 +000043 "//external/cronet:cronet_testserver_utils",
Chidera Olibied46c92f2023-02-08 19:01:15 +000044 "androidx.test.ext.junit",
45 "androidx.test.rules",
46 "junit",
47 ],
48 libs: [
49 "android.test.base",
50 "framework-tethering-pre-jarjar",
Chidera Olibied66799a2023-01-24 20:22:56 +000051 ],
52 lint: { test: true }
Chidera Olibied46c92f2023-02-08 19:01:15 +000053}
54
55android_test {
56 name: "NetHttpTests",
57 defaults: [
58 "CronetTestJavaDefaults",
59 "mts-target-sdk-version-current",
60 ],
Chidera Olibied46c92f2023-02-08 19:01:15 +000061 static_libs: ["NetHttpTestsLibPreJarJar"],
Chidera Olibie5b959542023-03-21 15:43:41 +000062 jarjar_rules: ":net-http-test-jarjar-rules",
Chidera Olibie4a755a72023-03-20 18:08:14 +000063 jni_libs: [
Mohannad Farrag16ba0622023-03-22 11:37:15 +000064 "cronet_aml_components_cronet_android_cronet_tests__testing"
Chidera Olibie4a755a72023-03-20 18:08:14 +000065 ],
Chidera Olibied46c92f2023-02-08 19:01:15 +000066 test_suites: [
67 "general-tests",
68 "mts-tethering",
69 ],
70}
71