blob: 86983eb8b6ee58aa2922aaf10a9343b3ba6878c4 [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 Wiley1cc6ffd2016-05-18 16:32:44 -070015 frameworks-base-testutils \
Phil Weaver8c1e36b2016-06-24 18:16:14 -070016 services.accessibility \
Narayan Kamathd8b54e82014-08-21 12:25:24 +010017 services.core \
18 services.devicepolicy \
Lorenzo Colittia12bde32015-03-31 16:26:57 +090019 services.net \
Sudheer Shankad9fcb692016-08-02 12:56:50 -070020 services.retaildemo \
Amith Yamasania93542f2016-02-03 18:02:06 -080021 services.usage \
Jeff Sharkeyfb878b62012-07-26 18:32:30 -070022 guava \
Xiaohui Chenf86676a2015-08-19 13:30:07 -070023 android-support-test \
Guang Zhu01c560f2016-08-24 10:49:23 -070024 mockito-target-minus-junit4 \
Wale Ogunwale5fc70962016-09-09 22:36:19 -070025 platform-test-annotations \
Daniel Nishia59272e2016-12-12 15:16:00 -080026 ShortcutManagerTestUtils \
27 truth-prebuilt
Neal Nguyen1a44d5d2010-01-13 10:42:43 -080028
Narayan Kamathd8b54e82014-08-21 12:25:24 +010029LOCAL_JAVA_LIBRARIES := android.test.runner
Svetoslav Ganov0b29a582010-04-16 18:52:49 -070030
Neal Nguyen1a44d5d2010-01-13 10:42:43 -080031LOCAL_PACKAGE_NAME := FrameworksServicesTests
32
Neal Nguyen3433d3c2010-02-02 17:09:00 -080033LOCAL_CERTIFICATE := platform
34
Robin Leecfe26692016-04-05 12:19:06 +010035# These are not normally accessible from apps so they must be explicitly included.
36LOCAL_JNI_SHARED_LIBRARIES := libservicestestsjni \
37 libbacktrace \
38 libbase \
39 libbinder \
Paul Jensen5f3dec32016-02-07 21:55:45 -050040 libc++ \
Robin Leecfe26692016-04-05 12:19:06 +010041 libcutils \
42 liblog \
43 liblzma \
44 libnativehelper \
45 libnetdaidl \
46 libui \
47 libunwind \
48 libutils
49
50LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
Paul Jensend38fb7662016-01-07 23:13:19 -050051
Allen Hairaeaee4c2016-09-22 09:58:06 -070052# Code coverage puts us over the dex limit, so enable multi-dex for coverage-enabled builds
53ifeq (true,$(EMMA_INSTRUMENT))
54LOCAL_JACK_FLAGS := --multi-dex native
55endif # EMMA_INSTRUMENT_STATIC
56
Jorim Jaggi7b614372016-09-28 15:17:50 +020057LOCAL_STATIC_JAVA_LIBRARIES += ub-uiautomator
58
Neal Nguyen1a44d5d2010-01-13 10:42:43 -080059include $(BUILD_PACKAGE)
60
Paul Jensend38fb7662016-01-07 23:13:19 -050061#########################################################################
62# Build JNI Shared Library
63#########################################################################
64
65LOCAL_PATH:= $(LOCAL_PATH)/jni
66
67include $(CLEAR_VARS)
68
69LOCAL_MODULE_TAGS := tests
70
Robin Leecfe26692016-04-05 12:19:06 +010071LOCAL_CFLAGS := -Wall -Wextra -Werror
Paul Jensend38fb7662016-01-07 23:13:19 -050072
73LOCAL_C_INCLUDES := \
74 libpcap \
75 hardware/google/apf
76
Robin Leecfe26692016-04-05 12:19:06 +010077LOCAL_SRC_FILES := $(call all-cpp-files-under)
Paul Jensend38fb7662016-01-07 23:13:19 -050078
79LOCAL_SHARED_LIBRARIES := \
Robin Leecfe26692016-04-05 12:19:06 +010080 libbinder \
Dimitry Ivanov1f34a1ba2016-09-23 17:20:32 -070081 liblog \
Robin Leecfe26692016-04-05 12:19:06 +010082 libcutils \
Paul Jensend38fb7662016-01-07 23:13:19 -050083 libnativehelper \
Robin Leecfe26692016-04-05 12:19:06 +010084 libnetdaidl
Paul Jensend38fb7662016-01-07 23:13:19 -050085
86LOCAL_STATIC_LIBRARIES := \
87 libpcap \
88 libapf
89
Robin Leecfe26692016-04-05 12:19:06 +010090LOCAL_MODULE := libservicestestsjni
Paul Jensend38fb7662016-01-07 23:13:19 -050091
92include $(BUILD_SHARED_LIBRARY)