1######################################################################### 2# Build FrameworksServicesTests package 3######################################################################### 4 5LOCAL_PATH:= $(call my-dir) 6include $(CLEAR_VARS) 7 8# We only want this apk build for tests. 9LOCAL_MODULE_TAGS := tests 10 11# Include all test java files. 12LOCAL_SRC_FILES := $(call all-java-files-under, src) 13 14LOCAL_STATIC_JAVA_LIBRARIES := \ 15 frameworks-base-testutils \ 16 services.core \ 17 services.devicepolicy \ 18 services.net \ 19 services.usage \ 20 easymocklib \ 21 guava \ 22 android-support-test \ 23 mockito-target \ 24 ShortcutManagerTestUtils \ 25 truth-prebuilt 26 27LOCAL_JAVA_LIBRARIES := android.test.runner 28 29LOCAL_PACKAGE_NAME := FrameworksServicesTests 30 31LOCAL_CERTIFICATE := platform 32 33# These are not normally accessible from apps so they must be explicitly included. 34LOCAL_JNI_SHARED_LIBRARIES := libservicestestsjni \ 35 libbacktrace \ 36 libbase \ 37 libbinder \ 38 libc++ \ 39 libcutils \ 40 liblog \ 41 liblzma \ 42 libnativehelper \ 43 libnetdaidl \ 44 libui \ 45 libunwind \ 46 libutils 47 48LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk 49 50# Code coverage puts us over the dex limit, so enable multi-dex for coverage-enabled builds 51ifeq (true,$(EMMA_INSTRUMENT)) 52LOCAL_JACK_FLAGS := --multi-dex native 53endif # EMMA_INSTRUMENT_STATIC 54 55include $(BUILD_PACKAGE) 56 57######################################################################### 58# Build JNI Shared Library 59######################################################################### 60 61LOCAL_PATH:= $(LOCAL_PATH)/jni 62 63include $(CLEAR_VARS) 64 65LOCAL_MODULE_TAGS := tests 66 67LOCAL_CFLAGS := -Wall -Wextra -Werror 68 69LOCAL_C_INCLUDES := \ 70 libpcap \ 71 hardware/google/apf 72 73LOCAL_SRC_FILES := $(call all-cpp-files-under) 74 75LOCAL_SHARED_LIBRARIES := \ 76 libbinder \ 77 libcutils \ 78 libnativehelper \ 79 libnetdaidl 80 81LOCAL_STATIC_LIBRARIES := \ 82 libpcap \ 83 libapf 84 85LOCAL_MODULE := libservicestestsjni 86 87include $(BUILD_SHARED_LIBRARY) 88