Chidera Olibie | e3e2e7f | 2023-02-08 19:12:10 +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 | |
| 16 | // Tests in this folder are included both in unit tests and CTS. |
| 17 | // They must be fast and stable, and exercise public or test APIs. |
| 18 | |
| 19 | package { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 20 | default_team: "trendy_team_fwk_core_networking", |
Chidera Olibie | e3e2e7f | 2023-02-08 19:12:10 +0000 | [diff] [blame] | 21 | // See: http://go/android-license-faq |
| 22 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 23 | } |
| 24 | |
| 25 | // TODO: Consider merging with ConnectivityCoverageTests which is a collection of all |
| 26 | // Connectivity tests being used for coverage. This will depend on how far we decide to |
| 27 | // go with merging NetHttp and Tethering targets. |
Chidera Olibie | a791b70 | 2024-04-09 09:27:08 +0000 | [diff] [blame] | 28 | // Target used for coverage. Combines CTS tests and our MTS tests. |
Chidera Olibie | e3e2e7f | 2023-02-08 19:12:10 +0000 | [diff] [blame] | 29 | android_test { |
| 30 | name: "NetHttpCoverageTests", |
Chidera Olibie | d66799a | 2023-01-24 20:22:56 +0000 | [diff] [blame] | 31 | enforce_default_target_sdk_version: true, |
Chidera Olibie | d66799a | 2023-01-24 20:22:56 +0000 | [diff] [blame] | 32 | min_sdk_version: "30", |
Mohannad Farrag | 2ba5c62 | 2024-01-11 14:38:15 +0000 | [diff] [blame] | 33 | test_suites: [ |
| 34 | "general-tests", |
| 35 | "mts-tethering", |
| 36 | ], |
Chidera Olibie | e3e2e7f | 2023-02-08 19:12:10 +0000 | [diff] [blame] | 37 | static_libs: [ |
| 38 | "modules-utils-native-coverage-listener", |
| 39 | "CtsNetHttpTestsLib", |
| 40 | "NetHttpTestsLibPreJarJar", |
| 41 | ], |
Chidera Olibie | 5b95954 | 2023-03-21 15:43:41 +0000 | [diff] [blame] | 42 | jarjar_rules: ":net-http-test-jarjar-rules", |
Chidera Olibie | b3cad55 | 2023-02-13 13:02:29 +0000 | [diff] [blame] | 43 | compile_multilib: "both", // Include both the 32 and 64 bit versions |
Chidera Olibie | 4a755a7 | 2023-03-20 18:08:14 +0000 | [diff] [blame] | 44 | jni_libs: [ |
Mohannad Farrag | 2ba5c62 | 2024-01-11 14:38:15 +0000 | [diff] [blame] | 45 | "cronet_aml_components_cronet_android_cronet_tests__testing", |
| 46 | "cronet_aml_third_party_netty_tcnative_netty_tcnative_so__testing", |
Mohannad Farrag | 58d83d4 | 2024-03-15 13:02:29 +0000 | [diff] [blame] | 47 | "libnativecoverage", |
Chidera Olibie | 4a755a7 | 2023-03-20 18:08:14 +0000 | [diff] [blame] | 48 | ], |
Mohannad Farrag | 2ba5c62 | 2024-01-11 14:38:15 +0000 | [diff] [blame] | 49 | data: [":cronet_javatests_resources"], |
Chidera Olibie | e3e2e7f | 2023-02-08 19:12:10 +0000 | [diff] [blame] | 50 | } |
Chidera Olibie | a791b70 | 2024-04-09 09:27:08 +0000 | [diff] [blame] | 51 | |
| 52 | // MTS-only specific targets. |
| 53 | java_genrule { |
| 54 | name: "net-http-test-jarjar-rules", |
| 55 | tool_files: [ |
| 56 | ":NetHttpTestsLibPreJarJar{.jar}", |
| 57 | "jarjar_excludes.txt", |
| 58 | ], |
| 59 | tools: [ |
| 60 | "jarjar-rules-generator", |
| 61 | ], |
| 62 | out: ["net_http_test_jarjar_rules.txt"], |
| 63 | cmd: "$(location jarjar-rules-generator) " + |
| 64 | "$(location :NetHttpTestsLibPreJarJar{.jar}) " + |
| 65 | "--prefix android.net.connectivity " + |
| 66 | "--excludes $(location jarjar_excludes.txt) " + |
| 67 | "--output $(out)", |
| 68 | } |
| 69 | |
| 70 | android_library { |
| 71 | name: "NetHttpTestsLibPreJarJar", |
| 72 | static_libs: [ |
| 73 | "cronet_aml_api_java", |
| 74 | "cronet_aml_java__testing", |
| 75 | "cronet_java_tests", |
| 76 | ], |
| 77 | sdk_version: "module_current", |
| 78 | min_sdk_version: "30", |
| 79 | } |