David Su | 6164dcb | 2019-12-18 15:16:24 -0800 | [diff] [blame] | 1 | // Copyright (C) 2020 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 | |
| 15 | // Make test APK |
| 16 | // ============================================================ |
| 17 | |
| 18 | // This list is generated from the java source files in this module |
| 19 | // The list is a comma separated list of class names with * matching zero or more characters. |
| 20 | // Example: |
| 21 | // Input files: src/com/android/server/wifi/Test.java src/com/android/server/wifi/AnotherTest.java |
| 22 | // Generated exclude list: com.android.server.wifi.Test*,com.android.server.wifi.AnotherTest* |
| 23 | |
| 24 | // Filter all src files to just java files |
| 25 | local_java_files = ["__builtin_func:filter %.java <'LOCAL_SRC_FILES' unset>"] |
| 26 | // Transform java file names into full class names. |
| 27 | // This only works if the class name matches the file name and the directory structure |
| 28 | // matches the package. |
| 29 | local_classes = ["__builtin_func:subst / . __builtin_func:patsubst src/%.java % <'local_java_files' unset>"] |
| 30 | // Convert class name list to jacoco exclude list |
| 31 | // This appends a * to all classes and replace the space separators with commas. |
| 32 | // These patterns will match all classes in this module and their inner classes. |
| 33 | jacoco_exclude = ["__builtin_func:subst <'space' unset> <'comma' unset> __builtin_func:patsubst % %* <'local_classes' unset>"] |
| 34 | |
| 35 | jacoco_include = ["android.net.wifi.*"] |
| 36 | |
| 37 | android_test { |
| 38 | name: "FrameworksWifiApiTests", |
| 39 | |
David Su | 842f76b | 2019-12-18 18:31:11 -0800 | [diff] [blame^] | 40 | defaults: ["framework-wifi-test-defaults"], |
| 41 | |
David Su | 6164dcb | 2019-12-18 15:16:24 -0800 | [diff] [blame] | 42 | srcs: ["**/*.java"], |
| 43 | |
| 44 | jacoco: { |
| 45 | include_filter: jacoco_include, |
| 46 | exclude_filter: jacoco_exclude, |
| 47 | }, |
| 48 | |
| 49 | static_libs: [ |
| 50 | "androidx.test.rules", |
| 51 | "core-test-rules", |
| 52 | "guava", |
| 53 | "mockito-target-minus-junit4", |
| 54 | "net-tests-utils", |
| 55 | "frameworks-base-testutils", |
| 56 | "truth-prebuilt", |
| 57 | ], |
| 58 | |
| 59 | libs: [ |
| 60 | "android.test.runner", |
| 61 | "android.test.base", |
| 62 | ], |
| 63 | |
David Su | 6164dcb | 2019-12-18 15:16:24 -0800 | [diff] [blame] | 64 | test_suites: [ |
| 65 | "device-tests", |
| 66 | "mts", |
| 67 | ], |
| 68 | } |