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. |
| 18 | java_library { |
| 19 | name: "TetheringCommonTests", |
| 20 | srcs: [ |
| 21 | "common/**/*.java", |
| 22 | "common/**/*.kt" |
| 23 | ], |
| 24 | static_libs: [ |
| 25 | "androidx.test.rules", |
| 26 | "net-tests-utils", |
| 27 | ], |
| 28 | // TODO(b/147200698) change sdk_version to module-current and remove framework-minus-apex |
| 29 | sdk_version: "core_platform", |
| 30 | libs: [ |
| 31 | "framework-minus-apex", |
Paul Duffin | cbac8e0 | 2020-05-13 12:28:49 +0100 | [diff] [blame] | 32 | "framework-tethering.impl", |
Paul Hu | 1cae88f | 2020-04-22 14:01:56 +0000 | [diff] [blame] | 33 | ], |
Baligh Uddin | 661ae39 | 2020-11-04 05:34:06 +0000 | [diff] [blame] | 34 | visibility: [ |
| 35 | "//cts/tests/tests/tethering", |
| 36 | "//packages/modules/Connectivity/tests/cts/tethering", |
| 37 | ], |
Paul Hu | 1cae88f | 2020-04-22 14:01:56 +0000 | [diff] [blame] | 38 | } |
| 39 | |
paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 40 | java_defaults { |
| 41 | name: "TetheringTestsDefaults", |
markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 42 | srcs: [ |
markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 43 | "src/**/*.java", |
Remi NGUYEN VAN | 5c14666 | 2020-01-24 22:57:09 +0900 | [diff] [blame] | 44 | "src/**/*.kt", |
markchien | dd6177b | 2019-09-23 20:29:54 +0800 | [diff] [blame] | 45 | ], |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 46 | static_libs: [ |
paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 47 | "TetheringApiCurrentLib", |
Paul Hu | 1cae88f | 2020-04-22 14:01:56 +0000 | [diff] [blame] | 48 | "TetheringCommonTests", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 49 | "androidx.test.rules", |
| 50 | "frameworks-base-testutils", |
| 51 | "mockito-target-extended-minus-junit4", |
paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 52 | "net-tests-utils", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 53 | "testables", |
| 54 | ], |
markchien | 44fc26d | 2020-02-06 19:23:26 +0800 | [diff] [blame] | 55 | // TODO(b/147200698) change sdk_version to module-current and |
| 56 | // remove framework-minus-apex, ext, and framework-res |
| 57 | sdk_version: "core_platform", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 58 | libs: [ |
| 59 | "android.test.runner", |
| 60 | "android.test.base", |
| 61 | "android.test.mock", |
paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 62 | "ext", |
| 63 | "framework-minus-apex", |
| 64 | "framework-res", |
Paul Duffin | cbac8e0 | 2020-05-13 12:28:49 +0100 | [diff] [blame] | 65 | "framework-tethering.impl", |
Paul Duffin | 6812c1b | 2020-05-31 11:35:50 +0100 | [diff] [blame] | 66 | "framework-wifi.stubs.module_lib", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 67 | ], |
| 68 | jni_libs: [ |
| 69 | // For mockito extended |
| 70 | "libdexmakerjvmtiagent", |
| 71 | "libstaticjvmtiagent", |
Lorenzo Colitti | 4e92da0 | 2021-02-06 00:06:05 +0900 | [diff] [blame^] | 72 | "libtetherutilsjni", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame] | 73 | ], |
| 74 | } |
paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 75 | |
| 76 | // Library containing the unit tests. This is used by the coverage test target to pull in the |
| 77 | // unit test code. It is not currently used by the tests themselves because all the build |
| 78 | // configuration needed by the tests is in the TetheringTestsDefaults rule. |
| 79 | android_library { |
| 80 | name: "TetheringTestsLib", |
| 81 | defaults: ["TetheringTestsDefaults"], |
| 82 | visibility: [ |
| 83 | "//frameworks/base/packages/Tethering/tests/integration", |
Baligh Uddin | f814b9b | 2020-10-29 02:11:55 +0000 | [diff] [blame] | 84 | "//packages/modules/Connectivity/Tethering/tests/integration", |
paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 85 | ] |
| 86 | } |
| 87 | |
| 88 | android_test { |
| 89 | name: "TetheringTests", |
Treehugger Robot | 369fd25 | 2020-05-27 04:17:44 +0000 | [diff] [blame] | 90 | platform_apis: true, |
paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 91 | test_suites: [ |
| 92 | "device-tests", |
| 93 | "mts", |
| 94 | ], |
markchien | e312648 | 2020-10-26 13:53:05 +0800 | [diff] [blame] | 95 | jarjar_rules: ":TetheringTestsJarJarRules", |
paulhu | d1ebb1e | 2020-04-06 14:58:12 +0800 | [diff] [blame] | 96 | defaults: ["TetheringTestsDefaults"], |
| 97 | compile_multilib: "both", |
| 98 | } |