| markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 1 | // | 
|  | 2 | // Copyright (C) 2019 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 | // | 
|  | 16 |  | 
| Paul Hu | 1cae88f | 2020-04-22 14:01:56 +0000 | [diff] [blame] | 17 | // Tests in this folder are included both in unit tests and CTS. | 
| Bob Badour | 97e6be2 | 2021-02-12 14:45:04 -0800 | [diff] [blame] | 18 | package { | 
|  | 19 | default_applicable_licenses: ["Android-Apache-2.0"], | 
|  | 20 | } | 
|  | 21 |  | 
| Paul Hu | 1cae88f | 2020-04-22 14:01:56 +0000 | [diff] [blame] | 22 | java_library { | 
|  | 23 | name: "TetheringCommonTests", | 
|  | 24 | srcs: [ | 
|  | 25 | "common/**/*.java", | 
|  | 26 | "common/**/*.kt" | 
|  | 27 | ], | 
|  | 28 | static_libs: [ | 
|  | 29 | "androidx.test.rules", | 
|  | 30 | "net-tests-utils", | 
|  | 31 | ], | 
|  | 32 | // TODO(b/147200698) change sdk_version to module-current and remove framework-minus-apex | 
|  | 33 | sdk_version: "core_platform", | 
|  | 34 | libs: [ | 
|  | 35 | "framework-minus-apex", | 
| Remi NGUYEN VAN | eeeed13 | 2021-03-30 08:12:27 +0000 | [diff] [blame] | 36 | "framework-connectivity.impl", | 
| paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 37 | "framework-connectivity-t.impl", | 
| Paul Duffin | cbac8e0 | 2020-05-13 12:28:49 +0100 | [diff] [blame] | 38 | "framework-tethering.impl", | 
| Paul Hu | 1cae88f | 2020-04-22 14:01:56 +0000 | [diff] [blame] | 39 | ], | 
| Baligh Uddin | 661ae39 | 2020-11-04 05:34:06 +0000 | [diff] [blame] | 40 | visibility: [ | 
| Baligh Uddin | 661ae39 | 2020-11-04 05:34:06 +0000 | [diff] [blame] | 41 | "//packages/modules/Connectivity/tests/cts/tethering", | 
|  | 42 | ], | 
| Paul Hu | 1cae88f | 2020-04-22 14:01:56 +0000 | [diff] [blame] | 43 | } | 
|  | 44 |  | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 45 | java_defaults { | 
|  | 46 | name: "TetheringTestsDefaults", | 
| markchien | 7193a1b | 2021-04-27 01:50:31 +0800 | [diff] [blame] | 47 | min_sdk_version: "30", | 
| markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 48 | srcs: [ | 
| markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 49 | "src/**/*.java", | 
| Remi NGUYEN VAN | 5c14666 | 2020-01-24 22:57:09 +0900 | [diff] [blame] | 50 | "src/**/*.kt", | 
| markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 51 | ], | 
| markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 52 | static_libs: [ | 
| Paul Hu | 1cae88f | 2020-04-22 14:01:56 +0000 | [diff] [blame] | 53 | "TetheringCommonTests", | 
| markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 54 | "androidx.test.rules", | 
|  | 55 | "frameworks-base-testutils", | 
|  | 56 | "mockito-target-extended-minus-junit4", | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 57 | "net-tests-utils", | 
| markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 58 | "testables", | 
|  | 59 | ], | 
| markchien | 44fc26d | 2020-02-06 19:23:26 +0800 | [diff] [blame] | 60 | // TODO(b/147200698) change sdk_version to module-current and | 
|  | 61 | // remove framework-minus-apex, ext, and framework-res | 
|  | 62 | sdk_version: "core_platform", | 
| markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 63 | libs: [ | 
|  | 64 | "android.test.runner", | 
|  | 65 | "android.test.base", | 
|  | 66 | "android.test.mock", | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 67 | "ext", | 
|  | 68 | "framework-minus-apex", | 
|  | 69 | "framework-res", | 
| Roopa Sattiraju | b09e60c | 2022-02-09 14:33:04 -0800 | [diff] [blame] | 70 | "framework-bluetooth.stubs.module_lib", | 
| Hassan Ali | bc4e514 | 2022-12-08 12:56:05 +0000 | [diff] [blame] | 71 | "framework-configinfrastructure.stubs.module_lib", | 
| Remi NGUYEN VAN | 34d197b | 2021-03-19 13:11:06 +0000 | [diff] [blame] | 72 | "framework-connectivity.impl", | 
| paulhu | 699477a | 2022-02-08 21:25:28 +0800 | [diff] [blame] | 73 | "framework-connectivity-t.impl", | 
| Paul Duffin | cbac8e0 | 2020-05-13 12:28:49 +0100 | [diff] [blame] | 74 | "framework-tethering.impl", | 
| Paul Duffin | 6812c1b | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 75 | "framework-wifi.stubs.module_lib", | 
| markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 76 | ], | 
|  | 77 | jni_libs: [ | 
|  | 78 | // For mockito extended | 
|  | 79 | "libdexmakerjvmtiagent", | 
|  | 80 | "libstaticjvmtiagent", | 
| markchien | f967b11 | 2021-11-09 16:56:23 +0800 | [diff] [blame] | 81 | "libcom_android_networkstack_tethering_util_jni", | 
| markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 82 | ], | 
|  | 83 | } | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 84 |  | 
|  | 85 | // Library containing the unit tests. This is used by the coverage test target to pull in the | 
|  | 86 | // unit test code. It is not currently used by the tests themselves because all the build | 
|  | 87 | // configuration needed by the tests is in the TetheringTestsDefaults rule. | 
|  | 88 | android_library { | 
| markchien | 7193a1b | 2021-04-27 01:50:31 +0800 | [diff] [blame] | 89 | name: "TetheringTestsLatestSdkLib", | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 90 | defaults: ["TetheringTestsDefaults"], | 
| markchien | 598a75b | 2021-11-22 10:36:32 +0800 | [diff] [blame] | 91 | static_libs: [ | 
|  | 92 | "TetheringApiStableLib", | 
|  | 93 | ], | 
| Mark Chien | d25a1e0 | 2022-05-19 01:01:26 +0800 | [diff] [blame] | 94 | target_sdk_version: "33", | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 95 | visibility: [ | 
| Remi NGUYEN VAN | fe20e13 | 2021-06-07 13:10:49 +0900 | [diff] [blame] | 96 | "//packages/modules/Connectivity/tests:__subpackages__", | 
|  | 97 | "//packages/modules/Connectivity/Tethering/tests:__subpackages__", | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 98 | ] | 
|  | 99 | } | 
|  | 100 |  | 
|  | 101 | android_test { | 
|  | 102 | name: "TetheringTests", | 
| Treehugger Robot | 369fd25 | 2020-05-27 04:17:44 +0000 | [diff] [blame] | 103 | platform_apis: true, | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 104 | test_suites: [ | 
|  | 105 | "device-tests", | 
| Kimberly Kreider | c5b3f34 | 2021-10-20 18:16:59 +0000 | [diff] [blame] | 106 | "mts-tethering", | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 107 | ], | 
| markchien | 598a75b | 2021-11-22 10:36:32 +0800 | [diff] [blame] | 108 | defaults: [ | 
|  | 109 | "TetheringTestsDefaults", | 
|  | 110 | "ConnectivityNextEnableDefaults", | 
|  | 111 | ], | 
|  | 112 | static_libs: [ | 
|  | 113 | "TetheringApiCurrentLib", | 
|  | 114 | ], | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 115 | compile_multilib: "both", | 
| Remi NGUYEN VAN | 8ea5ee6 | 2021-06-28 18:48:43 +0900 | [diff] [blame] | 116 | jarjar_rules: ":TetheringTestsJarJarRules", | 
| paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 117 | } |