Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 1 | // 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 | |
| 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
Chidera Olibie | 5b95954 | 2023-03-21 15:43:41 +0000 | [diff] [blame] | 20 | java_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 Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 37 | android_library { |
| 38 | name: "NetHttpTestsLibPreJarJar", |
Mohannad Farrag | 9c6801f | 2023-03-23 12:45:45 +0000 | [diff] [blame] | 39 | srcs: [":cronet_aml_javatests_sources"], |
Chidera Olibie | 5b95954 | 2023-03-21 15:43:41 +0000 | [diff] [blame] | 40 | sdk_version: "module_current", |
Chidera Olibie | d66799a | 2023-01-24 20:22:56 +0000 | [diff] [blame] | 41 | min_sdk_version: "30", |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 42 | static_libs: [ |
Mohannad Farrag | 9c6801f | 2023-03-23 12:45:45 +0000 | [diff] [blame] | 43 | "cronet_testserver_utils", |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 44 | "androidx.test.ext.junit", |
| 45 | "androidx.test.rules", |
| 46 | "junit", |
| 47 | ], |
| 48 | libs: [ |
| 49 | "android.test.base", |
Chidera Olibie | 5f44ed3 | 2023-03-23 03:51:00 +0000 | [diff] [blame] | 50 | // Needed for direct access to tethering's hidden apis and to avoid `symbol not found` |
Chidera Olibie | ea825f5 | 2023-03-28 15:39:15 +0000 | [diff] [blame] | 51 | // errors on some builds. |
Chidera Olibie | 5f44ed3 | 2023-03-23 03:51:00 +0000 | [diff] [blame] | 52 | "framework-tethering.impl", |
Chidera Olibie | ea825f5 | 2023-03-28 15:39:15 +0000 | [diff] [blame] | 53 | // android.net.Network apis |
| 54 | "framework-connectivity", |
Chidera Olibie | f6498e7 | 2023-03-29 22:47:51 +0000 | [diff] [blame] | 55 | // android.net.TrafficStats apis |
| 56 | "framework-connectivity-t", |
Chidera Olibie | d66799a | 2023-01-24 20:22:56 +0000 | [diff] [blame] | 57 | ], |
| 58 | lint: { test: true } |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | android_test { |
| 62 | name: "NetHttpTests", |
| 63 | defaults: [ |
| 64 | "CronetTestJavaDefaults", |
| 65 | "mts-target-sdk-version-current", |
| 66 | ], |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 67 | static_libs: ["NetHttpTestsLibPreJarJar"], |
Chidera Olibie | 5b95954 | 2023-03-21 15:43:41 +0000 | [diff] [blame] | 68 | jarjar_rules: ":net-http-test-jarjar-rules", |
Chidera Olibie | 4a755a7 | 2023-03-20 18:08:14 +0000 | [diff] [blame] | 69 | jni_libs: [ |
Mohannad Farrag | 9c6801f | 2023-03-23 12:45:45 +0000 | [diff] [blame] | 70 | "cronet_aml_components_cronet_android_cronet_tests__testing" |
Chidera Olibie | 4a755a7 | 2023-03-20 18:08:14 +0000 | [diff] [blame] | 71 | ], |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 72 | test_suites: [ |
| 73 | "general-tests", |
| 74 | "mts-tethering", |
| 75 | ], |
| 76 | } |
| 77 | |