• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17// Tests in this folder are included both in unit tests and CTS.
18java_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",
32        "framework-tethering.impl",
33    ],
34    visibility: ["//cts/tests/tests/tethering"],
35}
36
37java_defaults {
38    name: "TetheringTestsDefaults",
39    srcs: [
40        "src/**/*.java",
41        "src/**/*.kt",
42    ],
43    static_libs: [
44        "TetheringApiCurrentLib",
45        "TetheringCommonTests",
46        "androidx.test.rules",
47        "frameworks-base-testutils",
48        "mockito-target-extended-minus-junit4",
49        "net-tests-utils",
50        "testables",
51    ],
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",
55    libs: [
56        "android.test.runner",
57        "android.test.base",
58        "android.test.mock",
59        "ext",
60        "framework-minus-apex",
61        "framework-res",
62        "framework-tethering.impl",
63        "framework-wifi.stubs.module_lib",
64    ],
65    jni_libs: [
66        // For mockito extended
67        "libdexmakerjvmtiagent",
68        "libstaticjvmtiagent",
69    ],
70    jarjar_rules: "jarjar-rules.txt",
71}
72
73// Library containing the unit tests. This is used by the coverage test target to pull in the
74// unit test code. It is not currently used by the tests themselves because all the build
75// configuration needed by the tests is in the TetheringTestsDefaults rule.
76android_library {
77    name: "TetheringTestsLib",
78    defaults: ["TetheringTestsDefaults"],
79    visibility: [
80        "//frameworks/base/packages/Tethering/tests/integration",
81    ]
82}
83
84android_test {
85    name: "TetheringTests",
86    platform_apis: true,
87    test_suites: [
88        "device-tests",
89        "mts",
90    ],
91    defaults: ["TetheringTestsDefaults"],
92    compile_multilib: "both",
93}
94