Paul Jensen | d38fb766 | 2016-01-07 23:13:19 -0500 | [diff] [blame] | 1 | ######################################################################### |
| 2 | # Build FrameworksServicesTests package |
| 3 | ######################################################################### |
| 4 | |
Neal Nguyen | 1a44d5d | 2010-01-13 10:42:43 -0800 | [diff] [blame] | 5 | LOCAL_PATH:= $(call my-dir) |
| 6 | include $(CLEAR_VARS) |
| 7 | |
| 8 | # We only want this apk build for tests. |
| 9 | LOCAL_MODULE_TAGS := tests |
| 10 | |
| 11 | # Include all test java files. |
| 12 | LOCAL_SRC_FILES := $(call all-java-files-under, src) |
| 13 | |
Jeff Sharkey | b7342ac | 2011-04-25 23:44:11 -0700 | [diff] [blame] | 14 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Christopher Wiley | 1cc6ffd | 2016-05-18 16:32:44 -0700 | [diff] [blame] | 15 | frameworks-base-testutils \ |
Phil Weaver | 8c1e36b | 2016-06-24 18:16:14 -0700 | [diff] [blame] | 16 | services.accessibility \ |
Sunny Goyal | 87a563e | 2017-01-01 19:42:45 -0800 | [diff] [blame^] | 17 | services.appwidget \ |
Narayan Kamath | d8b54e8 | 2014-08-21 12:25:24 +0100 | [diff] [blame] | 18 | services.core \ |
| 19 | services.devicepolicy \ |
Lorenzo Colitti | a12bde3 | 2015-03-31 16:26:57 +0900 | [diff] [blame] | 20 | services.net \ |
Sudheer Shanka | d9fcb69 | 2016-08-02 12:56:50 -0700 | [diff] [blame] | 21 | services.retaildemo \ |
Amith Yamasani | a93542f | 2016-02-03 18:02:06 -0800 | [diff] [blame] | 22 | services.usage \ |
Jeff Sharkey | fb878b6 | 2012-07-26 18:32:30 -0700 | [diff] [blame] | 23 | guava \ |
Xiaohui Chen | f86676a | 2015-08-19 13:30:07 -0700 | [diff] [blame] | 24 | android-support-test \ |
Guang Zhu | 01c560f | 2016-08-24 10:49:23 -0700 | [diff] [blame] | 25 | mockito-target-minus-junit4 \ |
Wale Ogunwale | 5fc7096 | 2016-09-09 22:36:19 -0700 | [diff] [blame] | 26 | platform-test-annotations \ |
Daniel Nishi | a59272e | 2016-12-12 15:16:00 -0800 | [diff] [blame] | 27 | ShortcutManagerTestUtils \ |
| 28 | truth-prebuilt |
Neal Nguyen | 1a44d5d | 2010-01-13 10:42:43 -0800 | [diff] [blame] | 29 | |
Narayan Kamath | d8b54e8 | 2014-08-21 12:25:24 +0100 | [diff] [blame] | 30 | LOCAL_JAVA_LIBRARIES := android.test.runner |
Svetoslav Ganov | 0b29a58 | 2010-04-16 18:52:49 -0700 | [diff] [blame] | 31 | |
Neal Nguyen | 1a44d5d | 2010-01-13 10:42:43 -0800 | [diff] [blame] | 32 | LOCAL_PACKAGE_NAME := FrameworksServicesTests |
| 33 | |
Neal Nguyen | 3433d3c | 2010-02-02 17:09:00 -0800 | [diff] [blame] | 34 | LOCAL_CERTIFICATE := platform |
| 35 | |
Robin Lee | cfe2669 | 2016-04-05 12:19:06 +0100 | [diff] [blame] | 36 | # These are not normally accessible from apps so they must be explicitly included. |
| 37 | LOCAL_JNI_SHARED_LIBRARIES := libservicestestsjni \ |
| 38 | libbacktrace \ |
| 39 | libbase \ |
| 40 | libbinder \ |
Paul Jensen | 5f3dec3 | 2016-02-07 21:55:45 -0500 | [diff] [blame] | 41 | libc++ \ |
Robin Lee | cfe2669 | 2016-04-05 12:19:06 +0100 | [diff] [blame] | 42 | libcutils \ |
| 43 | liblog \ |
| 44 | liblzma \ |
| 45 | libnativehelper \ |
| 46 | libnetdaidl \ |
| 47 | libui \ |
| 48 | libunwind \ |
| 49 | libutils |
| 50 | |
| 51 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Paul Jensen | d38fb766 | 2016-01-07 23:13:19 -0500 | [diff] [blame] | 52 | |
Allen Hair | aeaee4c | 2016-09-22 09:58:06 -0700 | [diff] [blame] | 53 | # Code coverage puts us over the dex limit, so enable multi-dex for coverage-enabled builds |
| 54 | ifeq (true,$(EMMA_INSTRUMENT)) |
| 55 | LOCAL_JACK_FLAGS := --multi-dex native |
| 56 | endif # EMMA_INSTRUMENT_STATIC |
| 57 | |
Jorim Jaggi | 7b61437 | 2016-09-28 15:17:50 +0200 | [diff] [blame] | 58 | LOCAL_STATIC_JAVA_LIBRARIES += ub-uiautomator |
| 59 | |
Neal Nguyen | 1a44d5d | 2010-01-13 10:42:43 -0800 | [diff] [blame] | 60 | include $(BUILD_PACKAGE) |
| 61 | |
Paul Jensen | d38fb766 | 2016-01-07 23:13:19 -0500 | [diff] [blame] | 62 | ######################################################################### |
| 63 | # Build JNI Shared Library |
| 64 | ######################################################################### |
| 65 | |
| 66 | LOCAL_PATH:= $(LOCAL_PATH)/jni |
| 67 | |
| 68 | include $(CLEAR_VARS) |
| 69 | |
| 70 | LOCAL_MODULE_TAGS := tests |
| 71 | |
Robin Lee | cfe2669 | 2016-04-05 12:19:06 +0100 | [diff] [blame] | 72 | LOCAL_CFLAGS := -Wall -Wextra -Werror |
Paul Jensen | d38fb766 | 2016-01-07 23:13:19 -0500 | [diff] [blame] | 73 | |
| 74 | LOCAL_C_INCLUDES := \ |
| 75 | libpcap \ |
| 76 | hardware/google/apf |
| 77 | |
Robin Lee | cfe2669 | 2016-04-05 12:19:06 +0100 | [diff] [blame] | 78 | LOCAL_SRC_FILES := $(call all-cpp-files-under) |
Paul Jensen | d38fb766 | 2016-01-07 23:13:19 -0500 | [diff] [blame] | 79 | |
| 80 | LOCAL_SHARED_LIBRARIES := \ |
Robin Lee | cfe2669 | 2016-04-05 12:19:06 +0100 | [diff] [blame] | 81 | libbinder \ |
Dimitry Ivanov | 1f34a1ba | 2016-09-23 17:20:32 -0700 | [diff] [blame] | 82 | liblog \ |
Robin Lee | cfe2669 | 2016-04-05 12:19:06 +0100 | [diff] [blame] | 83 | libcutils \ |
Paul Jensen | d38fb766 | 2016-01-07 23:13:19 -0500 | [diff] [blame] | 84 | libnativehelper \ |
Robin Lee | cfe2669 | 2016-04-05 12:19:06 +0100 | [diff] [blame] | 85 | libnetdaidl |
Paul Jensen | d38fb766 | 2016-01-07 23:13:19 -0500 | [diff] [blame] | 86 | |
| 87 | LOCAL_STATIC_LIBRARIES := \ |
| 88 | libpcap \ |
| 89 | libapf |
| 90 | |
Robin Lee | cfe2669 | 2016-04-05 12:19:06 +0100 | [diff] [blame] | 91 | LOCAL_MODULE := libservicestestsjni |
Paul Jensen | d38fb766 | 2016-01-07 23:13:19 -0500 | [diff] [blame] | 92 | |
| 93 | include $(BUILD_SHARED_LIBRARY) |