Remi NGUYEN VAN | be2a07f | 2021-03-29 17:09:13 +0900 | [diff] [blame] | 1 | // Copyright (C) 2021 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 | |
Bob Badour | 9802148 | 2021-03-30 22:55:10 -0700 | [diff] [blame] | 15 | package { |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 16 | default_team: "trendy_team_fwk_core_networking", |
Bob Badour | 9802148 | 2021-03-30 22:55:10 -0700 | [diff] [blame] | 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
Remi NGUYEN VAN | be2a07f | 2021-03-29 17:09:13 +0900 | [diff] [blame] | 20 | java_library { |
| 21 | name: "net-tests-utils", |
| 22 | srcs: [ |
| 23 | "devicetests/**/*.java", |
| 24 | "devicetests/**/*.kt", |
| 25 | ], |
Remi NGUYEN VAN | 2202e61 | 2021-03-30 07:56:39 +0000 | [diff] [blame] | 26 | defaults: [ |
| 27 | "framework-connectivity-test-defaults", |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 28 | "lib_mockito_extended", |
Remi NGUYEN VAN | 2202e61 | 2021-03-30 07:56:39 +0000 | [diff] [blame] | 29 | ], |
Remi NGUYEN VAN | be2a07f | 2021-03-29 17:09:13 +0900 | [diff] [blame] | 30 | libs: [ |
| 31 | "androidx.annotation_annotation", |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 32 | "net-utils-device-common-bpf", // TestBpfMap extends IBpfMap. |
Remi NGUYEN VAN | be2a07f | 2021-03-29 17:09:13 +0900 | [diff] [blame] | 33 | ], |
| 34 | static_libs: [ |
| 35 | "androidx.test.ext.junit", |
Remi NGUYEN VAN | 43730b3 | 2024-10-09 16:24:44 +0900 | [diff] [blame] | 36 | "collector-device-lib", |
Remi NGUYEN VAN | be2a07f | 2021-03-29 17:09:13 +0900 | [diff] [blame] | 37 | "kotlin-reflect", |
| 38 | "libnanohttpd", |
| 39 | "net-tests-utils-host-device-common", |
| 40 | "net-utils-device-common", |
Igor Chernyshev | 004c5b4 | 2023-01-05 19:25:18 -0800 | [diff] [blame] | 41 | "net-utils-device-common-async", |
Xiao Ma | 57b3442 | 2021-07-01 13:57:02 +0000 | [diff] [blame] | 42 | "net-utils-device-common-netlink", |
Junyu Lai | 626045a | 2023-08-28 18:49:44 +0800 | [diff] [blame] | 43 | "net-utils-device-common-struct", |
Yang Sun | 3aa62e6 | 2024-03-12 21:23:19 +0800 | [diff] [blame] | 44 | "net-utils-device-common-struct-base", |
Igor Chernyshev | 810be2b | 2023-04-06 15:52:26 -0700 | [diff] [blame] | 45 | "net-utils-device-common-wear", |
Chiachang Wang | 40803d4 | 2021-06-21 11:52:44 +0800 | [diff] [blame] | 46 | "modules-utils-build_system", |
Remi NGUYEN VAN | be2a07f | 2021-03-29 17:09:13 +0900 | [diff] [blame] | 47 | ], |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 48 | lint: { |
| 49 | strict_updatability_linting: true, |
| 50 | }, |
Remi NGUYEN VAN | be2a07f | 2021-03-29 17:09:13 +0900 | [diff] [blame] | 51 | } |
| 52 | |
| 53 | java_library { |
Chalard Jean | b6fdf63 | 2021-11-22 19:28:34 +0900 | [diff] [blame] | 54 | // Consider using net-tests-utils instead if writing device code. |
| 55 | // That library has a lot more useful tools into it for users that |
| 56 | // work on Android and includes this lib. |
| 57 | name: "net-tests-utils-host-device-common", |
| 58 | srcs: [ |
| 59 | "hostdevice/**/*.java", |
| 60 | "hostdevice/**/*.kt", |
| 61 | ], |
| 62 | host_supported: true, |
| 63 | visibility: [ |
Motomu Utsumi | c480039 | 2023-09-11 11:48:36 +0900 | [diff] [blame] | 64 | "//packages/modules/Connectivity/staticlibs/tests:__subpackages__", |
| 65 | "//packages/modules/Connectivity/staticlibs/client-libs/tests:__subpackages__", |
Junyu Lai | af464eb | 2023-07-26 14:41:33 +0800 | [diff] [blame] | 66 | "//packages/modules/Connectivity/tests/cts/hostside", |
Chalard Jean | b6fdf63 | 2021-11-22 19:28:34 +0900 | [diff] [blame] | 67 | ], |
Chalard Jean | fee2cab | 2021-11-25 19:54:31 +0900 | [diff] [blame] | 68 | // There are downstream branches using an old version of Kotlin |
| 69 | // that used to reserve the right to make breaking changes to the |
Chalard Jean | b6fdf63 | 2021-11-22 19:28:34 +0900 | [diff] [blame] | 70 | // Result type and disallowed returning an instance of it. |
| 71 | // Later versions allowed this and there was never a change, |
| 72 | // so no matter the version returning Result is always fine, |
| 73 | // but on sc-mainline-prod the compiler rejects it without |
| 74 | // the following flag. |
| 75 | kotlincflags: ["-Xallow-result-return-type"], |
| 76 | libs: [ |
| 77 | "jsr305", |
| 78 | ], |
| 79 | static_libs: [ |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 80 | "kotlin-test", |
Chalard Jean | b6fdf63 | 2021-11-22 19:28:34 +0900 | [diff] [blame] | 81 | ], |
Aditya Choudhary | 01b5ede | 2024-01-31 11:08:57 +0000 | [diff] [blame] | 82 | lint: { |
| 83 | strict_updatability_linting: true, |
| 84 | }, |
Remi NGUYEN VAN | be2a07f | 2021-03-29 17:09:13 +0900 | [diff] [blame] | 85 | } |
Remi NGUYEN VAN | c02dcd7 | 2021-10-04 19:53:32 +0900 | [diff] [blame] | 86 | |
| 87 | java_test_host { |
| 88 | name: "net-tests-utils-host-common", |
| 89 | srcs: [ |
Junyu Lai | 79b771f | 2024-06-27 10:31:19 +0800 | [diff] [blame] | 90 | "host/java/**/*.java", |
| 91 | "host/java/**/*.kt", |
Remi NGUYEN VAN | c02dcd7 | 2021-10-04 19:53:32 +0900 | [diff] [blame] | 92 | ], |
| 93 | libs: ["tradefed"], |
Tongbo Liu | 199357b | 2023-12-19 10:50:05 +0000 | [diff] [blame] | 94 | test_suites: [ |
| 95 | "ats", |
| 96 | "device-tests", |
| 97 | "general-tests", |
| 98 | "cts", |
| 99 | "mts-networking", |
| 100 | "mcts-networking", |
Tongbo Liu | 4752410 | 2024-01-23 09:24:45 +0000 | [diff] [blame] | 101 | "mts-tethering", |
| 102 | "mcts-tethering", |
Tongbo Liu | 65ce1f2 | 2024-04-15 04:47:29 +0000 | [diff] [blame] | 103 | "mcts-wifi", |
| 104 | "mcts-dnsresolver", |
Tongbo Liu | 199357b | 2023-12-19 10:50:05 +0000 | [diff] [blame] | 105 | ], |
Cole Faust | 9ff8f4c | 2024-10-22 16:31:00 -0700 | [diff] [blame^] | 106 | device_common_data: [":ConnectivityTestPreparer"], |
Remi NGUYEN VAN | c02dcd7 | 2021-10-04 19:53:32 +0900 | [diff] [blame] | 107 | } |
Junyu Lai | 79b771f | 2024-06-27 10:31:19 +0800 | [diff] [blame] | 108 | |
| 109 | python_library_host { |
| 110 | name: "net-tests-utils-host-python-common", |
| 111 | srcs: [ |
| 112 | "host/python/*.py", |
| 113 | ], |
| 114 | pkg_path: "net_tests_utils", |
| 115 | } |