blob: 7886b5e9e3955c3559de4c628f6fa23e0d9b6ea2 [file] [log] [blame]
Paul Jensend38fb7662016-01-07 23:13:19 -05001#########################################################################
2# Build FrameworksServicesTests package
3#########################################################################
4
Neal Nguyen1a44d5d2010-01-13 10:42:43 -08005LOCAL_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
Jeff Sharkeyb7342ac2011-04-25 23:44:11 -070014LOCAL_STATIC_JAVA_LIBRARIES := \
Christopher Wiley1ff75bd2016-05-18 16:32:44 -070015 frameworks-base-testutils \
Narayan Kamathd8b54e82014-08-21 12:25:24 +010016 services.core \
17 services.devicepolicy \
Lorenzo Colittia12bde32015-03-31 16:26:57 +090018 services.net \
Amith Yamasania93542f2016-02-03 18:02:06 -080019 services.usage \
Jeff Sharkeyb7342ac2011-04-25 23:44:11 -070020 easymocklib \
Jeff Sharkeyfb878b62012-07-26 18:32:30 -070021 guava \
Xiaohui Chenf86676a2015-08-19 13:30:07 -070022 android-support-test \
Makoto Onuki5ba0d3e2016-04-11 14:03:46 -070023 mockito-target \
Daniel Nishic7d9de52016-12-12 15:16:00 -080024 ShortcutManagerTestUtils \
25 truth-prebuilt
Neal Nguyen1a44d5d2010-01-13 10:42:43 -080026
Narayan Kamathd8b54e82014-08-21 12:25:24 +010027LOCAL_JAVA_LIBRARIES := android.test.runner
Svetoslav Ganov0b29a582010-04-16 18:52:49 -070028
Neal Nguyen1a44d5d2010-01-13 10:42:43 -080029LOCAL_PACKAGE_NAME := FrameworksServicesTests
30
Neal Nguyen3433d3c2010-02-02 17:09:00 -080031LOCAL_CERTIFICATE := platform
32
Robin Leecfe26692016-04-05 12:19:06 +010033# These are not normally accessible from apps so they must be explicitly included.
34LOCAL_JNI_SHARED_LIBRARIES := libservicestestsjni \
35 libbacktrace \
36 libbase \
37 libbinder \
Paul Jensen5f3dec32016-02-07 21:55:45 -050038 libc++ \
Robin Leecfe26692016-04-05 12:19:06 +010039 libcutils \
40 liblog \
41 liblzma \
42 libnativehelper \
43 libnetdaidl \
44 libui \
45 libunwind \
46 libutils
47
48LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Paul Jensend38fb7662016-01-07 23:13:19 -050049
Allen Hair77a51d12016-09-22 09:58:06 -070050# 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
Neal Nguyen1a44d5d2010-01-13 10:42:43 -080055include $(BUILD_PACKAGE)
56
Paul Jensend38fb7662016-01-07 23:13:19 -050057#########################################################################
58# Build JNI Shared Library
59#########################################################################
60
61LOCAL_PATH:= $(LOCAL_PATH)/jni
62
63include $(CLEAR_VARS)
64
65LOCAL_MODULE_TAGS := tests
66
Robin Leecfe26692016-04-05 12:19:06 +010067LOCAL_CFLAGS := -Wall -Wextra -Werror
Paul Jensend38fb7662016-01-07 23:13:19 -050068
69LOCAL_C_INCLUDES := \
70 libpcap \
71 hardware/google/apf
72
Robin Leecfe26692016-04-05 12:19:06 +010073LOCAL_SRC_FILES := $(call all-cpp-files-under)
Paul Jensend38fb7662016-01-07 23:13:19 -050074
75LOCAL_SHARED_LIBRARIES := \
Robin Leecfe26692016-04-05 12:19:06 +010076 libbinder \
77 libcutils \
Paul Jensend38fb7662016-01-07 23:13:19 -050078 libnativehelper \
Robin Leecfe26692016-04-05 12:19:06 +010079 libnetdaidl
Paul Jensend38fb7662016-01-07 23:13:19 -050080
81LOCAL_STATIC_LIBRARIES := \
82 libpcap \
83 libapf
84
Robin Leecfe26692016-04-05 12:19:06 +010085LOCAL_MODULE := libservicestestsjni
Paul Jensend38fb7662016-01-07 23:13:19 -050086
87include $(BUILD_SHARED_LIBRARY)