Carl Shapiro | 008e412 | 2011-06-23 17:27:46 -0700 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2011 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
| 16 | |
David Srbecky | 883c134 | 2020-05-11 23:30:29 +0000 | [diff] [blame] | 17 | # Build rules are excluded from Mac, since we can not run ART tests there in the first place. |
| 18 | ifneq ($(HOST_OS),darwin) |
| 19 | |
Bob Badour | 8da2614 | 2021-03-01 10:14:50 -0800 | [diff] [blame] | 20 | LOCAL_PATH := $(call my-dir) |
| 21 | |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 22 | ################################################################################################### |
| 23 | # Create module in testcases to hold all common data and tools needed for ART host tests. |
| 24 | |
| 25 | # ART binary tools and libraries (automatic list of all art_cc_binary/art_cc_library modules). |
| 26 | my_files := $(ART_TESTCASES_CONTENT) |
| 27 | |
| 28 | # Manually add system libraries that we need to run the host ART tools. |
| 29 | my_files += \ |
Victor Chang | 9c1c042 | 2020-10-05 13:17:02 +0100 | [diff] [blame] | 30 | $(foreach lib, libbacktrace libbase libc++ libicu libicu_jni liblog libsigchain libunwindstack \ |
David Srbecky | d5e776c | 2020-09-25 10:18:24 +0100 | [diff] [blame] | 31 | libziparchive libjavacore libandroidio libopenjdkd liblz4 liblzma, \ |
David Srbecky | beed922 | 2020-07-01 15:01:41 +0100 | [diff] [blame] | 32 | $(call intermediates-dir-for,SHARED_LIBRARIES,$(lib),HOST)/$(lib).so:lib64/$(lib).so \ |
| 33 | $(call intermediates-dir-for,SHARED_LIBRARIES,$(lib),HOST,,2ND)/$(lib).so:lib/$(lib).so) \ |
Victor Chang | 9c1c042 | 2020-10-05 13:17:02 +0100 | [diff] [blame] | 34 | $(foreach lib, libcrypto libz libicuuc libicui18n libexpat, \ |
David Srbecky | beed922 | 2020-07-01 15:01:41 +0100 | [diff] [blame] | 35 | $(call intermediates-dir-for,SHARED_LIBRARIES,$(lib),HOST)/$(lib).so:lib64/$(lib)-host.so \ |
| 36 | $(call intermediates-dir-for,SHARED_LIBRARIES,$(lib),HOST,,2ND)/$(lib).so:lib/$(lib)-host.so) |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 37 | |
| 38 | # Add apex directories for art, conscrypt and i18n. |
David Srbecky | 671d34d | 2020-07-02 12:23:28 +0100 | [diff] [blame] | 39 | icu_data_file := $(firstword $(wildcard external/icu/icu4c/source/stubdata/icu*.dat)) |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 40 | my_files += $(foreach infix,_ _VDEX_,$(foreach suffix,$(HOST_ARCH) $(HOST_2ND_ARCH), \ |
| 41 | $(DEXPREOPT_IMAGE$(infix)BUILT_INSTALLED_art_host_$(suffix)))) |
Jiakai Zhang | b978419 | 2021-12-13 14:11:43 +0000 | [diff] [blame] | 42 | # `dexpreopt_bootjars.go` uses a single source of input regardless of variants, so we should use the |
| 43 | # same source for `CORE_IMG_JARS` to avoid checksum mismatches on the oat files. We can still use |
| 44 | # the host variant of `conscrypt` and `core-icu4j` because they don't go into the primary boot image |
| 45 | # that is used in host gtests, and hence can't lead to checksum mismatches. |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 46 | my_files += \ |
| 47 | $(foreach jar,$(CORE_IMG_JARS),\ |
Jiakai Zhang | b978419 | 2021-12-13 14:11:43 +0000 | [diff] [blame] | 48 | $(OUT_DIR)/soong/$(PRODUCT_DEVICE)/dex_artjars_input/$(jar).jar:apex/com.android.art/javalib/$(jar).jar) \ |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 49 | $(HOST_OUT_JAVA_LIBRARIES)/conscrypt-hostdex.jar:apex/com.android.conscrypt/javalib/conscrypt.jar\ |
David Srbecky | 671d34d | 2020-07-02 12:23:28 +0100 | [diff] [blame] | 50 | $(HOST_OUT_JAVA_LIBRARIES)/core-icu4j-hostdex.jar:apex/com.android.i18n/javalib/core-icu4j.jar \ |
| 51 | $(icu_data_file):com.android.i18n/etc/icu/$(notdir $(icu_data_file)) |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 52 | |
David Srbecky | d3ee902 | 2020-07-27 16:05:38 +0100 | [diff] [blame] | 53 | # Create phony module that will copy all the data files into testcases directory. |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 54 | # For now, this copies everything to "out/host/linux-x86/" subdirectory, since it |
| 55 | # is hard-coded in many places. TODO: Refactor tests to remove the need for this. |
| 56 | include $(CLEAR_VARS) |
| 57 | LOCAL_IS_HOST_MODULE := true |
| 58 | LOCAL_MODULE := art_common |
Bob Badour | 9150de6 | 2021-02-26 03:22:24 -0800 | [diff] [blame] | 59 | LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 |
| 60 | LOCAL_LICENSE_CONDITIONS := notice |
| 61 | LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 62 | LOCAL_MODULE_TAGS := tests |
| 63 | LOCAL_MODULE_CLASS := NATIVE_TESTS |
| 64 | LOCAL_MODULE_SUFFIX := .txt |
Dan Shi | 8562f37 | 2020-10-19 10:51:40 -0700 | [diff] [blame] | 65 | LOCAL_COMPATIBILITY_SUITE := art-host-tests |
David Srbecky | b0713ca | 2020-07-01 15:04:39 +0100 | [diff] [blame] | 66 | LOCAL_COMPATIBILITY_SUPPORT_FILES := $(ART_TESTCASES_PREBUILT_CONTENT) \ |
David Srbecky | 1cf46a3 | 2020-06-22 15:39:00 +0100 | [diff] [blame] | 67 | $(foreach f,$(my_files),$(call word-colon,1,$f):out/host/linux-x86/$(call word-colon,2,$f)) |
| 68 | include $(BUILD_SYSTEM)/base_rules.mk |
| 69 | |
| 70 | $(LOCAL_BUILT_MODULE): |
| 71 | @mkdir -p $(dir $@) |
| 72 | echo "This directory contains common data and tools needed for ART host tests" > $@ |
| 73 | |
| 74 | my_files := |
| 75 | include $(CLEAR_VARS) |
| 76 | ################################################################################################### |
| 77 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 78 | # The path for which all the dex files are relative, not actually the current directory. |
| 79 | LOCAL_PATH := art/test |
| 80 | |
| 81 | include art/build/Android.common_test.mk |
| 82 | include art/build/Android.common_path.mk |
Alex Light | 50fa993 | 2015-08-10 15:30:07 -0700 | [diff] [blame] | 83 | include art/build/Android.common_build.mk |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 84 | |
David Srbecky | 928d28e | 2020-04-01 17:50:51 +0100 | [diff] [blame] | 85 | # Deprecated core.art dependencies. |
| 86 | HOST_CORE_IMAGE_DEFAULT_32 := |
| 87 | HOST_CORE_IMAGE_DEFAULT_64 := |
| 88 | TARGET_CORE_IMAGE_DEFAULT_32 := |
| 89 | TARGET_CORE_IMAGE_DEFAULT_64 := |
| 90 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 91 | # The elf writer test has dependencies on core.oat. |
Richard Uhler | 67e1dc5 | 2017-02-06 16:50:17 +0000 | [diff] [blame] | 92 | ART_GTEST_elf_writer_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32) |
| 93 | ART_GTEST_elf_writer_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_DEFAULT_64) $(TARGET_CORE_IMAGE_DEFAULT_32) |
Brian Carlstrom | 53463ea | 2014-11-09 14:11:51 -0800 | [diff] [blame] | 94 | |
Nicolas Geoffray | 975b774 | 2019-03-21 17:37:38 +0000 | [diff] [blame] | 95 | # The two_runtimes_test test has dependencies on core.oat. |
| 96 | ART_GTEST_two_runtimes_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32) |
| 97 | ART_GTEST_two_runtimes_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_DEFAULT_64) $(TARGET_CORE_IMAGE_DEFAULT_32) |
| 98 | |
Vladimir Marko | 672c080 | 2019-07-26 13:03:13 +0100 | [diff] [blame] | 99 | # The transaction test has dependencies on core.oat. |
| 100 | ART_GTEST_transaction_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32) |
| 101 | ART_GTEST_transaction_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_DEFAULT_64) $(TARGET_CORE_IMAGE_DEFAULT_32) |
| 102 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 103 | # The path for which all the source files are relative, not actually the current directory. |
Brian Carlstrom | 7940e44 | 2013-07-12 13:46:57 -0700 | [diff] [blame] | 104 | LOCAL_PATH := art |
| 105 | |
Victor Hsieh | 7a3ccd0 | 2021-09-08 11:59:29 -0700 | [diff] [blame] | 106 | ART_TEST_MODULES_COMMON := \ |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 107 | art_cmdline_tests \ |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 108 | art_compiler_host_tests \ |
Martin Stjernholm | 750bf04 | 2019-01-09 22:51:12 +0000 | [diff] [blame] | 109 | art_compiler_tests \ |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 110 | art_dex2oat_tests \ |
Mathieu Chartier | 2e0478a | 2018-04-06 14:33:25 -0700 | [diff] [blame] | 111 | art_dexanalyze_tests \ |
David Sehr | 55232f1 | 2017-04-19 14:06:49 -0700 | [diff] [blame] | 112 | art_dexdiag_tests \ |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 113 | art_dexdump_tests \ |
| 114 | art_dexlayout_tests \ |
| 115 | art_dexlist_tests \ |
Calin Juravle | 36eb313 | 2017-01-13 16:32:38 -0800 | [diff] [blame] | 116 | art_dexoptanalyzer_tests \ |
David Brazdil | 2b9c35b | 2018-01-12 15:44:43 +0000 | [diff] [blame] | 117 | art_hiddenapi_tests \ |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 118 | art_imgdiag_tests \ |
David Sehr | 67bf42e | 2018-02-26 16:43:04 -0800 | [diff] [blame] | 119 | art_libartbase_tests \ |
Orion Hodson | 119733d | 2019-01-30 15:14:41 +0000 | [diff] [blame] | 120 | art_libartpalette_tests \ |
Chris Wailes | bfd622a | 2021-01-13 16:13:41 -0800 | [diff] [blame] | 121 | art_libartservice_tests \ |
| 122 | art_libarttools_tests \ |
Martin Stjernholm | fdb2f60 | 2019-01-09 14:47:00 +0000 | [diff] [blame] | 123 | art_libdexfile_external_tests \ |
Martin Stjernholm | 70ae00d | 2019-02-15 22:41:14 +0000 | [diff] [blame] | 124 | art_libdexfile_support_static_tests \ |
Martin Stjernholm | 750bf04 | 2019-01-09 22:51:12 +0000 | [diff] [blame] | 125 | art_libdexfile_support_tests \ |
David Sehr | 334b9d7 | 2018-02-12 18:27:56 -0800 | [diff] [blame] | 126 | art_libdexfile_tests \ |
David Sehr | d5f8de8 | 2018-04-27 14:12:03 -0700 | [diff] [blame] | 127 | art_libprofile_tests \ |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 128 | art_oatdump_tests \ |
| 129 | art_profman_tests \ |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 130 | art_runtime_compiler_tests \ |
Martin Stjernholm | 750bf04 | 2019-01-09 22:51:12 +0000 | [diff] [blame] | 131 | art_runtime_tests \ |
Josh Gao | 1eac77e | 2018-02-26 15:54:41 -0800 | [diff] [blame] | 132 | art_sigchain_tests \ |
Brian Carlstrom | a1ce1fe | 2014-02-24 23:23:58 -0800 | [diff] [blame] | 133 | |
Victor Hsieh | 7a3ccd0 | 2021-09-08 11:59:29 -0700 | [diff] [blame] | 134 | ART_TEST_MODULES_TARGET := $(ART_TEST_MODULES_COMMON) art_odrefresh_tests |
| 135 | ART_TEST_MODULES_HOST := $(ART_TEST_MODULES_COMMON) |
| 136 | |
| 137 | ART_TARGET_GTEST_NAMES := $(foreach tm,$(ART_TEST_MODULES_TARGET),\ |
Jiyong Park | a599252 | 2020-01-07 16:55:09 +0900 | [diff] [blame] | 138 | $(foreach path,$(ART_TEST_LIST_device_$(TARGET_ARCH)_$(tm)),\ |
| 139 | $(notdir $(path))\ |
| 140 | )\ |
| 141 | ) |
Nicolas Geoffray | 340fb0b | 2019-12-30 10:36:22 +0000 | [diff] [blame] | 142 | |
Victor Hsieh | 7a3ccd0 | 2021-09-08 11:59:29 -0700 | [diff] [blame] | 143 | ART_HOST_GTEST_FILES := $(foreach m,$(ART_TEST_MODULES_HOST),\ |
Colin Cross | 124f881 | 2016-09-15 20:57:47 -0700 | [diff] [blame] | 144 | $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_$(m))) |
Alex Light | 50fa993 | 2015-08-10 15:30:07 -0700 | [diff] [blame] | 145 | |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 146 | ifneq ($(HOST_PREFER_32_BIT),true) |
Victor Hsieh | 7a3ccd0 | 2021-09-08 11:59:29 -0700 | [diff] [blame] | 147 | 2ND_ART_HOST_GTEST_FILES += $(foreach m,$(ART_TEST_MODULES_HOST),\ |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 148 | $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_$(m))) |
| 149 | endif |
| 150 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 151 | # Variables holding collections of gtest pre-requisits used to run a number of gtests. |
| 152 | ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES := |
| 153 | ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES := |
| 154 | ART_TEST_HOST_GTEST_RULES := |
Alex Light | d78be00 | 2020-09-01 07:49:21 -0700 | [diff] [blame] | 155 | ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES := |
| 156 | ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES := |
| 157 | ART_TEST_HOST_GTEST_BUILD_RULES := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 158 | ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES := |
| 159 | ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES := |
| 160 | ART_TEST_TARGET_GTEST_RULES := |
Alex Light | d78be00 | 2020-09-01 07:49:21 -0700 | [diff] [blame] | 161 | ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_BUILD_RULES := |
| 162 | ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_BUILD_RULES := |
| 163 | ART_TEST_TARGET_GTEST_BUILD_RULES := |
Nicolas Geoffray | 58035ae | 2015-05-27 19:10:27 +0100 | [diff] [blame] | 164 | ART_TEST_HOST_GTEST_DEPENDENCIES := |
Nicolas Geoffray | 17b1dcb | 2018-10-12 15:09:42 +0100 | [diff] [blame] | 165 | ART_TEST_TARGET_GTEST_DEPENDENCIES := |
Andreas Gampe | afbaa1a | 2014-03-25 18:09:32 -0700 | [diff] [blame] | 166 | |
Nicolas Geoffray | 96a37c8 | 2014-10-29 23:50:40 +0000 | [diff] [blame] | 167 | ART_GTEST_TARGET_ANDROID_ROOT := '/system' |
| 168 | ifneq ($(ART_TEST_ANDROID_ROOT),) |
| 169 | ART_GTEST_TARGET_ANDROID_ROOT := $(ART_TEST_ANDROID_ROOT) |
| 170 | endif |
| 171 | |
Victor Chang | 6461124 | 2019-07-05 16:32:41 +0100 | [diff] [blame] | 172 | ART_GTEST_TARGET_ANDROID_I18N_ROOT := '/apex/com.android.i18n' |
| 173 | ifneq ($(ART_TEST_ANDROID_I18N_ROOT),) |
| 174 | ART_GTEST_TARGET_ANDROID_I18N_ROOT := $(ART_TEST_ANDROID_I18N_ROOT) |
| 175 | endif |
| 176 | |
Martin Stjernholm | e58624f | 2019-09-20 15:53:40 +0100 | [diff] [blame] | 177 | ART_GTEST_TARGET_ANDROID_ART_ROOT := '/apex/com.android.art' |
| 178 | ifneq ($(ART_TEST_ANDROID_ART_ROOT),) |
| 179 | ART_GTEST_TARGET_ANDROID_ART_ROOT := $(ART_TEST_ANDROID_ART_ROOT) |
Roland Levillain | 7c777f8 | 2019-01-10 18:00:37 +0000 | [diff] [blame] | 180 | endif |
Neil Fuller | 26c4377 | 2018-11-23 17:56:43 +0000 | [diff] [blame] | 181 | |
Neil Fuller | 26a5dd6 | 2019-03-13 15:16:35 +0000 | [diff] [blame] | 182 | ART_GTEST_TARGET_ANDROID_TZDATA_ROOT := '/apex/com.android.tzdata' |
| 183 | ifneq ($(ART_TEST_ANDROID_TZDATA_ROOT),) |
| 184 | ART_GTEST_TARGET_ANDROID_TZDATA_ROOT := $(ART_TEST_ANDROID_TZDATA_ROOT) |
| 185 | endif |
| 186 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 187 | # Define make rules for a host gtests. |
| 188 | # $(1): gtest name - the name of the test we're building such as leb128_test. |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 189 | # $(2): path relative to $OUT to the test binary |
| 190 | # $(3): 2ND_ or undefined - used to differentiate between the primary and secondary architecture. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 191 | define define-art-gtest-rule-host |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 192 | gtest_suffix := $(1)$$($(3)ART_PHONY_TEST_HOST_SUFFIX) |
| 193 | gtest_rule := test-art-host-gtest-$$(gtest_suffix) |
Alex Light | d78be00 | 2020-09-01 07:49:21 -0700 | [diff] [blame] | 194 | gtest_build_rule := test-art-host-gtest-dependencies-$$(gtest_suffix) |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 195 | gtest_output := $(call intermediates-dir-for,PACKAGING,art-host-gtest,HOST)/$$(gtest_suffix).xml |
Dan Willemsen | 0ef9457 | 2018-10-21 19:00:56 +0000 | [diff] [blame] | 196 | $$(call dist-for-goals,$$(gtest_rule),$$(gtest_output):gtest/$$(gtest_suffix)) |
Bob Badour | f029520 | 2022-03-30 15:26:23 -0700 | [diff] [blame^] | 197 | $$(call declare-1p-target,$$(gtest_output)) |
Colin Cross | 8307206 | 2019-10-02 16:06:58 -0700 | [diff] [blame] | 198 | gtest_exe := $(2) |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 199 | # Dependencies for all host gtests. |
Nicolas Geoffray | d31cff1 | 2020-03-27 14:29:45 +0000 | [diff] [blame] | 200 | gtest_deps := $$(ART_HOST_DEX_DEPENDENCIES) \ |
David Srbecky | 883c134 | 2020-05-11 23:30:29 +0000 | [diff] [blame] | 201 | $$(ART_TEST_HOST_GTEST_DEPENDENCIES) \ |
Martin Stjernholm | 76228ff | 2020-07-16 22:17:09 +0100 | [diff] [blame] | 202 | $$(HOST_OUT)/$$(I18N_APEX)/timestamp \ |
David Srbecky | 0c0f302 | 2020-02-13 15:53:01 +0000 | [diff] [blame] | 203 | $$(HOST_BOOT_IMAGE_JARS) \ |
Victor Chang | 65ae669 | 2019-10-11 14:17:21 +0100 | [diff] [blame] | 204 | $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libicu_jni$$(ART_HOST_SHLIB_EXTENSION) \ |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 205 | $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$$(ART_HOST_SHLIB_EXTENSION) \ |
| 206 | $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$$(ART_HOST_SHLIB_EXTENSION) \ |
Nicolas Geoffray | 58035ae | 2015-05-27 19:10:27 +0100 | [diff] [blame] | 207 | $$(gtest_exe) \ |
| 208 | $$(ART_GTEST_$(1)_HOST_DEPS) \ |
Andreas Gampe | 28fd62a | 2018-12-12 15:15:22 -0800 | [diff] [blame] | 209 | $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_HOST_GTEST_$(file)_DEX)) \ |
Andreas Gampe | 148c160 | 2019-06-10 16:47:46 -0700 | [diff] [blame] | 210 | $(HOST_OUT_EXECUTABLES)/signal_dumper |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 211 | |
David Srbecky | 403384e | 2020-03-27 12:24:36 +0000 | [diff] [blame] | 212 | # Note: The "host arch" Make variables defined in build/make/core/envsetup.mk |
| 213 | # and art/build/Android.common.mk have different meanings: |
| 214 | # |
| 215 | # * In build/make/core/envsetup.mk: |
| 216 | # * HOST_ARCH := x86_64 |
| 217 | # * HOST_2ND_ARCH := x86 |
| 218 | # |
| 219 | # * In art/build/Android.common.mk: |
| 220 | # * When `HOST_PREFER_32_BIT` is `true`: |
| 221 | # * ART_HOST_ARCH := x86 |
| 222 | # * 2ND_ART_HOST_ARCH := |
| 223 | # * 2ND_HOST_ARCH := |
| 224 | # * Otherwise: |
| 225 | # * ART_HOST_ARCH := x86_64 |
| 226 | # * 2ND_ART_HOST_ARCH := x86 |
| 227 | # * 2ND_HOST_ARCH := x86 |
| 228 | ifeq ($(HOST_PREFER_32_BIT),true) |
| 229 | gtest_deps += $$(2ND_HOST_BOOT_IMAGE) # Depend on the 32-bit boot image. |
| 230 | else |
| 231 | gtest_deps += $$($(3)HOST_BOOT_IMAGE) |
| 232 | endif |
| 233 | |
Alex Light | d78be00 | 2020-09-01 07:49:21 -0700 | [diff] [blame] | 234 | .PHONY: $$(gtest_build_rule) |
| 235 | $$(gtest_build_rule) : $$(gtest_exe) $$(gtest_deps) |
| 236 | |
| 237 | |
Andreas Gampe | 6acebf4 | 2018-01-22 22:15:43 -0800 | [diff] [blame] | 238 | .PHONY: $$(gtest_rule) |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 239 | $$(gtest_rule): $$(gtest_output) |
| 240 | |
| 241 | # Re-run the tests, even if nothing changed. Until the build system has a dedicated "no cache" |
| 242 | # option, claim to write a file that is never produced. |
| 243 | $$(gtest_output): .KATI_IMPLICIT_OUTPUTS := $$(gtest_output)-nocache |
David Srbecky | 883c134 | 2020-05-11 23:30:29 +0000 | [diff] [blame] | 244 | # Limit concurrent runs. Each test itself is already highly parallel (and thus memory hungry). |
| 245 | $$(gtest_output): .KATI_NINJA_POOL := highmem_pool |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 246 | $$(gtest_output): NAME := $$(gtest_rule) |
Andreas Gampe | 6acebf4 | 2018-01-22 22:15:43 -0800 | [diff] [blame] | 247 | ifeq (,$(SANITIZE_HOST)) |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 248 | $$(gtest_output): $$(gtest_exe) $$(gtest_deps) |
Andreas Gampe | 28fd62a | 2018-12-12 15:15:22 -0800 | [diff] [blame] | 249 | $(hide) ($$(call ART_TEST_SKIP,$$(NAME)) && \ |
Andreas Gampe | 0df2aba | 2019-06-10 16:53:55 -0700 | [diff] [blame] | 250 | timeout --foreground -k 120s 2400s $(HOST_OUT_EXECUTABLES)/signal_dumper -s 15 \ |
Christopher Ferris | fc5e2ef | 2020-05-08 00:08:42 +0000 | [diff] [blame] | 251 | $$< --gtest_output=xml:$$@ && \ |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 252 | $$(call ART_TEST_PASSED,$$(NAME))) || $$(call ART_TEST_FAILED,$$(NAME)) |
Andreas Gampe | 6acebf4 | 2018-01-22 22:15:43 -0800 | [diff] [blame] | 253 | else |
Andreas Gampe | 0385805 | 2017-05-01 08:17:24 -0700 | [diff] [blame] | 254 | # Note: envsetup currently exports ASAN_OPTIONS=detect_leaks=0 to suppress leak detection, as some |
| 255 | # build tools (e.g., ninja) intentionally leak. We want leak checks when we run our tests, so |
| 256 | # override ASAN_OPTIONS. b/37751350 |
Andreas Gampe | 6acebf4 | 2018-01-22 22:15:43 -0800 | [diff] [blame] | 257 | # Note 2: Under sanitization, also capture the output, and run it through the stack tool on failure |
| 258 | # (with the x86-64 ABI, as this allows symbolization of both x86 and x86-64). We don't do this in |
| 259 | # general as it loses all the color output, and we have our own symbolization step when not running |
| 260 | # under ASAN. |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 261 | $$(gtest_output): $$(gtest_exe) $$(gtest_deps) |
| 262 | $(hide) ($$(call ART_TEST_SKIP,$$(NAME)) && set -o pipefail && \ |
Andreas Gampe | 0df2aba | 2019-06-10 16:53:55 -0700 | [diff] [blame] | 263 | ASAN_OPTIONS=detect_leaks=1 timeout --foreground -k 120s 3600s \ |
| 264 | $(HOST_OUT_EXECUTABLES)/signal_dumper -s 15 \ |
Andreas Gampe | 28fd62a | 2018-12-12 15:15:22 -0800 | [diff] [blame] | 265 | $$< --gtest_output=xml:$$@ 2>&1 | tee $$<.tmp.out >&2 && \ |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 266 | { $$(call ART_TEST_PASSED,$$(NAME)) ; rm $$<.tmp.out ; }) || \ |
Andreas Gampe | c05fd3f | 2018-01-23 14:22:07 -0800 | [diff] [blame] | 267 | ( grep -q AddressSanitizer $$<.tmp.out && export ANDROID_BUILD_TOP=`pwd` && \ |
Andreas Gampe | 6acebf4 | 2018-01-22 22:15:43 -0800 | [diff] [blame] | 268 | { echo "ABI: 'x86_64'" | cat - $$<.tmp.out | development/scripts/stack | tail -n 3000 ; } ; \ |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 269 | rm $$<.tmp.out ; $$(call ART_TEST_FAILED,$$(NAME))) |
Andreas Gampe | 6acebf4 | 2018-01-22 22:15:43 -0800 | [diff] [blame] | 270 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 271 | |
Colin Cross | 6e95dd5 | 2016-09-12 15:37:10 -0700 | [diff] [blame] | 272 | ART_TEST_HOST_GTEST$$($(3)ART_PHONY_TEST_HOST_SUFFIX)_RULES += $$(gtest_rule) |
Alex Light | d78be00 | 2020-09-01 07:49:21 -0700 | [diff] [blame] | 273 | ART_TEST_HOST_GTEST_BUILD_RULES += $$(gtest_build_rule) |
| 274 | ART_TEST_HOST_GTEST$$($(3)ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES += $$(gtest_build_rule) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 275 | ART_TEST_HOST_GTEST_RULES += $$(gtest_rule) |
| 276 | ART_TEST_HOST_GTEST_$(1)_RULES += $$(gtest_rule) |
| 277 | |
Andreas Gampe | 3c0bb31 | 2015-02-19 10:02:19 -0800 | [diff] [blame] | 278 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 279 | # Clear locally defined variables. |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 280 | gtest_deps := |
Roland Levillain | 76cfe61 | 2017-10-30 13:14:28 +0000 | [diff] [blame] | 281 | gtest_exe := |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 282 | gtest_output := |
Roland Levillain | 76cfe61 | 2017-10-30 13:14:28 +0000 | [diff] [blame] | 283 | gtest_rule := |
Dan Willemsen | db72e5e | 2018-10-02 14:09:21 -0700 | [diff] [blame] | 284 | gtest_suffix := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 285 | endef # define-art-gtest-rule-host |
| 286 | |
Nicolas Geoffray | 1525960 | 2020-07-30 09:31:15 +0100 | [diff] [blame] | 287 | ART_TEST_HOST_GTEST_DEPENDENCIES := $(HOST_I18N_DATA) |
David Srbecky | 4a88a5a | 2020-05-05 16:21:57 +0100 | [diff] [blame] | 288 | ART_TEST_TARGET_GTEST_DEPENDENCIES := $(TESTING_ART_APEX) |
David Srbecky | 883c134 | 2020-05-11 23:30:29 +0000 | [diff] [blame] | 289 | |
Jiyong Park | eac38a1 | 2020-01-03 17:56:33 +0900 | [diff] [blame] | 290 | # Add the additional dependencies for the specified test |
Nicolas Geoffray | 340fb0b | 2019-12-30 10:36:22 +0000 | [diff] [blame] | 291 | # $(1): test name |
Jiyong Park | eac38a1 | 2020-01-03 17:56:33 +0900 | [diff] [blame] | 292 | define add-art-gtest-dependencies |
Nicolas Geoffray | 340fb0b | 2019-12-30 10:36:22 +0000 | [diff] [blame] | 293 | # Note that, both the primary and the secondary arches of the libs are built by depending |
| 294 | # on the module name. |
| 295 | gtest_deps := \ |
| 296 | $$(ART_GTEST_$(1)_TARGET_DEPS) \ |
| 297 | $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_TARGET_GTEST_$(file)_DEX)) \ |
Brian Carlstrom | 0796af0 | 2011-10-12 14:31:45 -0700 | [diff] [blame] | 298 | |
Nicolas Geoffray | 340fb0b | 2019-12-30 10:36:22 +0000 | [diff] [blame] | 299 | ART_TEST_TARGET_GTEST_DEPENDENCIES += $$(gtest_deps) |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 300 | |
| 301 | # Clear locally defined variables. |
Nicolas Geoffray | 340fb0b | 2019-12-30 10:36:22 +0000 | [diff] [blame] | 302 | gtest_deps := |
Jiyong Park | eac38a1 | 2020-01-03 17:56:33 +0900 | [diff] [blame] | 303 | endef # add-art-gtest-dependencies |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 304 | |
| 305 | # $(1): file name |
| 306 | # $(2): 2ND_ or undefined - used to differentiate between the primary and secondary architecture. |
| 307 | define define-art-gtest-host |
| 308 | art_gtest_filename := $(1) |
| 309 | |
| 310 | include $$(CLEAR_VARS) |
| 311 | art_gtest_name := $$(notdir $$(basename $$(art_gtest_filename))) |
| 312 | ifndef ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES |
| 313 | ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES := |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 314 | endif |
| 315 | $$(eval $$(call define-art-gtest-rule-host,$$(art_gtest_name),$$(art_gtest_filename),$(2))) |
| 316 | |
| 317 | # Clear locally defined variables. |
| 318 | art_gtest_filename := |
| 319 | art_gtest_name := |
| 320 | endef # define-art-gtest-host |
| 321 | |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 322 | # Define the rules to build and run gtests for both archs on host. |
| 323 | # $(1): test name |
| 324 | define define-art-gtest-host-both |
| 325 | art_gtest_name := $(1) |
| 326 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 327 | .PHONY: test-art-host-gtest-$$(art_gtest_name) |
| 328 | test-art-host-gtest-$$(art_gtest_name): $$(ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES) |
| 329 | $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@) |
Ian Rogers | d912e5c | 2013-11-13 12:40:11 -0800 | [diff] [blame] | 330 | |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 331 | # Clear now unused variables. |
| 332 | ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 333 | art_gtest_name := |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 334 | endef # define-art-gtest-host-both |
Alex Light | 50fa993 | 2015-08-10 15:30:07 -0700 | [diff] [blame] | 335 | |
Brian Carlstrom | 4b620ff | 2011-09-11 01:11:01 -0700 | [diff] [blame] | 336 | ifeq ($(ART_BUILD_TARGET),true) |
Jiyong Park | eac38a1 | 2020-01-03 17:56:33 +0900 | [diff] [blame] | 337 | $(foreach name,$(ART_TARGET_GTEST_NAMES), $(eval $(call add-art-gtest-dependencies,$(name),))) |
| 338 | ART_TEST_TARGET_GTEST_DEPENDENCIES += \ |
Nicolas Geoffray | c69b3f8 | 2020-06-22 12:33:38 +0000 | [diff] [blame] | 339 | com.android.i18n \ |
Nicolas Geoffray | ec64f20 | 2020-04-20 15:05:54 +0100 | [diff] [blame] | 340 | libjavacore.com.android.art.testing \ |
| 341 | libopenjdkd.com.android.art.testing \ |
Nicolas Geoffray | 31e0dc2 | 2020-03-20 15:48:09 +0000 | [diff] [blame] | 342 | com.android.art.testing \ |
| 343 | com.android.conscrypt |
Brian Carlstrom | 4b620ff | 2011-09-11 01:11:01 -0700 | [diff] [blame] | 344 | endif |
Martin Stjernholm | 1dc77ab | 2021-05-10 17:44:05 +0100 | [diff] [blame] | 345 | ifeq ($(ART_BUILD_HOST),true) |
| 346 | $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),))) |
| 347 | ifneq ($(HOST_PREFER_32_BIT),true) |
| 348 | $(foreach file,$(2ND_ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),2ND_))) |
Nicolas Geoffray | 6bbea4c | 2016-09-16 16:41:43 +0100 | [diff] [blame] | 349 | endif |
Martin Stjernholm | 1dc77ab | 2021-05-10 17:44:05 +0100 | [diff] [blame] | 350 | # Rules to run the different architecture versions of the gtest. |
| 351 | $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host-both,$$(notdir $$(basename $$(file)))))) |
Brian Carlstrom | 07d579f | 2011-07-27 13:31:51 -0700 | [diff] [blame] | 352 | endif |
Tsu Chiang Chuang | ec245a4 | 2014-05-15 21:16:21 -0700 | [diff] [blame] | 353 | |
Roland Levillain | 05e34f4 | 2018-05-24 13:19:05 +0000 | [diff] [blame] | 354 | # Define all the combinations of host/target and suffix such as: |
| 355 | # test-art-host-gtest or test-art-host-gtest64 |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 356 | # $(1): host or target |
| 357 | # $(2): HOST or TARGET |
Roland Levillain | 05e34f4 | 2018-05-24 13:19:05 +0000 | [diff] [blame] | 358 | # $(3): undefined, 32 or 64 |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 359 | define define-test-art-gtest-combination |
| 360 | ifeq ($(1),host) |
| 361 | ifneq ($(2),HOST) |
| 362 | $$(error argument mismatch $(1) and ($2)) |
| 363 | endif |
| 364 | else |
| 365 | ifneq ($(1),target) |
| 366 | $$(error found $(1) expected host or target) |
| 367 | endif |
| 368 | ifneq ($(2),TARGET) |
| 369 | $$(error argument mismatch $(1) and ($2)) |
| 370 | endif |
| 371 | endif |
| 372 | |
Roland Levillain | 05e34f4 | 2018-05-24 13:19:05 +0000 | [diff] [blame] | 373 | rule_name := test-art-$(1)-gtest$(3) |
| 374 | dependencies := $$(ART_TEST_$(2)_GTEST$(3)_RULES) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 375 | |
| 376 | .PHONY: $$(rule_name) |
Søren Gjesse | 46845f6 | 2019-12-10 09:14:16 +0100 | [diff] [blame] | 377 | $$(rule_name): $$(dependencies) d8 |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 378 | $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@) |
| 379 | |
| 380 | # Clear locally defined variables. |
| 381 | rule_name := |
| 382 | dependencies := |
| 383 | endef # define-test-art-gtest-combination |
| 384 | |
Roland Levillain | 05e34f4 | 2018-05-24 13:19:05 +0000 | [diff] [blame] | 385 | $(eval $(call define-test-art-gtest-combination,target,TARGET,)) |
| 386 | $(eval $(call define-test-art-gtest-combination,target,TARGET,$(ART_PHONY_TEST_TARGET_SUFFIX))) |
Dan Willemsen | 5d2dbf8 | 2018-04-11 12:31:11 -0700 | [diff] [blame] | 387 | ifdef 2ND_ART_PHONY_TEST_TARGET_SUFFIX |
Roland Levillain | 05e34f4 | 2018-05-24 13:19:05 +0000 | [diff] [blame] | 388 | $(eval $(call define-test-art-gtest-combination,target,TARGET,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 389 | endif |
Roland Levillain | 05e34f4 | 2018-05-24 13:19:05 +0000 | [diff] [blame] | 390 | $(eval $(call define-test-art-gtest-combination,host,HOST,)) |
| 391 | $(eval $(call define-test-art-gtest-combination,host,HOST,$(ART_PHONY_TEST_HOST_SUFFIX))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 392 | ifneq ($(HOST_PREFER_32_BIT),true) |
Roland Levillain | 05e34f4 | 2018-05-24 13:19:05 +0000 | [diff] [blame] | 393 | $(eval $(call define-test-art-gtest-combination,host,HOST,$(2ND_ART_PHONY_TEST_HOST_SUFFIX))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 394 | endif |
| 395 | |
Alex Light | d78be00 | 2020-09-01 07:49:21 -0700 | [diff] [blame] | 396 | # Define all the combinations of host/target and suffix such as: |
| 397 | # test-art-host-gtest-dependencies or test-art-host-gtest-dependencies64 |
| 398 | # $(1): host or target |
| 399 | # $(2): HOST or TARGET |
| 400 | # $(3): undefined, 32 or 64 |
| 401 | define define-test-art-gtest-dependency-combination |
| 402 | ifeq ($(1),host) |
| 403 | ifneq ($(2),HOST) |
| 404 | $$(error argument mismatch $(1) and ($2)) |
| 405 | endif |
| 406 | else |
| 407 | ifneq ($(1),target) |
| 408 | $$(error found $(1) expected host or target) |
| 409 | endif |
| 410 | ifneq ($(2),TARGET) |
| 411 | $$(error argument mismatch $(1) and ($2)) |
| 412 | endif |
| 413 | endif |
| 414 | |
| 415 | rule_name := test-art-$(1)-gtest-dependencies$(3) |
| 416 | dependencies := $$(ART_TEST_$(2)_GTEST$(3)_BUILD_RULES) |
| 417 | |
| 418 | .PHONY: $$(rule_name) |
| 419 | $$(rule_name): $$(dependencies) d8 |
| 420 | |
| 421 | # Clear locally defined variables. |
| 422 | rule_name := |
| 423 | dependencies := |
| 424 | endef # define-test-art-gtest-dependency-combination |
| 425 | |
| 426 | # TODO Get target-deps working too |
| 427 | # $(eval $(call define-test-art-gtest-dependency-combination,target,TARGET,)) |
| 428 | # $(eval $(call define-test-art-gtest-dependency-combination,target,TARGET,$(ART_PHONY_TEST_TARGET_SUFFIX))) |
| 429 | # ifdef 2ND_ART_PHONY_TEST_TARGET_SUFFIX |
| 430 | # $(eval $(call define-test-art-gtest-dependency-combination,target,TARGET,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX))) |
| 431 | # endif |
| 432 | $(eval $(call define-test-art-gtest-dependency-combination,host,HOST,)) |
| 433 | $(eval $(call define-test-art-gtest-dependency-combination,host,HOST,$(ART_PHONY_TEST_HOST_SUFFIX))) |
| 434 | ifneq ($(HOST_PREFER_32_BIT),true) |
| 435 | $(eval $(call define-test-art-gtest-dependency-combination,host,HOST,$(2ND_ART_PHONY_TEST_HOST_SUFFIX))) |
| 436 | endif |
| 437 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 438 | # Clear locally defined variables. |
| 439 | define-art-gtest-rule-target := |
| 440 | define-art-gtest-rule-host := |
| 441 | define-art-gtest := |
| 442 | define-test-art-gtest-combination := |
| 443 | RUNTIME_GTEST_COMMON_SRC_FILES := |
| 444 | COMPILER_GTEST_COMMON_SRC_FILES := |
| 445 | RUNTIME_GTEST_TARGET_SRC_FILES := |
| 446 | RUNTIME_GTEST_HOST_SRC_FILES := |
| 447 | COMPILER_GTEST_TARGET_SRC_FILES := |
| 448 | COMPILER_GTEST_HOST_SRC_FILES := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 449 | ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES := |
| 450 | ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES := |
| 451 | ART_TEST_HOST_GTEST_RULES := |
Alex Light | d78be00 | 2020-09-01 07:49:21 -0700 | [diff] [blame] | 452 | ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES := |
| 453 | ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES := |
| 454 | ART_TEST_HOST_GTEST_BUILD_RULES := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 455 | ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES := |
| 456 | ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES := |
| 457 | ART_TEST_TARGET_GTEST_RULES := |
Alex Light | d78be00 | 2020-09-01 07:49:21 -0700 | [diff] [blame] | 458 | ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_BUILD_RULES := |
| 459 | ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_BUILD_RULES := |
| 460 | ART_TEST_TARGET_GTEST_BUILD_RULES := |
Nicolas Geoffray | 96a37c8 | 2014-10-29 23:50:40 +0000 | [diff] [blame] | 461 | ART_GTEST_TARGET_ANDROID_ROOT := |
Victor Chang | 6461124 | 2019-07-05 16:32:41 +0100 | [diff] [blame] | 462 | ART_GTEST_TARGET_ANDROID_I18N_ROOT := |
Martin Stjernholm | e58624f | 2019-09-20 15:53:40 +0100 | [diff] [blame] | 463 | ART_GTEST_TARGET_ANDROID_ART_ROOT := |
Neil Fuller | 26a5dd6 | 2019-03-13 15:16:35 +0000 | [diff] [blame] | 464 | ART_GTEST_TARGET_ANDROID_TZDATA_ROOT := |
Brian Carlstrom | eb85f2b | 2014-06-25 13:23:00 -0700 | [diff] [blame] | 465 | ART_GTEST_class_linker_test_DEX_DEPS := |
Mathieu Chartier | db70ce5 | 2016-12-12 11:06:59 -0800 | [diff] [blame] | 466 | ART_GTEST_class_table_test_DEX_DEPS := |
Brian Carlstrom | eb85f2b | 2014-06-25 13:23:00 -0700 | [diff] [blame] | 467 | ART_GTEST_compiler_driver_test_DEX_DEPS := |
| 468 | ART_GTEST_dex_file_test_DEX_DEPS := |
| 469 | ART_GTEST_exception_test_DEX_DEPS := |
| 470 | ART_GTEST_elf_writer_test_HOST_DEPS := |
| 471 | ART_GTEST_elf_writer_test_TARGET_DEPS := |
Andreas Gampe | a1ff30f | 2016-09-27 12:19:45 -0700 | [diff] [blame] | 472 | ART_GTEST_imtable_test_DEX_DEPS := |
Brian Carlstrom | eb85f2b | 2014-06-25 13:23:00 -0700 | [diff] [blame] | 473 | ART_GTEST_jni_compiler_test_DEX_DEPS := |
| 474 | ART_GTEST_jni_internal_test_DEX_DEPS := |
Richard Uhler | 66d874d | 2015-01-15 09:37:19 -0800 | [diff] [blame] | 475 | ART_GTEST_oat_file_assistant_test_DEX_DEPS := |
| 476 | ART_GTEST_oat_file_assistant_test_HOST_DEPS := |
| 477 | ART_GTEST_oat_file_assistant_test_TARGET_DEPS := |
Mathieu Chartier | 0be7fa7 | 2018-04-12 10:13:29 -0700 | [diff] [blame] | 478 | ART_GTEST_dexanalyze_test_DEX_DEPS := |
Calin Juravle | 36eb313 | 2017-01-13 16:32:38 -0800 | [diff] [blame] | 479 | ART_GTEST_dexoptanalyzer_test_DEX_DEPS := |
| 480 | ART_GTEST_dexoptanalyzer_test_HOST_DEPS := |
| 481 | ART_GTEST_dexoptanalyzer_test_TARGET_DEPS := |
Richard Uhler | 84f50ae | 2017-02-06 15:12:45 +0000 | [diff] [blame] | 482 | ART_GTEST_image_space_test_DEX_DEPS := |
| 483 | ART_GTEST_image_space_test_HOST_DEPS := |
| 484 | ART_GTEST_image_space_test_TARGET_DEPS := |
Andreas Gampe | e1459ae | 2016-06-29 09:36:30 -0700 | [diff] [blame] | 485 | ART_GTEST_dex2oat_test_DEX_DEPS := |
| 486 | ART_GTEST_dex2oat_test_HOST_DEPS := |
| 487 | ART_GTEST_dex2oat_test_TARGET_DEPS := |
Mathieu Chartier | f70fe3d | 2017-06-21 15:24:02 -0700 | [diff] [blame] | 488 | ART_GTEST_dex2oat_image_test_DEX_DEPS := |
| 489 | ART_GTEST_dex2oat_image_test_HOST_DEPS := |
| 490 | ART_GTEST_dex2oat_image_test_TARGET_DEPS := |
Brian Carlstrom | eb85f2b | 2014-06-25 13:23:00 -0700 | [diff] [blame] | 491 | ART_GTEST_object_test_DEX_DEPS := |
| 492 | ART_GTEST_proxy_test_DEX_DEPS := |
| 493 | ART_GTEST_reflection_test_DEX_DEPS := |
| 494 | ART_GTEST_stub_test_DEX_DEPS := |
| 495 | ART_GTEST_transaction_test_DEX_DEPS := |
Andreas Gampe | e1459ae | 2016-06-29 09:36:30 -0700 | [diff] [blame] | 496 | ART_GTEST_dex2oat_environment_tests_DEX_DEPS := |
Mathieu Chartier | 1ca6890 | 2017-04-18 11:26:22 -0700 | [diff] [blame] | 497 | ART_GTEST_heap_verification_test_DEX_DEPS := |
David Brazdil | ca3c8c3 | 2016-09-06 14:04:48 +0100 | [diff] [blame] | 498 | ART_GTEST_verifier_deps_test_DEX_DEPS := |
Ian Rogers | 1a2f84e | 2014-07-07 16:05:18 -0700 | [diff] [blame] | 499 | $(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_TARGET_GTEST_$(dir)_DEX :=)) |
| 500 | $(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_HOST_GTEST_$(dir)_DEX :=)) |
Richard Uhler | 66d874d | 2015-01-15 09:37:19 -0800 | [diff] [blame] | 501 | ART_TEST_HOST_GTEST_MainStripped_DEX := |
| 502 | ART_TEST_TARGET_GTEST_MainStripped_DEX := |
David Srbecky | 8c8f148 | 2020-02-05 20:17:10 +0000 | [diff] [blame] | 503 | ART_TEST_HOST_GTEST_MainUncompressedAligned_DEX := |
| 504 | ART_TEST_TARGET_GTEST_MainUncompressedAligned_DEX := |
Mathieu Chartier | 700a985 | 2018-02-06 18:27:38 -0800 | [diff] [blame] | 505 | ART_TEST_HOST_GTEST_EmptyUncompressed_DEX := |
| 506 | ART_TEST_TARGET_GTEST_EmptyUncompressed_DEX := |
David Brazdil | ca3c8c3 | 2016-09-06 14:04:48 +0100 | [diff] [blame] | 507 | ART_TEST_GTEST_VerifierDeps_SRC := |
| 508 | ART_TEST_HOST_GTEST_VerifierDeps_DEX := |
David Brazdil | f906f12 | 2016-09-16 16:33:31 +0100 | [diff] [blame] | 509 | ART_TEST_TARGET_GTEST_VerifierDeps_DEX := |
Vladimir Marko | d79b37b | 2018-11-02 13:06:22 +0000 | [diff] [blame] | 510 | ART_TEST_GTEST_VerifySoftFailDuringClinit_SRC := |
| 511 | ART_TEST_HOST_GTEST_VerifySoftFailDuringClinit_DEX := |
| 512 | ART_TEST_TARGET_GTEST_VerifySoftFailDuringClinit_DEX := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 513 | GTEST_DEX_DIRECTORIES := |
Brian Carlstrom | 532714a | 2014-06-25 02:15:31 -0700 | [diff] [blame] | 514 | LOCAL_PATH := |
David Srbecky | 883c134 | 2020-05-11 23:30:29 +0000 | [diff] [blame] | 515 | |
| 516 | endif # ifneq ($(HOST_OS),darwin) |