blob: 2f0bcc3951e7bcbe304c1febd6748a0134e5333b [file] [log] [blame]
Remi NGUYEN VANbe2a07f2021-03-29 17:09:13 +09001// 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 Badour98021482021-03-30 22:55:10 -070015package {
16 default_applicable_licenses: ["Android-Apache-2.0"],
17}
18
Remi NGUYEN VANbe2a07f2021-03-29 17:09:13 +090019java_library {
20 name: "net-tests-utils",
21 srcs: [
22 "devicetests/**/*.java",
23 "devicetests/**/*.kt",
24 ],
Remi NGUYEN VAN2202e612021-03-30 07:56:39 +000025 defaults: [
26 "framework-connectivity-test-defaults",
27 "lib_mockito_extended"
28 ],
Remi NGUYEN VANbe2a07f2021-03-29 17:09:13 +090029 libs: [
30 "androidx.annotation_annotation",
31 ],
32 static_libs: [
33 "androidx.test.ext.junit",
34 "kotlin-reflect",
35 "libnanohttpd",
36 "net-tests-utils-host-device-common",
37 "net-utils-device-common",
Xiao Ma57b34422021-07-01 13:57:02 +000038 "net-utils-device-common-netlink",
Chiachang Wang40803d42021-06-21 11:52:44 +080039 "modules-utils-build_system",
Remi NGUYEN VANbe2a07f2021-03-29 17:09:13 +090040 ],
Chiachang Wang7068c882021-11-19 15:37:30 +080041 lint: { strict_updatability_linting: true },
Remi NGUYEN VANbe2a07f2021-03-29 17:09:13 +090042}
43
44java_library {
45 // Consider using net-tests-utils instead if writing device code.
46 // That library has a lot more useful tools into it for users that
47 // work on Android and includes this lib.
48 name: "net-tests-utils-host-device-common",
49 srcs: [
50 "hostdevice/**/*.java",
51 "hostdevice/**/*.kt",
52 ],
53 host_supported: true,
54 visibility: [
55 "//frameworks/libs/net/common/tests:__subpackages__",
56 "//frameworks/libs/net/client-libs/tests:__subpackages__",
57 ],
Chalard Jean5872cb82021-09-08 17:56:57 +090058 libs: [
59 "jsr305",
60 ],
Remi NGUYEN VANbe2a07f2021-03-29 17:09:13 +090061 static_libs: [
62 "kotlin-test"
Chiachang Wang7068c882021-11-19 15:37:30 +080063 ],
64 lint: { strict_updatability_linting: true },
Remi NGUYEN VANbe2a07f2021-03-29 17:09:13 +090065}
Remi NGUYEN VANc02dcd72021-10-04 19:53:32 +090066
67java_test_host {
68 name: "net-tests-utils-host-common",
69 srcs: [
70 "host/**/*.java",
71 "host/**/*.kt",
72 ],
73 libs: ["tradefed"],
74 test_suites: ["device-tests", "general-tests", "cts", "mts"],
75 data: [":ConnectivityChecker"],
76}