Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 1 | # Copyright (C) 2015 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) |
Etan Cohen | 956f54b | 2015-09-29 13:49:16 -0700 | [diff] [blame] | 16 | |
Etan Cohen | 956f54b | 2015-09-29 13:49:16 -0700 | [diff] [blame] | 17 | # Make test APK |
| 18 | # ============================================================ |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 19 | include $(CLEAR_VARS) |
| 20 | |
| 21 | LOCAL_MODULE_TAGS := tests |
| 22 | |
Ying Wang | c64c0e2 | 2016-04-26 15:27:29 -0700 | [diff] [blame] | 23 | LOCAL_SRC_FILES := $(call all-subdir-java-files) |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 24 | |
Mitchell Wills | a54db13 | 2016-02-02 10:53:39 -0800 | [diff] [blame] | 25 | # Provide jack a list of classes to exclude form code coverage |
| 26 | # This list is generated from the java source files in this module |
| 27 | # The list is a comma separated list of class names with * matching zero or more characters. |
| 28 | # Example: |
| 29 | # Input files: src/com/android/server/wifi/Test.java src/com/android/server/wifi/AnotherTest.java |
| 30 | # Generated exclude list: com.android.server.wifi.Test*,com.android.server.wifi.AnotherTest* |
| 31 | |
| 32 | # Filter all src files to just java files |
| 33 | local_java_files := $(filter %.java,$(LOCAL_SRC_FILES)) |
| 34 | # Transform java file names into full class names. |
| 35 | # This only works if the class name matches the file name and the directory structure |
| 36 | # matches the package. |
| 37 | local_classes := $(subst /,.,$(patsubst src/%.java,%,$(local_java_files))) |
| 38 | # Utility variables to allow replacing a space with a comma |
| 39 | comma:= , |
| 40 | empty:= |
| 41 | space:= $(empty) $(empty) |
| 42 | # Convert class name list to jacoco exclude list |
| 43 | # This appends a * to all classes and replace the space separators with commas. |
| 44 | # These patterns will match all classes in this module and their inner classes. |
| 45 | jacoco_exclude := $(subst $(space),$(comma),$(patsubst %,%*,$(local_classes))) |
| 46 | |
Peter Qiu | 9eba9df | 2016-09-30 14:40:12 -0700 | [diff] [blame] | 47 | jacoco_include := com.android.server.wifi.* |
Mitchell Wills | a54db13 | 2016-02-02 10:53:39 -0800 | [diff] [blame] | 48 | |
Sebastien Hertz | 05fca10 | 2016-04-11 21:02:22 +0200 | [diff] [blame] | 49 | LOCAL_JACK_COVERAGE_INCLUDE_FILTER := $(jacoco_include) |
| 50 | LOCAL_JACK_COVERAGE_EXCLUDE_FILTER := $(jacoco_exclude) |
Mitchell Wills | a54db13 | 2016-02-02 10:53:39 -0800 | [diff] [blame] | 51 | |
Colin Cross | e874763 | 2017-05-10 16:29:40 -0700 | [diff] [blame] | 52 | LOCAL_DX_FLAGS := --multi-dex |
Paul Duffin | 160c5fd | 2017-03-09 18:49:41 +0000 | [diff] [blame] | 53 | LOCAL_JACK_FLAGS := --multi-dex native |
| 54 | |
Mitchell Wills | 2977ce6 | 2016-02-22 13:40:44 -0800 | [diff] [blame] | 55 | # wifi-service and services must be included here so that the latest changes |
| 56 | # will be used when tests. Otherwise the tests would run against the installed |
| 57 | # system. |
| 58 | # TODO figure out if this is the correct thing to do, this seems to not be right |
| 59 | # since neither is declared a static java library. |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 60 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 61 | android-support-test \ |
xshu | a8ae17a | 2017-12-19 11:22:34 -0800 | [diff] [blame] | 62 | mockito-target-inline-minus-junit4 \ |
Christopher Wiley | f4267b6 | 2016-05-18 16:24:16 -0700 | [diff] [blame] | 63 | frameworks-base-testutils \ |
Mitchell Wills | 2977ce6 | 2016-02-22 13:40:44 -0800 | [diff] [blame] | 64 | services \ |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 65 | wifi-service \ |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 66 | |
Mitchell Wills | 2977ce6 | 2016-02-22 13:40:44 -0800 | [diff] [blame] | 67 | LOCAL_JAVA_LIBRARIES := \ |
| 68 | android.test.runner \ |
| 69 | wifi-service \ |
| 70 | services \ |
Paul Duffin | 780095a | 2017-12-05 18:36:56 +0000 | [diff] [blame] | 71 | android.hidl.manager-V1.0-java \ |
| 72 | android.test.base \ |
| 73 | android.test.mock |
Mitchell Wills | 2977ce6 | 2016-02-22 13:40:44 -0800 | [diff] [blame] | 74 | |
| 75 | # These must be explicitly included because they are not normally accessible |
| 76 | # from apps. |
Mitchell Wills | 0d83625 | 2016-01-07 16:39:32 -0800 | [diff] [blame] | 77 | LOCAL_JNI_SHARED_LIBRARIES := \ |
Christopher Wiley | 944db7c | 2016-07-14 16:40:58 -0700 | [diff] [blame] | 78 | libcrypto \ |
Mitchell Wills | 0d83625 | 2016-01-07 16:39:32 -0800 | [diff] [blame] | 79 | libwifi-service \ |
Mitchell Wills | d7412cc | 2016-04-20 13:43:07 -0700 | [diff] [blame] | 80 | libEGL \ |
| 81 | libGLESv2 \ |
| 82 | libaudioutils \ |
Mitchell Wills | 0d83625 | 2016-01-07 16:39:32 -0800 | [diff] [blame] | 83 | libbacktrace \ |
Mitchell Wills | d7412cc | 2016-04-20 13:43:07 -0700 | [diff] [blame] | 84 | libbase \ |
| 85 | libbinder \ |
| 86 | libc++ \ |
| 87 | libcamera_client \ |
| 88 | libcamera_metadata \ |
| 89 | libcutils \ |
| 90 | libexpat \ |
| 91 | libgui \ |
| 92 | libhardware \ |
Mitchell Wills | d7412cc | 2016-04-20 13:43:07 -0700 | [diff] [blame] | 93 | libicui18n \ |
| 94 | libicuuc \ |
Mitchell Wills | d39cacb | 2016-01-26 10:15:27 -0800 | [diff] [blame] | 95 | liblzma \ |
Mitchell Wills | d7412cc | 2016-04-20 13:43:07 -0700 | [diff] [blame] | 96 | libmedia \ |
| 97 | libnativehelper \ |
| 98 | libnbaio \ |
| 99 | libnetutils \ |
| 100 | libnl \ |
| 101 | libpowermanager \ |
| 102 | libsonivox \ |
| 103 | libspeexresampler \ |
| 104 | libstagefright_foundation \ |
| 105 | libstdc++ \ |
| 106 | libsync \ |
Christopher Wiley | 94a1844 | 2016-06-15 13:04:47 -0700 | [diff] [blame] | 107 | libwifi-system \ |
Mitchell Wills | d7412cc | 2016-04-20 13:43:07 -0700 | [diff] [blame] | 108 | libui \ |
| 109 | libunwind \ |
Rebecca Silberstein | 0dd4241 | 2017-08-07 15:07:55 -0700 | [diff] [blame] | 110 | libunwindstack \ |
Mitchell Wills | d7412cc | 2016-04-20 13:43:07 -0700 | [diff] [blame] | 111 | libutils \ |
Rebecca Silberstein | eaedf42 | 2017-06-01 00:45:44 -0700 | [diff] [blame] | 112 | libvndksupport \ |
xshu | a8ae17a | 2017-12-19 11:22:34 -0800 | [diff] [blame] | 113 | libdexmakerjvmtiagent \ |
Mitchell Wills | 0d83625 | 2016-01-07 16:39:32 -0800 | [diff] [blame] | 114 | |
Mitchell Wills | 80a936c | 2016-01-07 18:38:40 -0800 | [diff] [blame] | 115 | ifdef WPA_SUPPLICANT_VERSION |
Mitchell Wills | 2977ce6 | 2016-02-22 13:40:44 -0800 | [diff] [blame] | 116 | LOCAL_JNI_SHARED_LIBRARIES += libwpa_client |
Mitchell Wills | 80a936c | 2016-01-07 18:38:40 -0800 | [diff] [blame] | 117 | endif |
| 118 | |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 119 | LOCAL_PACKAGE_NAME := FrameworksWifiTests |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 120 | |
Dan Shi | f8d6f3d | 2017-03-20 15:50:26 -0700 | [diff] [blame] | 121 | LOCAL_COMPATIBILITY_SUITE := device-tests |
| 122 | |
Mitchell Wills | 5ba6152 | 2015-12-02 15:20:36 -0800 | [diff] [blame] | 123 | include $(BUILD_PACKAGE) |