blob: 19a5efb510f84f8a762f54964f9b27f4dafc6f8d [file] [log] [blame]
Mitchell Wills5ba61522015-12-02 15:20:36 -08001# 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
15LOCAL_PATH:= $(call my-dir)
Etan Cohen956f54b2015-09-29 13:49:16 -070016
Etan Cohen956f54b2015-09-29 13:49:16 -070017# Make test APK
18# ============================================================
Mitchell Wills5ba61522015-12-02 15:20:36 -080019include $(CLEAR_VARS)
20
21LOCAL_MODULE_TAGS := tests
22
Ying Wangc64c0e22016-04-26 15:27:29 -070023LOCAL_SRC_FILES := $(call all-subdir-java-files)
Mitchell Wills5ba61522015-12-02 15:20:36 -080024
Mitchell Willsa54db132016-02-02 10:53:39 -080025# 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
33local_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.
37local_classes := $(subst /,.,$(patsubst src/%.java,%,$(local_java_files)))
38# Utility variables to allow replacing a space with a comma
39comma:= ,
40empty:=
41space:= $(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.
45jacoco_exclude := $(subst $(space),$(comma),$(patsubst %,%*,$(local_classes)))
46
Peter Qiu9eba9df2016-09-30 14:40:12 -070047jacoco_include := com.android.server.wifi.*
Mitchell Willsa54db132016-02-02 10:53:39 -080048
Sebastien Hertz05fca102016-04-11 21:02:22 +020049LOCAL_JACK_COVERAGE_INCLUDE_FILTER := $(jacoco_include)
50LOCAL_JACK_COVERAGE_EXCLUDE_FILTER := $(jacoco_exclude)
Mitchell Willsa54db132016-02-02 10:53:39 -080051
Colin Crosse8747632017-05-10 16:29:40 -070052LOCAL_DX_FLAGS := --multi-dex
Paul Duffin160c5fd2017-03-09 18:49:41 +000053LOCAL_JACK_FLAGS := --multi-dex native
54
Mitchell Wills2977ce62016-02-22 13:40:44 -080055# 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 Wills5ba61522015-12-02 15:20:36 -080060LOCAL_STATIC_JAVA_LIBRARIES := \
Mitchell Wills5ba61522015-12-02 15:20:36 -080061 android-support-test \
xshua8ae17a2017-12-19 11:22:34 -080062 mockito-target-inline-minus-junit4 \
Christopher Wileyf4267b62016-05-18 16:24:16 -070063 frameworks-base-testutils \
Mitchell Wills2977ce62016-02-22 13:40:44 -080064 services \
Mitchell Wills5ba61522015-12-02 15:20:36 -080065 wifi-service \
Mitchell Wills5ba61522015-12-02 15:20:36 -080066
Mitchell Wills2977ce62016-02-22 13:40:44 -080067LOCAL_JAVA_LIBRARIES := \
68 android.test.runner \
69 wifi-service \
70 services \
Paul Duffin780095a2017-12-05 18:36:56 +000071 android.hidl.manager-V1.0-java \
72 android.test.base \
73 android.test.mock
Mitchell Wills2977ce62016-02-22 13:40:44 -080074
75# These must be explicitly included because they are not normally accessible
76# from apps.
Mitchell Wills0d836252016-01-07 16:39:32 -080077LOCAL_JNI_SHARED_LIBRARIES := \
Christopher Wiley944db7c2016-07-14 16:40:58 -070078 libcrypto \
Mitchell Wills0d836252016-01-07 16:39:32 -080079 libwifi-service \
Mitchell Willsd7412cc2016-04-20 13:43:07 -070080 libEGL \
81 libGLESv2 \
82 libaudioutils \
Mitchell Wills0d836252016-01-07 16:39:32 -080083 libbacktrace \
Mitchell Willsd7412cc2016-04-20 13:43:07 -070084 libbase \
85 libbinder \
86 libc++ \
87 libcamera_client \
88 libcamera_metadata \
89 libcutils \
90 libexpat \
91 libgui \
92 libhardware \
Mitchell Willsd7412cc2016-04-20 13:43:07 -070093 libicui18n \
94 libicuuc \
Mitchell Willsd39cacb2016-01-26 10:15:27 -080095 liblzma \
Mitchell Willsd7412cc2016-04-20 13:43:07 -070096 libmedia \
97 libnativehelper \
98 libnbaio \
99 libnetutils \
100 libnl \
101 libpowermanager \
102 libsonivox \
103 libspeexresampler \
104 libstagefright_foundation \
105 libstdc++ \
106 libsync \
Christopher Wiley94a18442016-06-15 13:04:47 -0700107 libwifi-system \
Mitchell Willsd7412cc2016-04-20 13:43:07 -0700108 libui \
109 libunwind \
Rebecca Silberstein0dd42412017-08-07 15:07:55 -0700110 libunwindstack \
Mitchell Willsd7412cc2016-04-20 13:43:07 -0700111 libutils \
Rebecca Silbersteineaedf422017-06-01 00:45:44 -0700112 libvndksupport \
xshua8ae17a2017-12-19 11:22:34 -0800113 libdexmakerjvmtiagent \
Mitchell Wills0d836252016-01-07 16:39:32 -0800114
Mitchell Wills80a936c2016-01-07 18:38:40 -0800115ifdef WPA_SUPPLICANT_VERSION
Mitchell Wills2977ce62016-02-22 13:40:44 -0800116LOCAL_JNI_SHARED_LIBRARIES += libwpa_client
Mitchell Wills80a936c2016-01-07 18:38:40 -0800117endif
118
Mitchell Wills5ba61522015-12-02 15:20:36 -0800119LOCAL_PACKAGE_NAME := FrameworksWifiTests
Mitchell Wills5ba61522015-12-02 15:20:36 -0800120
Dan Shif8d6f3d2017-03-20 15:50:26 -0700121LOCAL_COMPATIBILITY_SUITE := device-tests
122
Mitchell Wills5ba61522015-12-02 15:20:36 -0800123include $(BUILD_PACKAGE)