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