1// Copyright (C) 2019 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package {
16    default_team: "trendy_team_fwk_core_networking",
17    default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
20java_defaults {
21    name: "CtsTetheringTestDefaults",
22    defaults: ["cts_defaults"],
23
24    libs: [
25        "android.test.base",
26    ],
27
28    srcs: [
29        "src/**/*.java",
30    ],
31
32    static_libs: [
33        "TetheringCommonTests",
34        "compatibility-device-util-axt",
35        "cts-net-utils",
36        "net-tests-utils",
37        "ctstestrunner-axt",
38        "junit",
39        "junit-params",
40    ],
41
42    jni_libs: [
43        // For mockito extended
44        "libdexmakerjvmtiagent",
45        "libstaticjvmtiagent",
46    ],
47
48    // Change to system current when TetheringManager move to bootclass path.
49    platform_apis: true,
50    min_sdk_version: "30",
51    host_required: ["net-tests-utils-host-common"],
52}
53
54// Tethering CTS tests that target the latest released SDK. These tests can be installed on release
55// devices which has equal or lowner sdk version than target sdk and are useful for qualifying
56// mainline modules on release devices.
57android_test {
58    name: "CtsTetheringTestLatestSdk",
59    defaults: [
60        "ConnectivityTestsLatestSdkDefaults",
61        "CtsTetheringTestDefaults",
62    ],
63
64    min_sdk_version: "30",
65
66    static_libs: [
67        "TetheringIntegrationTestsLatestSdkLib",
68    ],
69
70    test_suites: [
71        "general-tests",
72        "mts-tethering",
73    ],
74
75    test_config_template: "AndroidTestTemplate.xml",
76
77    // Include both the 32 and 64 bit versions
78    compile_multilib: "both",
79    jarjar_rules: ":NetworkStackJarJarRules",
80}
81
82// Tethering CTS tests for development and release. These tests always target the platform SDK
83// version, and are subject to all the restrictions appropriate to that version. Before SDK
84// finalization, these tests have a min_sdk_version of 10000, but they can still be installed on
85// release devices as their min_sdk_version is set to a production version.
86android_test {
87    name: "CtsTetheringTest",
88    defaults: ["CtsTetheringTestDefaults"],
89
90    static_libs: [
91        "TetheringIntegrationTestsLib",
92    ],
93
94    // Tag this module as a cts test artifact
95    test_suites: [
96        "cts",
97        "mts-dnsresolver",
98        "mts-networking",
99        "mts-tethering",
100        "mts-wifi",
101        "mcts-dnsresolver",
102        "mcts-networking",
103        "mcts-tethering",
104        "mcts-wifi",
105        "general-tests",
106    ],
107
108    test_config_template: "AndroidTestTemplate.xml",
109
110    // Include both the 32 and 64 bit versions
111    compile_multilib: "both",
112    jarjar_rules: ":NetworkStackJarJarRules",
113}
114