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 | ], |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame^] | 41 | jarjar_rules: ":NetworkStackJarJarRules", |
Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 42 | } |
| 43 | |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame^] | 44 | // Tests for NetworkStackNext. |
Remi NGUYEN VAN | 5f48efe | 2019-09-06 15:16:29 +0900 | [diff] [blame] | 45 | android_test { |
| 46 | name: "NetworkStackNextTests", |
| 47 | srcs: [], // TODO: tests that only apply to the current, non-stable API can be added here |
| 48 | test_suites: ["device-tests"], |
| 49 | defaults: ["NetworkStackTestsDefaults"], |
| 50 | static_libs: ["NetworkStackApiCurrentLib"], |
| 51 | } |
| 52 | |
Lorenzo Colitti | b891b5e | 2020-02-05 16:48:09 +0900 | [diff] [blame^] | 53 | // Library containing the unit tests. This is used by the coverage test target to pull in the |
| 54 | // unit test code. It is not currently used by the tests themselves because all the build |
| 55 | // configuration needed by the tests is in the NetworkStackTestsDefaults rule. |
| 56 | android_library { |
| 57 | name: "NetworkStackTestsLib", |
| 58 | min_sdk_version: "29", |
| 59 | defaults: ["NetworkStackTestsDefaults"], |
| 60 | static_libs: ["NetworkStackApiStableLib"], |
| 61 | visibility: ["//packages/modules/NetworkStack/tests/integration"] |
| 62 | } |
| 63 | |
Remi NGUYEN VAN | 5f48efe | 2019-09-06 15:16:29 +0900 | [diff] [blame] | 64 | android_test { |
| 65 | name: "NetworkStackTests", |
Remi NGUYEN VAN | a42c948 | 2019-11-26 17:11:50 +0900 | [diff] [blame] | 66 | min_sdk_version: "29", |
Remi NGUYEN VAN | f0a9761 | 2020-01-08 16:51:34 +0900 | [diff] [blame] | 67 | test_suites: ["device-tests", "mts"], |
Remi NGUYEN VAN | 5f48efe | 2019-09-06 15:16:29 +0900 | [diff] [blame] | 68 | defaults: ["NetworkStackTestsDefaults"], |
| 69 | static_libs: ["NetworkStackApiStableLib"], |
Kun Niu | 97ccc33 | 2020-01-14 17:07:44 -0800 | [diff] [blame] | 70 | compile_multilib: "both", |
Remi NGUYEN VAN | 5f48efe | 2019-09-06 15:16:29 +0900 | [diff] [blame] | 71 | } |
| 72 | |
Xiao Ma | 53ed1ac | 2019-06-03 15:48:39 +0900 | [diff] [blame] | 73 | // Additional dependencies of libnetworkstackutilsjni that are not provided by the system when |
| 74 | // running as a test application. |
| 75 | // Using java_defaults as jni_libs does not support filegroups. |
| 76 | java_defaults { |
| 77 | name: "libnetworkstackutilsjni_deps", |
| 78 | jni_libs: [ |
| 79 | "libartbase", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 80 | "libbacktrace", |
| 81 | "libbase", |
| 82 | "libbinder", |
| 83 | "libbinderthreadstate", |
| 84 | "libc++", |
Yifan Hong | 4a55b45 | 2019-04-03 18:15:22 -0700 | [diff] [blame] | 85 | "libcgrouprc", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 86 | "libcrypto", |
| 87 | "libcutils", |
Remi NGUYEN VAN | 1c88d60 | 2019-03-29 14:49:02 +0900 | [diff] [blame] | 88 | "ld-android", |
| 89 | "libdl_android", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 90 | "libhidl-gen-utils", |
| 91 | "libhidlbase", |
junyulai | cd924e5 | 2019-01-08 20:04:33 +0800 | [diff] [blame] | 92 | "libjsoncpp", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 93 | "liblog", |
| 94 | "liblzma", |
| 95 | "libnativehelper", |
Lorenzo Colitti | 88ddd882 | 2019-05-01 11:54:33 +0900 | [diff] [blame] | 96 | "libnativehelper_compat_libc++", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 97 | "libnetworkstacktestsjni", |
| 98 | "libpackagelistparser", |
| 99 | "libpcre2", |
| 100 | "libprocessgroup", |
| 101 | "libselinux", |
| 102 | "libui", |
| 103 | "libutils", |
| 104 | "libvintf", |
| 105 | "libvndksupport", |
| 106 | "libtinyxml2", |
| 107 | "libunwindstack", |
| 108 | "libutilscallstack", |
| 109 | "libziparchive", |
| 110 | "libz", |
Jeongik Cha | 8703609 | 2019-10-25 02:02:00 +0900 | [diff] [blame] | 111 | "netd_aidl_interface-cpp", |
Remi NGUYEN VAN | 4a2eb87 | 2019-01-10 19:12:46 +0900 | [diff] [blame] | 112 | ], |
| 113 | } |