Ying Wang | 24162fc | 2012-01-10 15:03:28 -0800 | [diff] [blame] | 1 | ACTUAL_LOCAL_PATH := $(call my-dir) |
| 2 | |
| 3 | # this var will hold all the test apk module names later. |
| 4 | FrameworkCoreTests_all_apks := |
| 5 | |
| 6 | # We have to include the subdir makefiles first |
| 7 | # so that FrameworkCoreTests_all_apks will be populated correctly. |
| 8 | include $(call all-makefiles-under,$(ACTUAL_LOCAL_PATH)) |
| 9 | |
| 10 | LOCAL_PATH := $(ACTUAL_LOCAL_PATH) |
| 11 | |
Neal Nguyen | 22e31e5 | 2010-01-07 10:14:05 -0800 | [diff] [blame] | 12 | include $(CLEAR_VARS) |
| 13 | |
| 14 | # We only want this apk build for tests. |
| 15 | LOCAL_MODULE_TAGS := tests |
| 16 | |
| 17 | # Include all test java files. |
Neal Nguyen | 1a44d5d | 2010-01-13 10:42:43 -0800 | [diff] [blame] | 18 | LOCAL_SRC_FILES := \ |
| 19 | $(call all-java-files-under, src) \ |
Dan Egnor | 43fe81b | 2010-05-07 09:32:54 -0700 | [diff] [blame] | 20 | $(call all-Iaidl-files-under, src) \ |
Brett Chabot | 0dc59e7 | 2010-04-01 18:21:38 -0700 | [diff] [blame] | 21 | $(call all-java-files-under, DisabledTestApp/src) \ |
Michael Wachenschwanz | 5518246 | 2017-08-14 23:10:13 -0700 | [diff] [blame] | 22 | $(call all-java-files-under, EnabledTestApp/src) \ |
| 23 | $(call all-java-files-under, BinderProxyCountingTestApp/src) \ |
| 24 | $(call all-java-files-under, BinderProxyCountingTestService/src) \ |
| 25 | $(call all-Iaidl-files-under, aidl) |
| 26 | |
| 27 | LOCAL_AIDL_INCLUDES := $(LOCAL_PATH)/aidl |
Neal Nguyen | 22e31e5 | 2010-01-07 10:14:05 -0800 | [diff] [blame] | 28 | |
Colin Cross | be2d330 | 2016-12-21 16:48:32 -0800 | [diff] [blame] | 29 | LOCAL_DX_FLAGS := --core-library |
Paul Duffin | 5c318a0 | 2017-03-11 18:02:22 +0000 | [diff] [blame] | 30 | LOCAL_JACK_FLAGS := --multi-dex native |
Roozbeh Pournader | fb9236c | 2015-12-15 23:56:11 -0800 | [diff] [blame] | 31 | LOCAL_AAPT_FLAGS = -0 dat -0 gld -c fa |
Abodunrinwa Toki | 223c839 | 2015-07-24 20:55:59 -0700 | [diff] [blame] | 32 | LOCAL_STATIC_JAVA_LIBRARIES := \ |
Phil Weaver | b9f0612 | 2017-11-30 10:48:17 -0800 | [diff] [blame] | 33 | frameworks-base-testutils \ |
Abodunrinwa Toki | 223c839 | 2015-07-24 20:55:59 -0700 | [diff] [blame] | 34 | core-tests-support \ |
| 35 | android-common \ |
| 36 | frameworks-core-util-lib \ |
| 37 | mockwebserver \ |
| 38 | guava \ |
Abodunrinwa Toki | 223c839 | 2015-07-24 20:55:59 -0700 | [diff] [blame] | 39 | android-support-test \ |
Guang Zhu | 01c560f | 2016-08-24 10:49:23 -0700 | [diff] [blame] | 40 | mockito-target-minus-junit4 \ |
Philip P. Moltmann | 76d7e3e | 2016-01-15 13:22:13 -0800 | [diff] [blame] | 41 | espresso-core \ |
Chet Haase | 9392d40 | 2016-06-08 15:40:46 -0700 | [diff] [blame] | 42 | ub-uiautomator \ |
Chris Craik | 3f06c6d | 2017-01-09 18:19:48 +0000 | [diff] [blame] | 43 | platform-test-annotations \ |
Daniel Nishi | baa3811 | 2017-02-07 16:47:57 -0800 | [diff] [blame] | 44 | compatibility-device-util \ |
Philip P. Moltmann | 13fba9d | 2017-10-10 09:52:15 -0700 | [diff] [blame] | 45 | truth-prebuilt \ |
| 46 | print-test-util-lib |
Chris Craik | 3f06c6d | 2017-01-09 18:19:48 +0000 | [diff] [blame] | 47 | |
Paul Duffin | 2710ca1 | 2017-12-05 18:36:56 +0000 | [diff] [blame] | 48 | LOCAL_JAVA_LIBRARIES := \ |
| 49 | android.test.runner \ |
| 50 | conscrypt \ |
| 51 | telephony-common \ |
| 52 | org.apache.http.legacy \ |
| 53 | android.test.base \ |
| 54 | android.test.mock \ |
Paul Duffin | 0692a56 | 2018-01-09 12:35:32 +0000 | [diff] [blame] | 55 | framework-oahl-backward-compatibility \ |
Paul Duffin | a3b6921 | 2018-01-25 09:58:32 +0000 | [diff] [blame] | 56 | framework-atb-backward-compatibility \ |
Paul Duffin | beee5dc | 2018-01-23 13:39:00 +0000 | [diff] [blame] | 57 | |
Neal Nguyen | 22e31e5 | 2010-01-07 10:14:05 -0800 | [diff] [blame] | 58 | LOCAL_PACKAGE_NAME := FrameworksCoreTests |
Anton Hansson | ab6ec61 | 2018-02-23 12:57:51 +0000 | [diff] [blame] | 59 | LOCAL_PRIVATE_PLATFORM_APIS := true |
Simran Basi | 473a16e | 2017-03-15 14:43:58 -0700 | [diff] [blame] | 60 | LOCAL_COMPATIBILITY_SUITE := device-tests |
Neal Nguyen | 22e31e5 | 2010-01-07 10:14:05 -0800 | [diff] [blame] | 61 | |
Neal Nguyen | 1a44d5d | 2010-01-13 10:42:43 -0800 | [diff] [blame] | 62 | LOCAL_CERTIFICATE := platform |
| 63 | |
Ying Wang | 24162fc | 2012-01-10 15:03:28 -0800 | [diff] [blame] | 64 | # intermediate dir to include all the test apks as raw resource |
| 65 | FrameworkCoreTests_intermediates := $(call intermediates-dir-for,APPS,$(LOCAL_PACKAGE_NAME))/test_apks/res |
| 66 | LOCAL_RESOURCE_DIR := $(FrameworkCoreTests_intermediates) $(LOCAL_PATH)/res |
Neal Nguyen | 22e31e5 | 2010-01-07 10:14:05 -0800 | [diff] [blame] | 67 | |
Colin Cross | b3c1814 | 2018-05-18 09:50:29 -0700 | [diff] [blame] | 68 | # Disable AAPT2 because the hacks below depend on the AAPT rules implementation |
Colin Cross | 940b98e | 2018-05-16 09:21:18 -0700 | [diff] [blame] | 69 | LOCAL_USE_AAPT2 := false |
| 70 | |
Ying Wang | 24162fc | 2012-01-10 15:03:28 -0800 | [diff] [blame] | 71 | include $(BUILD_PACKAGE) |
| 72 | # Rules to copy all the test apks to the intermediate raw resource directory |
| 73 | FrameworkCoreTests_all_apks_res := $(addprefix $(FrameworkCoreTests_intermediates)/raw/, \ |
| 74 | $(foreach a, $(FrameworkCoreTests_all_apks), $(patsubst FrameworkCoreTests_%,%,$(a)))) |
| 75 | |
Dan Willemsen | 98ff0b7 | 2016-03-23 00:42:44 -0700 | [diff] [blame] | 76 | $(FrameworkCoreTests_all_apks_res): $(FrameworkCoreTests_intermediates)/raw/%: $(call intermediates-dir-for,APPS,FrameworkCoreTests_%)/package.apk |
Ying Wang | 24162fc | 2012-01-10 15:03:28 -0800 | [diff] [blame] | 77 | $(call copy-file-to-new-target) |
| 78 | |
| 79 | # Use R_file_stamp as dependency because we want the test apks in place before the R.java is generated. |
| 80 | $(R_file_stamp) : $(FrameworkCoreTests_all_apks_res) |
| 81 | |
| 82 | FrameworkCoreTests_all_apks := |
| 83 | FrameworkCoreTests_intermediates := |
| 84 | FrameworkCoreTests_all_apks_res := |