Peter Qiu | 601964b | 2016-09-26 13:14:13 -0700 | [diff] [blame] | 1 | # Copyright (C) 2016 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 | LOCAL_PATH:= $(call my-dir) |
| 16 | |
| 17 | # Make test APK |
| 18 | # ============================================================ |
| 19 | include $(CLEAR_VARS) |
| 20 | |
| 21 | LOCAL_MODULE_TAGS := tests |
| 22 | |
| 23 | LOCAL_SRC_FILES := $(call all-subdir-java-files) |
| 24 | |
| 25 | # This list is generated from the java source files in this module |
| 26 | # The list is a comma separated list of class names with * matching zero or more characters. |
| 27 | # Example: |
| 28 | # Input files: src/com/android/server/wifi/Test.java src/com/android/server/wifi/AnotherTest.java |
| 29 | # Generated exclude list: com.android.server.wifi.Test*,com.android.server.wifi.AnotherTest* |
| 30 | |
| 31 | # Filter all src files to just java files |
| 32 | local_java_files := $(filter %.java,$(LOCAL_SRC_FILES)) |
| 33 | # Transform java file names into full class names. |
| 34 | # This only works if the class name matches the file name and the directory structure |
| 35 | # matches the package. |
| 36 | local_classes := $(subst /,.,$(patsubst src/%.java,%,$(local_java_files))) |
Peter Qiu | 601964b | 2016-09-26 13:14:13 -0700 | [diff] [blame] | 37 | # Convert class name list to jacoco exclude list |
| 38 | # This appends a * to all classes and replace the space separators with commas. |
| 39 | # These patterns will match all classes in this module and their inner classes. |
| 40 | jacoco_exclude := $(subst $(space),$(comma),$(patsubst %,%*,$(local_classes))) |
| 41 | |
| 42 | jacoco_include := android.net.wifi.* |
| 43 | |
| 44 | LOCAL_JACK_COVERAGE_INCLUDE_FILTER := $(jacoco_include) |
| 45 | LOCAL_JACK_COVERAGE_EXCLUDE_FILTER := $(jacoco_exclude) |
| 46 | |
| 47 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Stephen Chen | 607c4ac | 2017-08-18 14:36:40 -0700 | [diff] [blame] | 48 | android-support-test \ |
| 49 | core-test-rules \ |
| 50 | guava \ |
| 51 | mockito-target-minus-junit4 \ |
| 52 | frameworks-base-testutils \ |
| 53 | truth-prebuilt \ |
Peter Qiu | 601964b | 2016-09-26 13:14:13 -0700 | [diff] [blame] | 54 | |
| 55 | LOCAL_JAVA_LIBRARIES := \ |
Stephen Chen | 607c4ac | 2017-08-18 14:36:40 -0700 | [diff] [blame] | 56 | android.test.runner \ |
Paul Duffin | 2710ca1 | 2017-12-05 18:36:56 +0000 | [diff] [blame] | 57 | android.test.base \ |
Peter Qiu | 601964b | 2016-09-26 13:14:13 -0700 | [diff] [blame] | 58 | |
| 59 | LOCAL_PACKAGE_NAME := FrameworksWifiApiTests |
Anton Hansson | d137c87 | 2018-02-23 12:57:51 +0000 | [diff] [blame] | 60 | LOCAL_PRIVATE_PLATFORM_APIS := true |
Simran Basi | 473a16e | 2017-03-15 14:43:58 -0700 | [diff] [blame] | 61 | LOCAL_COMPATIBILITY_SUITE := device-tests |
Peter Qiu | 601964b | 2016-09-26 13:14:13 -0700 | [diff] [blame] | 62 | |
| 63 | include $(BUILD_PACKAGE) |