blob: 5d90a612eca3dfbf6c1c6e1a81682e0a83419d93 [file] [log] [blame]
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +09001//
2// Copyright (C) 2018 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
17android_test {
18 name: "NetworkStackTests",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090019 certificate: "platform",
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +090020 srcs: ["src/**/*.java"],
Dan Shi4c44c8e2019-02-14 11:42:02 -080021 test_suites: ["device-tests"],
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090022 resource_dirs: ["res"],
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +090023 static_libs: [
Brett Chabot189c5982019-02-26 14:52:33 -080024 "androidx.test.rules",
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +090025 "mockito-target-extended-minus-junit4",
Chalard Jean0d0cc8c2019-05-28 16:48:32 +090026 "net-tests-utils",
Remi NGUYEN VAN0a4df5a2019-03-08 17:20:49 +090027 "NetworkStackBase",
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +090028 "testables",
29 ],
30 libs: [
31 "android.test.runner",
32 "android.test.base",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090033 "android.test.mock",
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +090034 ],
Xiao Ma53ed1ac2019-06-03 15:48:39 +090035 defaults: ["libnetworkstackutilsjni_deps"],
Remi NGUYEN VAN057bf202018-12-04 12:13:09 +090036 jni_libs: [
37 // For mockito extended
38 "libdexmakerjvmtiagent",
39 "libstaticjvmtiagent",
Xiao Ma53ed1ac2019-06-03 15:48:39 +090040 "libnetworkstackutilsjni",
41 ],
42}
43
44// Additional dependencies of libnetworkstackutilsjni that are not provided by the system when
45// running as a test application.
46// Using java_defaults as jni_libs does not support filegroups.
47java_defaults {
48 name: "libnetworkstackutilsjni_deps",
49 jni_libs: [
50 "libartbase",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090051 "libbacktrace",
52 "libbase",
53 "libbinder",
54 "libbinderthreadstate",
55 "libc++",
Yifan Hong4a55b452019-04-03 18:15:22 -070056 "libcgrouprc",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090057 "libcrypto",
58 "libcutils",
Remi NGUYEN VAN1c88d602019-03-29 14:49:02 +090059 "ld-android",
60 "libdl_android",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090061 "libhidl-gen-utils",
62 "libhidlbase",
63 "libhidltransport",
64 "libhwbinder",
junyulaicd924e52019-01-08 20:04:33 +080065 "libjsoncpp",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090066 "liblog",
67 "liblzma",
68 "libnativehelper",
Lorenzo Colitti88ddd8822019-05-01 11:54:33 +090069 "libnativehelper_compat_libc++",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090070 "libnetworkstacktestsjni",
71 "libpackagelistparser",
72 "libpcre2",
73 "libprocessgroup",
74 "libselinux",
75 "libui",
76 "libutils",
77 "libvintf",
78 "libvndksupport",
79 "libtinyxml2",
80 "libunwindstack",
81 "libutilscallstack",
82 "libziparchive",
83 "libz",
Lorenzo Colitti81fc3e62019-05-21 19:45:09 +090084 "netd_aidl_interface-V2-cpp",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090085 ],
86}
87
Xiao Ma53ed1ac2019-06-03 15:48:39 +090088// JNI code for ApfTest
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +090089cc_library_shared {
90 name: "libnetworkstacktestsjni",
91 srcs: [
92 "jni/**/*.cpp"
93 ],
94 cflags: [
95 "-Wall",
96 "-Wextra",
97 "-Werror",
98 ],
99 include_dirs: [
100 "hardware/google/apf",
101 ],
102 shared_libs: [
103 "libbinder",
104 "liblog",
105 "libcutils",
106 "libnativehelper",
Lorenzo Colitti81fc3e62019-05-21 19:45:09 +0900107 "netd_aidl_interface-V2-cpp",
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +0900108 ],
109 static_libs: [
110 "libapf",
111 "libpcap",
112 ],
Remi NGUYEN VAN4a2eb872019-01-10 19:12:46 +0900113}