Remi NGUYEN VAN | 057bf20 | 2018-12-04 12:13:09 +0900 | [diff] [blame] | 1 | // |
| 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 | |
Remi NGUYEN VAN | 5f48efe | 2019-09-06 15:16:29 +0900 | [diff] [blame] | 17 | java_defaults { |
| 18 | name: "NetworkStackTestsDefaults", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 19 | certificate: "platform", |
Chalard Jean | 3674b55 | 2019-06-03 13:37:08 +0900 | [diff] [blame] | 20 | srcs: ["src/**/*.java", "src/**/*.kt"], |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 21 | resource_dirs: ["res"], |
Remi NGUYEN VAN | 057bf20 | 2018-12-04 12:13:09 +0900 | [diff] [blame] | 22 | static_libs: [ |
Brett Chabot | 189c598 | 2019-02-26 14:52:33 -0800 | [diff] [blame] | 23 | "androidx.test.rules", |
Chalard Jean | 3c9f687 | 2019-07-03 12:31:05 +0900 | [diff] [blame] | 24 | "kotlin-reflect", |
Remi NGUYEN VAN | 057bf20 | 2018-12-04 12:13:09 +0900 | [diff] [blame] | 25 | "mockito-target-extended-minus-junit4", |
Chalard Jean | 0d0cc8c | 2019-05-28 16:48:32 +0900 | [diff] [blame] | 26 | "net-tests-utils", |
Remi NGUYEN VAN | 057bf20 | 2018-12-04 12:13:09 +0900 | [diff] [blame] | 27 | "testables", |
| 28 | ], |
| 29 | libs: [ |
| 30 | "android.test.runner", |
| 31 | "android.test.base", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 32 | "android.test.mock", |
Remi NGUYEN VAN | 057bf20 | 2018-12-04 12:13:09 +0900 | [diff] [blame] | 33 | ], |
Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 34 | defaults: ["libnetworkstackutilsjni_deps"], |
Remi NGUYEN VAN | 057bf20 | 2018-12-04 12:13:09 +0900 | [diff] [blame] | 35 | jni_libs: [ |
| 36 | // For mockito extended |
| 37 | "libdexmakerjvmtiagent", |
| 38 | "libstaticjvmtiagent", |
Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 39 | "libnetworkstackutilsjni", |
| 40 | ], |
| 41 | } |
| 42 | |
Remi NGUYEN VAN | 5f48efe | 2019-09-06 15:16:29 +0900 | [diff] [blame] | 43 | android_test { |
| 44 | name: "NetworkStackNextTests", |
| 45 | srcs: [], // TODO: tests that only apply to the current, non-stable API can be added here |
| 46 | test_suites: ["device-tests"], |
| 47 | defaults: ["NetworkStackTestsDefaults"], |
| 48 | static_libs: ["NetworkStackApiCurrentLib"], |
| 49 | } |
| 50 | |
| 51 | android_test { |
| 52 | name: "NetworkStackTests", |
Remi NGUYEN VAN | a42c948 | 2019-11-26 17:11:50 +0900 | [diff] [blame] | 53 | min_sdk_version: "29", |
Remi NGUYEN VAN | 5f48efe | 2019-09-06 15:16:29 +0900 | [diff] [blame] | 54 | test_suites: ["device-tests"], |
| 55 | defaults: ["NetworkStackTestsDefaults"], |
| 56 | static_libs: ["NetworkStackApiStableLib"], |
| 57 | } |
| 58 | |
Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 59 | // Additional dependencies of libnetworkstackutilsjni that are not provided by the system when |
| 60 | // running as a test application. |
| 61 | // Using java_defaults as jni_libs does not support filegroups. |
| 62 | java_defaults { |
| 63 | name: "libnetworkstackutilsjni_deps", |
| 64 | jni_libs: [ |
| 65 | "libartbase", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 66 | "libbacktrace", |
| 67 | "libbase", |
| 68 | "libbinder", |
| 69 | "libbinderthreadstate", |
| 70 | "libc++", |
Yifan Hong | 4a55b45 | 2019-04-03 18:15:22 -0700 | [diff] [blame] | 71 | "libcgrouprc", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 72 | "libcrypto", |
| 73 | "libcutils", |
Remi NGUYEN VAN | 1c88d60 | 2019-03-29 14:49:02 +0900 | [diff] [blame] | 74 | "ld-android", |
| 75 | "libdl_android", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 76 | "libhidl-gen-utils", |
| 77 | "libhidlbase", |
junyulai | cd924e5 | 2019-01-08 20:04:33 +0800 | [diff] [blame] | 78 | "libjsoncpp", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 79 | "liblog", |
| 80 | "liblzma", |
| 81 | "libnativehelper", |
Lorenzo Colitti | 88ddd882 | 2019-05-01 11:54:33 +0900 | [diff] [blame] | 82 | "libnativehelper_compat_libc++", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 83 | "libnetworkstacktestsjni", |
| 84 | "libpackagelistparser", |
| 85 | "libpcre2", |
| 86 | "libprocessgroup", |
| 87 | "libselinux", |
| 88 | "libui", |
| 89 | "libutils", |
| 90 | "libvintf", |
| 91 | "libvndksupport", |
| 92 | "libtinyxml2", |
| 93 | "libunwindstack", |
| 94 | "libutilscallstack", |
| 95 | "libziparchive", |
| 96 | "libz", |
Jeongik Cha | 8703609 | 2019-10-25 02:02:00 +0900 | [diff] [blame] | 97 | "netd_aidl_interface-cpp", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 98 | ], |
| 99 | } |