Lorenzo Colitti | 4896e32 | 2020-03-17 01:07:47 +0900 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2020 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
Bob Badour | 97e6be2 | 2021-02-12 14:45:04 -0800 | [diff] [blame] | 16 | package { |
| 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 20 | java_defaults { |
| 21 | name: "TetheringIntegrationTestsDefaults", |
Lorenzo Colitti | 4896e32 | 2020-03-17 01:07:47 +0900 | [diff] [blame] | 22 | srcs: [ |
| 23 | "src/**/*.java", |
| 24 | "src/**/*.kt", |
| 25 | ], |
markchien | 7193a1b | 2021-04-27 01:50:31 +0800 | [diff] [blame] | 26 | min_sdk_version: "30", |
Lorenzo Colitti | 4896e32 | 2020-03-17 01:07:47 +0900 | [diff] [blame] | 27 | static_libs: [ |
| 28 | "NetworkStackApiStableLib", |
| 29 | "androidx.test.rules", |
Lorenzo Colitti | 4896e32 | 2020-03-17 01:07:47 +0900 | [diff] [blame] | 30 | "mockito-target-extended-minus-junit4", |
| 31 | "net-tests-utils", |
| 32 | "testables", |
| 33 | ], |
| 34 | libs: [ |
| 35 | "android.test.runner", |
| 36 | "android.test.base", |
| 37 | "android.test.mock", |
| 38 | ], |
paulhu | d584d2f | 2020-04-08 09:57:57 +0800 | [diff] [blame] | 39 | jni_libs: [ |
| 40 | // For mockito extended |
| 41 | "libdexmakerjvmtiagent", |
| 42 | "libstaticjvmtiagent", |
| 43 | ], |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 44 | jarjar_rules: ":NetworkStackJarJarRules", |
Lorenzo Colitti | 4896e32 | 2020-03-17 01:07:47 +0900 | [diff] [blame] | 45 | } |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 46 | |
| 47 | android_library { |
markchien | 7193a1b | 2021-04-27 01:50:31 +0800 | [diff] [blame] | 48 | name: "TetheringIntegrationTestsLatestSdkLib", |
| 49 | target_sdk_version: "30", |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 50 | platform_apis: true, |
| 51 | defaults: ["TetheringIntegrationTestsDefaults"], |
Baligh Uddin | 661ae39 | 2020-11-04 05:34:06 +0000 | [diff] [blame] | 52 | visibility: [ |
Baligh Uddin | 661ae39 | 2020-11-04 05:34:06 +0000 | [diff] [blame] | 53 | "//packages/modules/Connectivity/tests/cts/tethering", |
Remi NGUYEN VAN | fe20e13 | 2021-06-07 13:10:49 +0900 | [diff] [blame] | 54 | "//packages/modules/Connectivity/tests:__subpackages__", |
| 55 | "//packages/modules/Connectivity/Tethering/tests:__subpackages__", |
markchien | 7193a1b | 2021-04-27 01:50:31 +0800 | [diff] [blame] | 56 | ] |
| 57 | } |
| 58 | |
| 59 | android_library { |
| 60 | name: "TetheringIntegrationTestsLib", |
| 61 | target_sdk_version: "current", |
| 62 | platform_apis: true, |
| 63 | defaults: ["TetheringIntegrationTestsDefaults"], |
| 64 | visibility: [ |
| 65 | "//packages/modules/Connectivity/tests/cts/tethering", |
| 66 | "//packages/modules/Connectivity/Tethering/tests/mts", |
Baligh Uddin | 661ae39 | 2020-11-04 05:34:06 +0000 | [diff] [blame] | 67 | ] |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | android_test { |
| 71 | name: "TetheringIntegrationTests", |
| 72 | platform_apis: true, |
| 73 | defaults: ["TetheringIntegrationTestsDefaults"], |
| 74 | test_suites: [ |
| 75 | "device-tests", |
| 76 | "mts", |
| 77 | ], |
| 78 | compile_multilib: "both", |
| 79 | } |
| 80 | |
Remi NGUYEN VAN | 8ea5ee6 | 2021-06-28 18:48:43 +0900 | [diff] [blame] | 81 | android_library { |
| 82 | name: "TetheringCoverageTestsLib", |
| 83 | min_sdk_version: "30", |
| 84 | static_libs: [ |
| 85 | "NetdStaticLibTestsLib", |
| 86 | "NetworkStaticLibTestsLib", |
| 87 | "NetworkStackTestsLib", |
| 88 | "TetheringTestsLatestSdkLib", |
| 89 | "TetheringIntegrationTestsLatestSdkLib", |
| 90 | ], |
| 91 | jarjar_rules: ":TetheringTestsJarJarRules", |
| 92 | manifest: "AndroidManifest_coverage.xml", |
| 93 | visibility: [ |
| 94 | "//packages/modules/Connectivity/tests:__subpackages__" |
| 95 | ], |
| 96 | } |
| 97 | |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 98 | // Special version of the tethering tests that includes all tests necessary for code coverage |
| 99 | // purposes. This is currently the union of TetheringTests, TetheringIntegrationTests and |
| 100 | // NetworkStackTests. |
Remi NGUYEN VAN | 8ea5ee6 | 2021-06-28 18:48:43 +0900 | [diff] [blame] | 101 | // TODO: remove in favor of ConnectivityCoverageTests, which includes below tests and more |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 102 | android_test { |
| 103 | name: "TetheringCoverageTests", |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 104 | platform_apis: true, |
markchien | 7193a1b | 2021-04-27 01:50:31 +0800 | [diff] [blame] | 105 | min_sdk_version: "30", |
| 106 | target_sdk_version: "30", |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 107 | test_suites: ["device-tests", "mts"], |
| 108 | test_config: "AndroidTest_Coverage.xml", |
| 109 | defaults: ["libnetworkstackutilsjni_deps"], |
| 110 | static_libs: [ |
markchien | b23e912 | 2021-04-27 17:23:44 +0800 | [diff] [blame] | 111 | "modules-utils-native-coverage-listener", |
Remi NGUYEN VAN | 8ea5ee6 | 2021-06-28 18:48:43 +0900 | [diff] [blame] | 112 | "TetheringCoverageTestsLib", |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 113 | ], |
| 114 | jni_libs: [ |
| 115 | // For mockito extended |
| 116 | "libdexmakerjvmtiagent", |
| 117 | "libstaticjvmtiagent", |
| 118 | // For NetworkStackUtils included in NetworkStackBase |
| 119 | "libnetworkstackutilsjni", |
Maciej Żenczykowski | c92e8ce | 2021-02-11 15:54:05 -0800 | [diff] [blame] | 120 | "libtetherutilsjni", |
paulhu | 6463265 | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 121 | ], |
| 122 | compile_multilib: "both", |
| 123 | manifest: "AndroidManifest_coverage.xml", |
markchien | e312648 | 2020-10-26 13:53:05 +0800 | [diff] [blame] | 124 | } |