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}) " + |
Motomu Utsumi | 73e2e87 | 2023-04-14 19:22:42 +0900 | [diff] [blame] | 32 | "--prefix android.net.connectivity " + |
Chidera Olibie | 5b95954 | 2023-03-21 15:43:41 +0000 | [diff] [blame] | 33 | "--excludes $(location jarjar_excludes.txt) " + |
| 34 | "--output $(out)", |
| 35 | } |
| 36 | |
Patrick Rohr | cc2e2dc | 2023-05-03 19:12:23 -0700 | [diff] [blame] | 37 | // Library to be used in coverage tests. cronet_java_tests can't be used directly because the common |
| 38 | // tests need to inherit the NetHttpTests manifest. |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 39 | android_library { |
| 40 | name: "NetHttpTestsLibPreJarJar", |
Stefano Duo | afd0394 | 2023-07-17 14:52:16 +0000 | [diff] [blame^] | 41 | static_libs: [ |
| 42 | "cronet_aml_api_java", |
| 43 | "cronet_aml_java__testing", |
| 44 | "cronet_java_tests", |
| 45 | ], |
Chidera Olibie | 5b95954 | 2023-03-21 15:43:41 +0000 | [diff] [blame] | 46 | sdk_version: "module_current", |
Chidera Olibie | d66799a | 2023-01-24 20:22:56 +0000 | [diff] [blame] | 47 | min_sdk_version: "30", |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | android_test { |
| 51 | name: "NetHttpTests", |
| 52 | defaults: [ |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 53 | "mts-target-sdk-version-current", |
| 54 | ], |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 55 | static_libs: ["NetHttpTestsLibPreJarJar"], |
Chidera Olibie | 5b95954 | 2023-03-21 15:43:41 +0000 | [diff] [blame] | 56 | jarjar_rules: ":net-http-test-jarjar-rules", |
Chidera Olibie | 4a755a7 | 2023-03-20 18:08:14 +0000 | [diff] [blame] | 57 | jni_libs: [ |
Stefano Duo | afd0394 | 2023-07-17 14:52:16 +0000 | [diff] [blame^] | 58 | "cronet_aml_components_cronet_android_cronet__testing", |
| 59 | "cronet_aml_components_cronet_android_cronet_tests__testing", |
Chidera Olibie | 4a755a7 | 2023-03-20 18:08:14 +0000 | [diff] [blame] | 60 | ], |
Chidera Olibie | d46c92f | 2023-02-08 19:01:15 +0000 | [diff] [blame] | 61 | test_suites: [ |
| 62 | "general-tests", |
| 63 | "mts-tethering", |
| 64 | ], |
| 65 | } |
| 66 | |