blob: f77193e105f15233ab886e05cb7bfdc7374d0bb7 [file] [log] [blame]
Carl Shapiro008e4122011-06-23 17:27:46 -07001#
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
Ian Rogersafd9acc2014-06-17 08:21:54 -070017# The path for which all the dex files are relative, not actually the current directory.
18LOCAL_PATH := art/test
19
20include art/build/Android.common_test.mk
21include art/build/Android.common_path.mk
Alex Light50fa9932015-08-10 15:30:07 -070022include art/build/Android.common_build.mk
Ian Rogersafd9acc2014-06-17 08:21:54 -070023
24# Subdirectories in art/test which contain dex files used as inputs for gtests.
25GTEST_DEX_DIRECTORIES := \
26 AbstractMethod \
27 AllFields \
28 ExceptionHandle \
29 GetMethodSignature \
Sebastien Hertz0462c4c2015-04-01 16:34:17 +020030 Instrumentation \
Ian Rogersafd9acc2014-06-17 08:21:54 -070031 Interfaces \
Artem Udovichenkod9786b02015-10-14 16:36:55 +030032 Lookup \
Ian Rogersafd9acc2014-06-17 08:21:54 -070033 Main \
Richard Uhler66d874d2015-01-15 09:37:19 -080034 MultiDex \
Richard Uhler67ff7d12015-05-14 13:21:13 -070035 MultiDexModifiedSecondary \
Ian Rogersafd9acc2014-06-17 08:21:54 -070036 MyClass \
37 MyClassNatives \
38 Nested \
39 NonStaticLeafMethods \
40 ProtoCompare \
41 ProtoCompare2 \
Calin Juravle877fd962016-01-05 14:29:29 +000042 ProfileTestMultiDex \
Ian Rogersafd9acc2014-06-17 08:21:54 -070043 StaticLeafMethods \
44 Statics \
45 StaticsFromCode \
46 Transaction \
47 XandY
48
49# Create build rules for each dex file recording the dependency.
50$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval $(call build-art-test-dex,art-gtest,$(dir), \
Ian Rogers1a2f84e2014-07-07 16:05:18 -070051 $(ART_TARGET_NATIVETEST_OUT),art/build/Android.gtest.mk,ART_TEST_TARGET_GTEST_$(dir)_DEX, \
52 ART_TEST_HOST_GTEST_$(dir)_DEX)))
Ian Rogersafd9acc2014-06-17 08:21:54 -070053
Richard Uhler66d874d2015-01-15 09:37:19 -080054# Create rules for MainStripped, a copy of Main with the classes.dex stripped
55# for the oat file assistant tests.
56ART_TEST_HOST_GTEST_MainStripped_DEX := $(basename $(ART_TEST_HOST_GTEST_Main_DEX))Stripped$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
57ART_TEST_TARGET_GTEST_MainStripped_DEX := $(basename $(ART_TEST_TARGET_GTEST_Main_DEX))Stripped$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
58
59$(ART_TEST_HOST_GTEST_MainStripped_DEX): $(ART_TEST_HOST_GTEST_Main_DEX)
60 cp $< $@
61 $(call dexpreopt-remove-classes.dex,$@)
62
63$(ART_TEST_TARGET_GTEST_MainStripped_DEX): $(ART_TEST_TARGET_GTEST_Main_DEX)
64 cp $< $@
65 $(call dexpreopt-remove-classes.dex,$@)
66
Ian Rogersafd9acc2014-06-17 08:21:54 -070067# Dex file dependencies for each gtest.
Andreas Gampee1459ae2016-06-29 09:36:30 -070068ART_GTEST_dex2oat_environment_tests_DEX_DEPS := Main MainStripped MultiDex MultiDexModifiedSecondary Nested
69
Andreas Gampe81c6f8d2015-03-25 17:19:53 -070070ART_GTEST_class_linker_test_DEX_DEPS := Interfaces MultiDex MyClass Nested Statics StaticsFromCode
Calin Juravle877fd962016-01-05 14:29:29 +000071ART_GTEST_compiler_driver_test_DEX_DEPS := AbstractMethod StaticLeafMethods ProfileTestMultiDex
Mathieu Chartierd57d4542015-10-14 10:55:30 -070072ART_GTEST_dex_cache_test_DEX_DEPS := Main
Andreas Gampeda823442014-11-03 15:36:53 -080073ART_GTEST_dex_file_test_DEX_DEPS := GetMethodSignature Main Nested
Andreas Gampee1459ae2016-06-29 09:36:30 -070074ART_GTEST_dex2oat_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
Brian Carlstromeb85f2b2014-06-25 13:23:00 -070075ART_GTEST_exception_test_DEX_DEPS := ExceptionHandle
Sebastien Hertz0462c4c2015-04-01 16:34:17 +020076ART_GTEST_instrumentation_test_DEX_DEPS := Instrumentation
Brian Carlstromeb85f2b2014-06-25 13:23:00 -070077ART_GTEST_jni_compiler_test_DEX_DEPS := MyClassNatives
78ART_GTEST_jni_internal_test_DEX_DEPS := AllFields StaticLeafMethods
Andreas Gampee1459ae2016-06-29 09:36:30 -070079ART_GTEST_oat_file_assistant_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
Andreas Gampe7848da42015-04-09 11:15:04 -070080ART_GTEST_oat_file_test_DEX_DEPS := Main MultiDex
Mathieu Chartier07ddb6f2015-11-05 11:16:34 -080081ART_GTEST_oat_test_DEX_DEPS := Main
Brian Carlstromeb85f2b2014-06-25 13:23:00 -070082ART_GTEST_object_test_DEX_DEPS := ProtoCompare ProtoCompare2 StaticsFromCode XandY
83ART_GTEST_proxy_test_DEX_DEPS := Interfaces
84ART_GTEST_reflection_test_DEX_DEPS := Main NonStaticLeafMethods StaticLeafMethods
Calin Juravle877fd962016-01-05 14:29:29 +000085ART_GTEST_profile_assistant_test_DEX_DEPS := ProfileTestMultiDex
86ART_GTEST_profile_compilation_info_test_DEX_DEPS := ProfileTestMultiDex
Brian Carlstromeb85f2b2014-06-25 13:23:00 -070087ART_GTEST_stub_test_DEX_DEPS := AllFields
88ART_GTEST_transaction_test_DEX_DEPS := Transaction
Artem Udovichenkod9786b02015-10-14 16:36:55 +030089ART_GTEST_type_lookup_table_test_DEX_DEPS := Lookup
Ian Rogersafd9acc2014-06-17 08:21:54 -070090
91# The elf writer test has dependencies on core.oat.
Andreas Gampec23c9c92014-10-28 14:47:25 -070092ART_GTEST_elf_writer_test_HOST_DEPS := $(HOST_CORE_IMAGE_default_no-pic_64) $(HOST_CORE_IMAGE_default_no-pic_32)
93ART_GTEST_elf_writer_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_default_no-pic_64) $(TARGET_CORE_IMAGE_default_no-pic_32)
Brian Carlstrom53463ea2014-11-09 14:11:51 -080094
Andreas Gampee1459ae2016-06-29 09:36:30 -070095ART_GTEST_dex2oat_environment_tests_HOST_DEPS := \
Richard Uhler9a44f872015-03-12 12:35:43 -070096 $(HOST_CORE_IMAGE_default_no-pic_64) \
Richard Uhlerf51ac422016-07-08 09:22:33 -070097 $(HOST_CORE_IMAGE_default_no-pic_32) \
98 $(HOST_OUT_EXECUTABLES)/patchoatd
Andreas Gampee1459ae2016-06-29 09:36:30 -070099ART_GTEST_dex2oat_environment_tests_TARGET_DEPS := \
Richard Uhler9a44f872015-03-12 12:35:43 -0700100 $(TARGET_CORE_IMAGE_default_no-pic_64) \
Richard Uhlerf51ac422016-07-08 09:22:33 -0700101 $(TARGET_CORE_IMAGE_default_no-pic_32) \
102 $(TARGET_OUT_EXECUTABLES)/patchoatd
Andreas Gampee1459ae2016-06-29 09:36:30 -0700103
104ART_GTEST_oat_file_assistant_test_HOST_DEPS := \
Richard Uhlerf51ac422016-07-08 09:22:33 -0700105 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
Andreas Gampee1459ae2016-06-29 09:36:30 -0700106ART_GTEST_oat_file_assistant_test_TARGET_DEPS := \
Richard Uhlerf51ac422016-07-08 09:22:33 -0700107 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
Andreas Gampee1459ae2016-06-29 09:36:30 -0700108
109
110ART_GTEST_dex2oat_test_HOST_DEPS := \
111 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
112ART_GTEST_dex2oat_test_TARGET_DEPS := \
113 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
Richard Uhler66d874d2015-01-15 09:37:19 -0800114
Brian Carlstrom53463ea2014-11-09 14:11:51 -0800115# TODO: document why this is needed.
Andreas Gampec23c9c92014-10-28 14:47:25 -0700116ART_GTEST_proxy_test_HOST_DEPS := $(HOST_CORE_IMAGE_default_no-pic_64) $(HOST_CORE_IMAGE_default_no-pic_32)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700117
Aart Bikcfbe53c2015-07-06 14:27:27 -0700118# The dexdump test requires an image and the dexdump utility.
Aart Bik22c26f52015-07-08 21:20:13 +0000119# TODO: rename into dexdump when migration completes
Aart Bikcfbe53c2015-07-06 14:27:27 -0700120ART_GTEST_dexdump_test_HOST_DEPS := \
121 $(HOST_CORE_IMAGE_default_no-pic_64) \
122 $(HOST_CORE_IMAGE_default_no-pic_32) \
Aart Bik22c26f52015-07-08 21:20:13 +0000123 $(HOST_OUT_EXECUTABLES)/dexdump2
Aart Bikcfbe53c2015-07-06 14:27:27 -0700124ART_GTEST_dexdump_test_TARGET_DEPS := \
125 $(TARGET_CORE_IMAGE_default_no-pic_64) \
126 $(TARGET_CORE_IMAGE_default_no-pic_32) \
Aart Bik22c26f52015-07-08 21:20:13 +0000127 dexdump2
Aart Bikcfbe53c2015-07-06 14:27:27 -0700128
Aart Bik3e40f4a2015-07-07 17:09:41 -0700129# The dexlist test requires an image and the dexlist utility.
Aart Bik3e40f4a2015-07-07 17:09:41 -0700130ART_GTEST_dexlist_test_HOST_DEPS := \
131 $(HOST_CORE_IMAGE_default_no-pic_64) \
132 $(HOST_CORE_IMAGE_default_no-pic_32) \
Aart Bikb1b45be2015-08-28 11:09:29 -0700133 $(HOST_OUT_EXECUTABLES)/dexlist
Aart Bik3e40f4a2015-07-07 17:09:41 -0700134ART_GTEST_dexlist_test_TARGET_DEPS := \
135 $(TARGET_CORE_IMAGE_default_no-pic_64) \
136 $(TARGET_CORE_IMAGE_default_no-pic_32) \
Aart Bikb1b45be2015-08-28 11:09:29 -0700137 dexlist
Aart Bik3e40f4a2015-07-07 17:09:41 -0700138
Igor Murashkin37743352014-11-13 14:38:00 -0800139# The imgdiag test has dependencies on core.oat since it needs to load it during the test.
Andreas Gampec93b8b52014-12-19 23:12:25 -0800140# For the host, also add the installed tool (in the base size, that should suffice). For the
141# target, just the module is fine, the sync will happen late enough.
142ART_GTEST_imgdiag_test_HOST_DEPS := \
143 $(HOST_CORE_IMAGE_default_no-pic_64) \
144 $(HOST_CORE_IMAGE_default_no-pic_32) \
145 $(HOST_OUT_EXECUTABLES)/imgdiagd
146ART_GTEST_imgdiag_test_TARGET_DEPS := \
147 $(TARGET_CORE_IMAGE_default_no-pic_64) \
148 $(TARGET_CORE_IMAGE_default_no-pic_32) \
149 imgdiagd
Igor Murashkin37743352014-11-13 14:38:00 -0800150
Mathieu Chartierea216b32015-05-26 19:48:16 -0700151# Oatdump test requires an image and oatfile to dump.
152ART_GTEST_oatdump_test_HOST_DEPS := \
153 $(HOST_CORE_IMAGE_default_no-pic_64) \
154 $(HOST_CORE_IMAGE_default_no-pic_32) \
155 $(HOST_OUT_EXECUTABLES)/oatdumpd
156ART_GTEST_oatdump_test_TARGET_DEPS := \
157 $(TARGET_CORE_IMAGE_default_no-pic_64) \
158 $(TARGET_CORE_IMAGE_default_no-pic_32) \
159 oatdump
160
Calin Juravle2e2db782016-02-23 12:00:03 +0000161# Profile assistant tests requires profman utility.
162ART_GTEST_profile_assistant_test_HOST_DEPS := \
163 $(HOST_OUT_EXECUTABLES)/profmand
164ART_GTEST_profile_assistant_test_TARGET_DEPS := \
165 profman
166
Ian Rogersafd9acc2014-06-17 08:21:54 -0700167# The path for which all the source files are relative, not actually the current directory.
Brian Carlstrom7940e442013-07-12 13:46:57 -0700168LOCAL_PATH := art
169
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800170RUNTIME_GTEST_COMMON_SRC_FILES := \
Igor Murashkinaaebaa02015-01-26 10:55:53 -0800171 cmdline/cmdline_parser_test.cc \
Aart Bik69ae54a2015-07-01 14:52:26 -0700172 dexdump/dexdump_test.cc \
Aart Bik3e40f4a2015-07-07 17:09:41 -0700173 dexlist/dexlist_test.cc \
Andreas Gampee1459ae2016-06-29 09:36:30 -0700174 dex2oat/dex2oat_test.cc \
Igor Murashkin37743352014-11-13 14:38:00 -0800175 imgdiag/imgdiag_test.cc \
Mathieu Chartier19510f02015-05-26 14:44:35 -0700176 oatdump/oatdump_test.cc \
Calin Juravle2e2db782016-02-23 12:00:03 +0000177 profman/profile_assistant_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700178 runtime/arch/arch_test.cc \
Ian Rogersd582fa42014-11-05 23:46:43 -0800179 runtime/arch/instruction_set_test.cc \
180 runtime/arch/instruction_set_features_test.cc \
Serban Constantinescu86797a72014-06-19 16:17:56 +0100181 runtime/arch/memcmp16_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700182 runtime/arch/stub_test.cc \
Ian Rogersd582fa42014-11-05 23:46:43 -0800183 runtime/arch/arm/instruction_set_features_arm_test.cc \
184 runtime/arch/arm64/instruction_set_features_arm64_test.cc \
185 runtime/arch/mips/instruction_set_features_mips_test.cc \
Andreas Gampe57b34292015-01-14 15:45:59 -0800186 runtime/arch/mips64/instruction_set_features_mips64_test.cc \
Ian Rogersd582fa42014-11-05 23:46:43 -0800187 runtime/arch/x86/instruction_set_features_x86_test.cc \
188 runtime/arch/x86_64/instruction_set_features_x86_64_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700189 runtime/barrier_test.cc \
Vladimir Marko3e0e7172016-04-22 18:07:13 +0100190 runtime/base/arena_allocator_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700191 runtime/base/bit_field_test.cc \
Vladimir Marko80afd022015-05-19 18:08:00 +0100192 runtime/base/bit_utils_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700193 runtime/base/bit_vector_test.cc \
Mathieu Chartierc2e20622014-11-03 11:41:47 -0800194 runtime/base/hash_set_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700195 runtime/base/hex_dump_test.cc \
196 runtime/base/histogram_test.cc \
197 runtime/base/mutex_test.cc \
198 runtime/base/scoped_flock_test.cc \
Brian Carlstrom2cbaccb2014-09-14 20:34:17 -0700199 runtime/base/stringprintf_test.cc \
Vladimir Marko80afd022015-05-19 18:08:00 +0100200 runtime/base/time_utils_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700201 runtime/base/timing_logger_test.cc \
Igor Murashkinaaebaa02015-01-26 10:55:53 -0800202 runtime/base/variant_map_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700203 runtime/base/unix_file/fd_file_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700204 runtime/class_linker_test.cc \
Andreas Gampe29d38e72016-03-23 15:31:51 +0000205 runtime/compiler_filter_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700206 runtime/dex_file_test.cc \
207 runtime/dex_file_verifier_test.cc \
Aart Bikb1f37532015-06-29 11:03:55 -0700208 runtime/dex_instruction_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700209 runtime/dex_instruction_visitor_test.cc \
210 runtime/dex_method_iterator_test.cc \
211 runtime/entrypoints/math_entrypoints_test.cc \
212 runtime/entrypoints/quick/quick_trampoline_entrypoints_test.cc \
213 runtime/entrypoints_order_test.cc \
Mathieu Chartier2c265012014-08-05 18:15:56 -0700214 runtime/gc/accounting/card_table_test.cc \
Mathieu Chartier4858a932015-01-23 13:18:53 -0800215 runtime/gc/accounting/mod_union_table_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700216 runtime/gc/accounting/space_bitmap_test.cc \
Mathieu Chartier763a31e2015-11-16 16:05:55 -0800217 runtime/gc/collector/immune_spaces_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700218 runtime/gc/heap_test.cc \
Mathieu Chartier9e2094f2014-12-11 18:43:48 -0800219 runtime/gc/reference_queue_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700220 runtime/gc/space/dlmalloc_space_static_test.cc \
221 runtime/gc/space/dlmalloc_space_random_test.cc \
Mathieu Chartier28b1cf72016-01-15 16:44:57 -0800222 runtime/gc/space/large_object_space_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700223 runtime/gc/space/rosalloc_space_static_test.cc \
224 runtime/gc/space/rosalloc_space_random_test.cc \
Mathieu Chartier28b1cf72016-01-15 16:44:57 -0800225 runtime/gc/space/space_create_test.cc \
Mathieu Chartiera5eae692014-12-17 17:56:03 -0800226 runtime/gc/task_processor_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700227 runtime/gtest_test.cc \
228 runtime/handle_scope_test.cc \
229 runtime/indenter_test.cc \
230 runtime/indirect_reference_table_test.cc \
Sebastien Hertz0462c4c2015-04-01 16:34:17 +0200231 runtime/instrumentation_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700232 runtime/intern_table_test.cc \
Ian Rogers5ac814a2014-11-04 16:39:32 -0800233 runtime/interpreter/safe_math_test.cc \
Andreas Gampe799681b2015-05-15 19:24:12 -0700234 runtime/interpreter/unstarted_runtime_test.cc \
Ian Rogersf4d4da12014-11-11 16:10:33 -0800235 runtime/java_vm_ext_test.cc \
Calin Juravle877fd962016-01-05 14:29:29 +0000236 runtime/jit/profile_compilation_info_test.cc \
Igor Murashkinfc1ccd72015-07-30 15:11:09 -0700237 runtime/lambda/closure_test.cc \
238 runtime/lambda/shorty_field_type_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700239 runtime/leb128_test.cc \
240 runtime/mem_map_test.cc \
Roland Levillaina2d8ec62015-03-12 15:25:29 +0000241 runtime/memory_region_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700242 runtime/mirror/dex_cache_test.cc \
243 runtime/mirror/object_test.cc \
Andreas Gampe74240812014-04-17 10:35:09 -0700244 runtime/monitor_pool_test.cc \
Elena Sayapina1af6a1f2014-06-20 16:58:37 +0700245 runtime/monitor_test.cc \
Richard Uhlere5fed032015-03-18 08:21:11 -0700246 runtime/oat_file_test.cc \
Richard Uhler66d874d2015-01-15 09:37:19 -0800247 runtime/oat_file_assistant_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700248 runtime/parsed_options_test.cc \
David Srbecky3e52aa42015-04-12 07:45:18 +0100249 runtime/prebuilt_tools_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700250 runtime/reference_table_test.cc \
251 runtime/thread_pool_test.cc \
252 runtime/transaction_test.cc \
Artem Udovichenkod9786b02015-10-14 16:36:55 +0300253 runtime/type_lookup_table_test.cc \
Narayan Kamatha5afcfc2015-01-29 20:06:46 +0000254 runtime/utf_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700255 runtime/utils_test.cc \
256 runtime/verifier/method_verifier_test.cc \
257 runtime/verifier/reg_type_test.cc \
258 runtime/zip_archive_test.cc
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800259
260COMPILER_GTEST_COMMON_SRC_FILES := \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700261 runtime/jni_internal_test.cc \
Jeff Haodb8a6642014-08-14 17:18:52 -0700262 runtime/proxy_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700263 runtime/reflection_test.cc \
Vladimir Marko35831e82015-09-11 11:59:18 +0100264 compiler/compiled_method_test.cc \
David Srbecky4fda4eb2016-02-05 13:34:46 +0000265 compiler/debug/dwarf/dwarf_test.cc \
Vladimir Marko35831e82015-09-11 11:59:18 +0100266 compiler/driver/compiled_method_storage_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700267 compiler/driver/compiler_driver_test.cc \
268 compiler/elf_writer_test.cc \
Vladimir Marko9d07e3d2016-03-31 12:02:28 +0100269 compiler/exception_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700270 compiler/image_test.cc \
271 compiler/jni/jni_compiler_test.cc \
Vladimir Marko944da602016-02-19 12:27:55 +0000272 compiler/linker/multi_oat_relative_patcher_test.cc \
Vladimir Marko131980f2015-12-03 18:29:23 +0000273 compiler/linker/output_stream_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700274 compiler/oat_test.cc \
Mingyao Yangf384f882014-10-22 16:08:18 -0700275 compiler/optimizing/bounds_check_elimination_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700276 compiler/optimizing/dominator_test.cc \
277 compiler/optimizing/find_loops_test.cc \
Roland Levillainccc07a92014-09-16 14:48:16 +0100278 compiler/optimizing/graph_checker_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700279 compiler/optimizing/graph_test.cc \
Nicolas Geoffrayd31cf3d2014-09-08 17:30:24 +0100280 compiler/optimizing/gvn_test.cc \
Aart Bik30efb4e2015-07-30 12:14:31 -0700281 compiler/optimizing/induction_var_analysis_test.cc \
Aart Bik22af3be2015-09-10 12:50:58 -0700282 compiler/optimizing/induction_var_range_test.cc \
Aart Bik3f307f32015-07-21 18:30:18 -0700283 compiler/optimizing/licm_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700284 compiler/optimizing/live_interval_test.cc \
Nicolas Geoffray724c9632014-09-22 12:27:27 +0100285 compiler/optimizing/nodes_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700286 compiler/optimizing/parallel_move_test.cc \
287 compiler/optimizing/pretty_printer_test.cc \
Aart Bik8b3f9b22016-04-06 11:22:12 -0700288 compiler/optimizing/reference_type_propagation_test.cc \
Aart Bik854a02b2015-07-14 16:07:00 -0700289 compiler/optimizing/side_effects_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700290 compiler/optimizing/ssa_test.cc \
Nicolas Geoffray99ea58c2014-07-02 15:08:17 +0100291 compiler/optimizing/stack_map_test.cc \
Nicolas Geoffrayfbc695f2014-09-15 15:33:30 +0000292 compiler/optimizing/suspend_check_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700293 compiler/utils/dedupe_set_test.cc \
Vladimir Marko46817b82016-03-29 12:21:58 +0100294 compiler/utils/intrusive_forward_list_test.cc \
Vladimir Marko4d2bb1b2016-06-24 11:56:59 +0100295 compiler/utils/string_reference_test.cc \
Andreas Gampee21dc3d2014-12-08 16:59:43 -0800296 compiler/utils/swap_space_test.cc \
Vladimir Markoc91df2d2015-04-23 09:29:21 +0000297 compiler/utils/test_dex_file_builder_test.cc \
Vladimir Marko372f10e2016-05-17 16:30:10 +0100298 compiler/utils/transform_array_ref_test.cc \
299 compiler/utils/transform_iterator_test.cc \
Alex Light50fa9932015-08-10 15:30:07 -0700300
301COMPILER_GTEST_COMMON_SRC_FILES_all := \
Alex Light50fa9932015-08-10 15:30:07 -0700302 compiler/jni/jni_cfi_test.cc \
303 compiler/optimizing/codegen_test.cc \
304 compiler/optimizing/constant_folding_test.cc \
305 compiler/optimizing/dead_code_elimination_test.cc \
306 compiler/optimizing/linearize_test.cc \
307 compiler/optimizing/liveness_test.cc \
308 compiler/optimizing/live_ranges_test.cc \
309 compiler/optimizing/optimizing_cfi_test.cc \
310 compiler/optimizing/register_allocator_test.cc \
311
312COMPILER_GTEST_COMMON_SRC_FILES_arm := \
313 compiler/linker/arm/relative_patcher_thumb2_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700314 compiler/utils/arm/managed_register_arm_test.cc \
Alex Light50fa9932015-08-10 15:30:07 -0700315
316COMPILER_GTEST_COMMON_SRC_FILES_arm64 := \
317 compiler/linker/arm64/relative_patcher_arm64_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700318 compiler/utils/arm64/managed_register_arm64_test.cc \
Alex Light50fa9932015-08-10 15:30:07 -0700319
320COMPILER_GTEST_COMMON_SRC_FILES_mips := \
Alexey Frunzee3fb2452016-05-10 16:08:05 -0700321 compiler/linker/mips/relative_patcher_mips_test.cc \
322 compiler/linker/mips/relative_patcher_mips32r6_test.cc \
Alex Light50fa9932015-08-10 15:30:07 -0700323
324COMPILER_GTEST_COMMON_SRC_FILES_mips64 := \
325
326COMPILER_GTEST_COMMON_SRC_FILES_x86 := \
327 compiler/linker/x86/relative_patcher_x86_test.cc \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700328 compiler/utils/x86/managed_register_x86_test.cc \
Brian Carlstrom51c24672013-07-11 16:00:56 -0700329
Alex Light50fa9932015-08-10 15:30:07 -0700330COMPILER_GTEST_COMMON_SRC_FILES_x86_64 := \
331 compiler/linker/x86_64/relative_patcher_x86_64_test.cc \
332
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800333RUNTIME_GTEST_TARGET_SRC_FILES := \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700334 $(RUNTIME_GTEST_COMMON_SRC_FILES)
Brian Carlstrom51c24672013-07-11 16:00:56 -0700335
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800336RUNTIME_GTEST_HOST_SRC_FILES := \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700337 $(RUNTIME_GTEST_COMMON_SRC_FILES)
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800338
339COMPILER_GTEST_TARGET_SRC_FILES := \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700340 $(COMPILER_GTEST_COMMON_SRC_FILES)
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800341
Alex Light50fa9932015-08-10 15:30:07 -0700342COMPILER_GTEST_TARGET_SRC_FILES_all := \
343 $(COMPILER_GTEST_COMMON_SRC_FILES_all) \
344
345COMPILER_GTEST_TARGET_SRC_FILES_arm := \
346 $(COMPILER_GTEST_COMMON_SRC_FILES_arm) \
347
348COMPILER_GTEST_TARGET_SRC_FILES_arm64 := \
349 $(COMPILER_GTEST_COMMON_SRC_FILES_arm64) \
350
351COMPILER_GTEST_TARGET_SRC_FILES_mips := \
352 $(COMPILER_GTEST_COMMON_SRC_FILES_mips) \
353
354COMPILER_GTEST_TARGET_SRC_FILES_mips64 := \
355 $(COMPILER_GTEST_COMMON_SRC_FILES_mips64) \
356
357COMPILER_GTEST_TARGET_SRC_FILES_x86 := \
358 $(COMPILER_GTEST_COMMON_SRC_FILES_x86) \
359
360COMPILER_GTEST_TARGET_SRC_FILES_x86_64 := \
361 $(COMPILER_GTEST_COMMON_SRC_FILES_x86_64) \
362
363$(foreach arch,$(ART_TARGET_CODEGEN_ARCHS),$(eval COMPILER_GTEST_TARGET_SRC_FILES += $$(COMPILER_GTEST_TARGET_SRC_FILES_$(arch))))
364ifeq (true,$(ART_TARGET_COMPILER_TESTS))
365 COMPILER_GTEST_TARGET_SRC_FILES += $(COMPILER_GTEST_TARGET_SRC_FILES_all)
366endif
367
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800368COMPILER_GTEST_HOST_SRC_FILES := \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700369 $(COMPILER_GTEST_COMMON_SRC_FILES) \
Alex Light50fa9932015-08-10 15:30:07 -0700370
371COMPILER_GTEST_HOST_SRC_FILES_all := \
372 $(COMPILER_GTEST_COMMON_SRC_FILES_all) \
373
374COMPILER_GTEST_HOST_SRC_FILES_arm := \
375 $(COMPILER_GTEST_COMMON_SRC_FILES_arm) \
Roland Levillain1a28fc42014-11-13 18:03:06 +0000376 compiler/utils/arm/assembler_arm32_test.cc \
377 compiler/utils/arm/assembler_thumb2_test.cc \
378 compiler/utils/assembler_thumb_test.cc \
Alex Light50fa9932015-08-10 15:30:07 -0700379
380COMPILER_GTEST_HOST_SRC_FILES_arm64 := \
381 $(COMPILER_GTEST_COMMON_SRC_FILES_arm64) \
382
383COMPILER_GTEST_HOST_SRC_FILES_mips := \
384 $(COMPILER_GTEST_COMMON_SRC_FILES_mips) \
Goran Jakovljevic8c434dc2015-08-26 14:39:44 +0200385 compiler/utils/mips/assembler_mips_test.cc \
Chris Larsen3add9cb2016-04-14 14:01:33 -0700386 compiler/utils/mips/assembler_mips32r6_test.cc \
Alex Light50fa9932015-08-10 15:30:07 -0700387
388COMPILER_GTEST_HOST_SRC_FILES_mips64 := \
389 $(COMPILER_GTEST_COMMON_SRC_FILES_mips64) \
Chris Larsendbce0d72015-09-17 13:34:00 -0700390 compiler/utils/mips64/assembler_mips64_test.cc \
Alex Light50fa9932015-08-10 15:30:07 -0700391
392COMPILER_GTEST_HOST_SRC_FILES_x86 := \
393 $(COMPILER_GTEST_COMMON_SRC_FILES_x86) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700394 compiler/utils/x86/assembler_x86_test.cc \
Alex Light50fa9932015-08-10 15:30:07 -0700395
396COMPILER_GTEST_HOST_SRC_FILES_x86_64 := \
397 $(COMPILER_GTEST_COMMON_SRC_FILES_x86_64) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700398 compiler/utils/x86_64/assembler_x86_64_test.cc
Brian Carlstrom8ecd08c2011-07-27 17:50:51 -0700399
Alex Light50fa9932015-08-10 15:30:07 -0700400$(foreach arch,$(ART_HOST_CODEGEN_ARCHS),$(eval COMPILER_GTEST_HOST_SRC_FILES += $$(COMPILER_GTEST_HOST_SRC_FILES_$(arch))))
401ifeq (true,$(ART_HOST_COMPILER_TESTS))
402 COMPILER_GTEST_HOST_SRC_FILES += $(COMPILER_GTEST_HOST_SRC_FILES_all)
403endif
404
Shih-wei Liaoc4c98812012-03-10 21:55:51 -0800405ART_TEST_CFLAGS :=
buzbee2cfc6392012-05-07 14:51:40 -0700406
Ian Rogerse63db272014-07-15 15:36:11 -0700407include $(CLEAR_VARS)
408LOCAL_MODULE := libart-gtest
409LOCAL_MODULE_TAGS := optional
410LOCAL_CPP_EXTENSION := cc
Ian Rogerse63db272014-07-15 15:36:11 -0700411LOCAL_SRC_FILES := runtime/common_runtime_test.cc compiler/common_compiler_test.cc
Vladimir Marko88b2b802015-12-04 14:19:04 +0000412LOCAL_C_INCLUDES := $(ART_C_INCLUDES) art/runtime art/cmdline art/compiler
Ian Rogers872dd822014-10-30 11:19:14 -0700413LOCAL_SHARED_LIBRARIES := libartd libartd-compiler libdl
Dan Albertfd84f662014-11-11 18:53:41 -0800414LOCAL_STATIC_LIBRARIES += libgtest
Ian Rogerse63db272014-07-15 15:36:11 -0700415LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk
416LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.gtest.mk
Andreas Gampebced67d2015-01-07 14:35:44 -0800417$(eval $(call set-target-local-clang-vars))
418$(eval $(call set-target-local-cflags-vars,debug))
Andreas Gampe9b14dc32015-04-06 15:35:02 -0700419LOCAL_CLANG_CFLAGS += -Wno-used-but-marked-unused -Wno-deprecated -Wno-missing-noreturn # gtest issue
Ian Rogerse63db272014-07-15 15:36:11 -0700420include $(BUILD_SHARED_LIBRARY)
421
422include $(CLEAR_VARS)
423LOCAL_MODULE := libart-gtest
424LOCAL_MODULE_TAGS := optional
425LOCAL_CPP_EXTENSION := cc
426LOCAL_CFLAGS := $(ART_HOST_CFLAGS)
Roland Levillain12bd7212015-06-04 17:50:27 +0100427LOCAL_ASFLAGS := $(ART_HOST_ASFLAGS)
Ian Rogerse63db272014-07-15 15:36:11 -0700428LOCAL_SRC_FILES := runtime/common_runtime_test.cc compiler/common_compiler_test.cc
Vladimir Marko88b2b802015-12-04 14:19:04 +0000429LOCAL_C_INCLUDES := $(ART_C_INCLUDES) art/runtime art/cmdline art/compiler
Ian Rogerse63db272014-07-15 15:36:11 -0700430LOCAL_SHARED_LIBRARIES := libartd libartd-compiler
Nicolas Geoffray10fc34b2014-11-10 21:38:15 +0000431LOCAL_STATIC_LIBRARIES := libgtest_host
Ian Rogerse63db272014-07-15 15:36:11 -0700432LOCAL_LDLIBS += -ldl -lpthread
433LOCAL_MULTILIB := both
434LOCAL_CLANG := $(ART_HOST_CLANG)
Andreas Gampe9b14dc32015-04-06 15:35:02 -0700435LOCAL_CLANG_CFLAGS += -Wno-used-but-marked-unused -Wno-deprecated -Wno-missing-noreturn # gtest issue
Ian Rogerse63db272014-07-15 15:36:11 -0700436LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk
437LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.gtest.mk
Ian Rogerse63db272014-07-15 15:36:11 -0700438include $(BUILD_HOST_SHARED_LIBRARY)
439
Ian Rogersafd9acc2014-06-17 08:21:54 -0700440# Variables holding collections of gtest pre-requisits used to run a number of gtests.
441ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
442ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
443ART_TEST_HOST_GTEST_RULES :=
444ART_TEST_HOST_VALGRIND_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
445ART_TEST_HOST_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
446ART_TEST_HOST_VALGRIND_GTEST_RULES :=
447ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
448ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
449ART_TEST_TARGET_GTEST_RULES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100450ART_TEST_TARGET_VALGRIND_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
451ART_TEST_TARGET_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
452ART_TEST_TARGET_VALGRIND_GTEST_RULES :=
Nicolas Geoffray58035ae2015-05-27 19:10:27 +0100453ART_TEST_HOST_GTEST_DEPENDENCIES :=
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700454
Nicolas Geoffray96a37c82014-10-29 23:50:40 +0000455ART_GTEST_TARGET_ANDROID_ROOT := '/system'
456ifneq ($(ART_TEST_ANDROID_ROOT),)
457 ART_GTEST_TARGET_ANDROID_ROOT := $(ART_TEST_ANDROID_ROOT)
458endif
459
Anton Kirilove5e76f42016-05-03 16:15:36 +0100460ART_VALGRIND_TARGET_DEPENDENCIES := \
461 $(TARGET_OUT_EXECUTABLES)/valgrind \
462 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/memcheck-$(TARGET_ARCH)-linux \
463 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_core-$(TARGET_ARCH)-linux.so \
464 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_memcheck-$(TARGET_ARCH)-linux.so \
465 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/default.supp
466
467ifdef TARGET_2ND_ARCH
468ART_VALGRIND_TARGET_DEPENDENCIES += \
469 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/memcheck-$(TARGET_2ND_ARCH)-linux \
470 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_core-$(TARGET_2ND_ARCH)-linux.so \
471 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_memcheck-$(TARGET_2ND_ARCH)-linux.so
472endif
473
474include $(CLEAR_VARS)
475LOCAL_MODULE := valgrind-target-suppressions.txt
476LOCAL_MODULE_CLASS := ETC
477LOCAL_MODULE_TAGS := optional
478LOCAL_SRC_FILES := test/valgrind-target-suppressions.txt
479LOCAL_MODULE_PATH := $(ART_TARGET_TEST_OUT)
480include $(BUILD_PREBUILT)
481
Ian Rogersafd9acc2014-06-17 08:21:54 -0700482# Define a make rule for a target device gtest.
483# $(1): gtest name - the name of the test we're building such as leb128_test.
484# $(2): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
Nicolas Geoffray9eb40742014-10-29 22:38:53 +0000485# $(3): LD_LIBRARY_PATH or undefined - used in case libartd.so is not in /system/lib/
Ian Rogersafd9acc2014-06-17 08:21:54 -0700486define define-art-gtest-rule-target
487 gtest_rule := test-art-target-gtest-$(1)$$($(2)ART_PHONY_TEST_TARGET_SUFFIX)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700488
Brian Carlstrom532714a2014-06-25 02:15:31 -0700489 # Add the test dependencies to test-art-target-sync, which will be a prerequisite for the test
Ian Rogersafd9acc2014-06-17 08:21:54 -0700490 # to ensure files are pushed to the device.
491 TEST_ART_TARGET_SYNC_DEPS += \
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700492 $$(ART_GTEST_$(1)_TARGET_DEPS) \
Ian Rogers1a2f84e2014-07-07 16:05:18 -0700493 $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_TARGET_GTEST_$(file)_DEX)) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700494 $$(ART_TARGET_NATIVETEST_OUT)/$$(TARGET_$(2)ARCH)/$(1) \
Nicolas Geoffray96a63452014-10-30 12:13:17 +0000495 $$($(2)TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so \
Andreas Gampe10edbb12016-01-06 17:59:49 -0800496 $$($(2)TARGET_OUT_SHARED_LIBRARIES)/libopenjdkd.so \
Andreas Gampec7d4a582015-09-30 11:52:02 -0700497 $$(TARGET_OUT_JAVA_LIBRARIES)/core-libart-testdex.jar \
Anton Kirilove5e76f42016-05-03 16:15:36 +0100498 $$(TARGET_OUT_JAVA_LIBRARIES)/core-oj-testdex.jar \
499 $$(ART_TARGET_TEST_OUT)/valgrind-target-suppressions.txt
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700500
Ian Rogersafd9acc2014-06-17 08:21:54 -0700501.PHONY: $$(gtest_rule)
502$$(gtest_rule): test-art-target-sync
503 $(hide) adb shell touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(2)ARCH)/$$@-$$$$PPID
504 $(hide) adb shell rm $(ART_TARGET_TEST_DIR)/$(TARGET_$(2)ARCH)/$$@-$$$$PPID
505 $(hide) adb shell chmod 755 $(ART_TARGET_NATIVETEST_DIR)/$(TARGET_$(2)ARCH)/$(1)
506 $(hide) $$(call ART_TEST_SKIP,$$@) && \
Dan Albert31fb2602014-09-30 22:10:10 -0700507 (adb shell "$(GCOV_ENV) LD_LIBRARY_PATH=$(3) ANDROID_ROOT=$(ART_GTEST_TARGET_ANDROID_ROOT) \
Nicolas Geoffray9eb40742014-10-29 22:38:53 +0000508 $(ART_TARGET_NATIVETEST_DIR)/$(TARGET_$(2)ARCH)/$(1) && touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(2)ARCH)/$$@-$$$$PPID" \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700509 && (adb pull $(ART_TARGET_TEST_DIR)/$(TARGET_$(2)ARCH)/$$@-$$$$PPID /tmp/ \
510 && $$(call ART_TEST_PASSED,$$@)) \
511 || $$(call ART_TEST_FAILED,$$@))
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700512 $(hide) rm -f /tmp/$$@-$$$$PPID
Ian Rogersafd9acc2014-06-17 08:21:54 -0700513
514 ART_TEST_TARGET_GTEST$($(2)ART_PHONY_TEST_TARGET_SUFFIX)_RULES += $$(gtest_rule)
515 ART_TEST_TARGET_GTEST_RULES += $$(gtest_rule)
516 ART_TEST_TARGET_GTEST_$(1)_RULES += $$(gtest_rule)
517
Anton Kirilove5e76f42016-05-03 16:15:36 +0100518.PHONY: valgrind-$$(gtest_rule)
519valgrind-$$(gtest_rule): $(ART_VALGRIND_TARGET_DEPENDENCIES) test-art-target-sync
520 $(hide) adb shell touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(2)ARCH)/$$@-$$$$PPID
521 $(hide) adb shell rm $(ART_TARGET_TEST_DIR)/$(TARGET_$(2)ARCH)/$$@-$$$$PPID
522 $(hide) adb shell chmod 755 $(ART_TARGET_NATIVETEST_DIR)/$(TARGET_$(2)ARCH)/$(1)
523 $(hide) $$(call ART_TEST_SKIP,$$@) && \
524 (adb shell "$(GCOV_ENV) LD_LIBRARY_PATH=$(3) ANDROID_ROOT=$(ART_GTEST_TARGET_ANDROID_ROOT) \
525 valgrind --leak-check=full --error-exitcode=1 --workaround-gcc296-bugs=yes \
526 --suppressions=$(ART_TARGET_TEST_DIR)/valgrind-target-suppressions.txt \
527 $(ART_TARGET_NATIVETEST_DIR)/$(TARGET_$(2)ARCH)/$(1) && touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(2)ARCH)/$$@-$$$$PPID" \
528 && (adb pull $(ART_TARGET_TEST_DIR)/$(TARGET_$(2)ARCH)/$$@-$$$$PPID /tmp/ \
529 && $$(call ART_TEST_PASSED,$$@)) \
530 || $$(call ART_TEST_FAILED,$$@))
531 $(hide) rm -f /tmp/$$@-$$$$PPID
532
533 ART_TEST_TARGET_VALGRIND_GTEST$$($(2)ART_PHONY_TEST_TARGET_SUFFIX)_RULES += valgrind-$$(gtest_rule)
534 ART_TEST_TARGET_VALGRIND_GTEST_RULES += valgrind-$$(gtest_rule)
535 ART_TEST_TARGET_VALGRIND_GTEST_$(1)_RULES += valgrind-$$(gtest_rule)
536
Ian Rogersafd9acc2014-06-17 08:21:54 -0700537 # Clear locally defined variables.
Anton Kirilove5e76f42016-05-03 16:15:36 +0100538 valgrind_gtest_rule :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700539 gtest_rule :=
540endef # define-art-gtest-rule-target
541
Andreas Gampe3c0bb312015-02-19 10:02:19 -0800542ART_VALGRIND_DEPENDENCIES := \
543 $(HOST_OUT_EXECUTABLES)/valgrind \
544 $(HOST_OUT)/lib64/valgrind/memcheck-amd64-linux \
545 $(HOST_OUT)/lib64/valgrind/memcheck-x86-linux \
546 $(HOST_OUT)/lib64/valgrind/default.supp \
547 $(HOST_OUT)/lib64/valgrind/vgpreload_core-amd64-linux.so \
548 $(HOST_OUT)/lib64/valgrind/vgpreload_core-x86-linux.so \
549 $(HOST_OUT)/lib64/valgrind/vgpreload_memcheck-amd64-linux.so \
550 $(HOST_OUT)/lib64/valgrind/vgpreload_memcheck-x86-linux.so
551
Ian Rogersafd9acc2014-06-17 08:21:54 -0700552# Define make rules for a host gtests.
553# $(1): gtest name - the name of the test we're building such as leb128_test.
554# $(2): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
555define define-art-gtest-rule-host
556 gtest_rule := test-art-host-gtest-$(1)$$($(2)ART_PHONY_TEST_HOST_SUFFIX)
557 gtest_exe := $$(HOST_OUT_EXECUTABLES)/$(1)$$($(2)ART_PHONY_TEST_HOST_SUFFIX)
Ian Rogers665de8a2014-06-24 21:34:09 -0700558 # Dependencies for all host gtests.
559 gtest_deps := $$(HOST_CORE_DEX_LOCATIONS) \
Nicolas Geoffray58035ae2015-05-27 19:10:27 +0100560 $$($(2)ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe10edbb12016-01-06 17:59:49 -0800561 $$($(2)ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$$(ART_HOST_SHLIB_EXTENSION) \
Nicolas Geoffray58035ae2015-05-27 19:10:27 +0100562 $$(gtest_exe) \
563 $$(ART_GTEST_$(1)_HOST_DEPS) \
564 $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_HOST_GTEST_$(file)_DEX))
Ian Rogers665de8a2014-06-24 21:34:09 -0700565
Nicolas Geoffray58035ae2015-05-27 19:10:27 +0100566 ART_TEST_HOST_GTEST_DEPENDENCIES += $$(gtest_deps)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700567
568.PHONY: $$(gtest_rule)
Nicolas Geoffray0f7c06d2015-05-28 10:21:03 +0100569$$(gtest_rule): $$(gtest_exe) $$(gtest_deps)
Dmitriy Ivanov8508a432014-10-14 11:38:46 -0700570 $(hide) ($$(call ART_TEST_SKIP,$$@) && $$< && $$(call ART_TEST_PASSED,$$@)) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700571 || $$(call ART_TEST_FAILED,$$@)
572
573 ART_TEST_HOST_GTEST$$($(2)ART_PHONY_TEST_HOST_SUFFIX)_RULES += $$(gtest_rule)
574 ART_TEST_HOST_GTEST_RULES += $$(gtest_rule)
575 ART_TEST_HOST_GTEST_$(1)_RULES += $$(gtest_rule)
576
Andreas Gampe3c0bb312015-02-19 10:02:19 -0800577
Ian Rogersafd9acc2014-06-17 08:21:54 -0700578.PHONY: valgrind-$$(gtest_rule)
Andreas Gampe3db36002015-05-28 20:17:09 -0700579valgrind-$$(gtest_rule): $$(gtest_exe) $$(gtest_deps) $(ART_VALGRIND_DEPENDENCIES)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700580 $(hide) $$(call ART_TEST_SKIP,$$@) && \
Andreas Gampe8df91ac2015-02-20 13:15:15 -0800581 VALGRIND_LIB=$(HOST_OUT)/lib64/valgrind \
Hiroshi Yamauchidc15e892016-03-10 13:49:14 -0800582 $(HOST_OUT_EXECUTABLES)/valgrind --leak-check=full --error-exitcode=1 \
583 --suppressions=art/test/valgrind-suppressions.txt $$< && \
Andreas Gampe3c0bb312015-02-19 10:02:19 -0800584 $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700585
586 ART_TEST_HOST_VALGRIND_GTEST$$($(2)ART_PHONY_TEST_HOST_SUFFIX)_RULES += valgrind-$$(gtest_rule)
587 ART_TEST_HOST_VALGRIND_GTEST_RULES += valgrind-$$(gtest_rule)
588 ART_TEST_HOST_VALGRIND_GTEST_$(1)_RULES += valgrind-$$(gtest_rule)
589
590 # Clear locally defined variables.
591 valgrind_gtest_rule :=
592 gtest_rule :=
593 gtest_exe :=
Ian Rogers665de8a2014-06-24 21:34:09 -0700594 gtest_deps :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700595endef # define-art-gtest-rule-host
596
597# Define the rules to build and run host and target gtests.
Brian Carlstrom07d579f2011-07-27 13:31:51 -0700598# $(1): target or host
Brian Carlstrom0796af02011-10-12 14:31:45 -0700599# $(2): file name
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800600# $(3): extra C includes
601# $(4): extra shared libraries
Ian Rogersafd9acc2014-06-17 08:21:54 -0700602define define-art-gtest
Brian Carlstrom0796af02011-10-12 14:31:45 -0700603 ifneq ($(1),target)
604 ifneq ($(1),host)
605 $$(error expected target or host for argument 1, received $(1))
606 endif
607 endif
608
609 art_target_or_host := $(1)
610 art_gtest_filename := $(2)
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800611 art_gtest_extra_c_includes := $(3)
612 art_gtest_extra_shared_libraries := $(4)
Brian Carlstrom0796af02011-10-12 14:31:45 -0700613
Ian Rogersafd9acc2014-06-17 08:21:54 -0700614 include $$(CLEAR_VARS)
Brian Carlstrom47a0d5a2011-10-12 21:20:05 -0700615 art_gtest_name := $$(notdir $$(basename $$(art_gtest_filename)))
Brian Carlstrom47a0d5a2011-10-12 21:20:05 -0700616 LOCAL_MODULE := $$(art_gtest_name)
Brian Carlstrom871599a2012-09-06 13:27:49 -0700617 ifeq ($$(art_target_or_host),target)
618 LOCAL_MODULE_TAGS := tests
619 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700620 LOCAL_CPP_EXTENSION := $$(ART_CPP_EXTENSION)
Dmitriy Ivanove49a4f62014-10-20 14:11:00 -0700621 LOCAL_SRC_FILES := $$(art_gtest_filename)
Vladimir Marko88b2b802015-12-04 14:19:04 +0000622 LOCAL_C_INCLUDES += $$(ART_C_INCLUDES) art/runtime art/cmdline $$(art_gtest_extra_c_includes)
Andreas Gampe0ae3bf82015-05-20 16:09:36 -0700623 LOCAL_SHARED_LIBRARIES += libartd $$(art_gtest_extra_shared_libraries) libart-gtest libartd-disassembler
Dmitriy Ivanove49a4f62014-10-20 14:11:00 -0700624 LOCAL_WHOLE_STATIC_LIBRARIES += libsigchain
Brian Carlstrom4478eb02013-07-14 21:05:57 -0700625
Ian Rogerse63db272014-07-15 15:36:11 -0700626 LOCAL_ADDITIONAL_DEPENDENCIES := art/build/Android.common_build.mk
627 LOCAL_ADDITIONAL_DEPENDENCIES += art/build/Android.gtest.mk
Brian Carlstromb9cc1ca2012-01-27 00:57:42 -0800628
Elliott Hughes0f096762012-01-31 10:32:46 -0800629 # Mac OS linker doesn't understand --export-dynamic.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700630 ifneq ($$(HOST_OS)-$$(art_target_or_host),darwin-host)
Elliott Hughesb264f082012-04-06 17:10:10 -0700631 # Allow jni_compiler_test to find Java_MyClassNatives_bar within itself using dlopen(NULL, ...).
632 LOCAL_LDFLAGS := -Wl,--export-dynamic -Wl,-u,Java_MyClassNatives_bar -Wl,-u,Java_MyClassNatives_sbar
Brian Carlstromcfede662012-01-29 17:25:54 -0800633 endif
Brian Carlstrom0796af02011-10-12 14:31:45 -0700634
Ian Rogersafd9acc2014-06-17 08:21:54 -0700635 LOCAL_CFLAGS := $$(ART_TEST_CFLAGS)
Brian Carlstrom0796af02011-10-12 14:31:45 -0700636 ifeq ($$(art_target_or_host),target)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700637 $$(eval $$(call set-target-local-clang-vars))
638 $$(eval $$(call set-target-local-cflags-vars,debug))
Vladimir Marko07f68182016-03-10 17:25:50 +0000639 LOCAL_SHARED_LIBRARIES += libdl libicuuc libicui18n libnativehelper libz libcutils libvixl
Ian Rogersafd9acc2014-06-17 08:21:54 -0700640 LOCAL_MODULE_PATH_32 := $$(ART_TARGET_NATIVETEST_OUT)/$$(ART_TARGET_ARCH_32)
641 LOCAL_MODULE_PATH_64 := $$(ART_TARGET_NATIVETEST_OUT)/$$(ART_TARGET_ARCH_64)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700642 LOCAL_MULTILIB := both
Andreas Gampe9b14dc32015-04-06 15:35:02 -0700643 LOCAL_CLANG_CFLAGS += -Wno-used-but-marked-unused -Wno-deprecated -Wno-missing-noreturn # gtest issue
Ian Rogersafd9acc2014-06-17 08:21:54 -0700644 include $$(BUILD_EXECUTABLE)
Nicolas Geoffray9eb40742014-10-29 22:38:53 +0000645 library_path :=
646 2nd_library_path :=
647 ifneq ($$(ART_TEST_ANDROID_ROOT),)
648 ifdef TARGET_2ND_ARCH
649 2nd_library_path := $$(ART_TEST_ANDROID_ROOT)/lib
650 library_path := $$(ART_TEST_ANDROID_ROOT)/lib64
651 else
Nicolas Geoffrayc1dea4a2014-11-10 08:33:52 +0000652 ifneq ($(filter %64,$(TARGET_ARCH)),)
653 library_path := $$(ART_TEST_ANDROID_ROOT)/lib64
654 else
655 library_path := $$(ART_TEST_ANDROID_ROOT)/lib
656 endif
Nicolas Geoffray9eb40742014-10-29 22:38:53 +0000657 endif
658 endif
Andreas Gampe5ca4eaa2014-05-29 02:09:33 -0700659
Ian Rogersafd9acc2014-06-17 08:21:54 -0700660 ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100661 ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700662 ifdef TARGET_2ND_ARCH
Nicolas Geoffray9eb40742014-10-29 22:38:53 +0000663 $$(eval $$(call define-art-gtest-rule-target,$$(art_gtest_name),2ND_,$$(2nd_library_path)))
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700664 endif
Nicolas Geoffray9eb40742014-10-29 22:38:53 +0000665 $$(eval $$(call define-art-gtest-rule-target,$$(art_gtest_name),,$$(library_path)))
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700666
Ian Rogersafd9acc2014-06-17 08:21:54 -0700667 # A rule to run the different architecture versions of the gtest.
668.PHONY: test-art-target-gtest-$$(art_gtest_name)
669test-art-target-gtest-$$(art_gtest_name): $$(ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES)
670 $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
671
Anton Kirilove5e76f42016-05-03 16:15:36 +0100672.PHONY: valgrind-test-art-target-gtest-$$(art_gtest_name)
673valgrind-test-art-target-gtest-$$(art_gtest_name): $$(ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES)
674 $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
675
Ian Rogersafd9acc2014-06-17 08:21:54 -0700676 # Clear locally defined variables.
677 ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100678 ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
Brian Carlstrom0796af02011-10-12 14:31:45 -0700679 else # host
Ian Rogersafd9acc2014-06-17 08:21:54 -0700680 LOCAL_CLANG := $$(ART_HOST_CLANG)
681 LOCAL_CFLAGS += $$(ART_HOST_CFLAGS) $$(ART_HOST_DEBUG_CFLAGS)
Roland Levillain12bd7212015-06-04 17:50:27 +0100682 LOCAL_ASFLAGS += $$(ART_HOST_ASFLAGS)
Vladimir Marko07f68182016-03-10 17:25:50 +0000683 LOCAL_SHARED_LIBRARIES += libicuuc-host libicui18n-host libnativehelper libziparchive-host libz-host libvixl
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700684 LOCAL_LDLIBS := $(ART_HOST_LDLIBS) -lpthread -ldl
Ian Rogersbd5ea6a2014-04-16 16:34:44 -0700685 LOCAL_IS_HOST_MODULE := true
Ian Rogersafd9acc2014-06-17 08:21:54 -0700686 LOCAL_MULTILIB := both
687 LOCAL_MODULE_STEM_32 := $$(art_gtest_name)32
688 LOCAL_MODULE_STEM_64 := $$(art_gtest_name)64
Andreas Gampe9b14dc32015-04-06 15:35:02 -0700689 LOCAL_CLANG_CFLAGS += -Wno-used-but-marked-unused -Wno-deprecated -Wno-missing-noreturn # gtest issue
Ian Rogersafd9acc2014-06-17 08:21:54 -0700690 include $$(BUILD_HOST_EXECUTABLE)
Brian Carlstrom47a0d5a2011-10-12 21:20:05 -0700691
Ian Rogersafd9acc2014-06-17 08:21:54 -0700692 ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES :=
693 ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
694 ifneq ($$(HOST_PREFER_32_BIT),true)
695 $$(eval $$(call define-art-gtest-rule-host,$$(art_gtest_name),2ND_))
696 endif
697 $$(eval $$(call define-art-gtest-rule-host,$$(art_gtest_name),))
Ian Rogersd912e5c2013-11-13 12:40:11 -0800698
Ian Rogersafd9acc2014-06-17 08:21:54 -0700699 # Rules to run the different architecture versions of the gtest.
700.PHONY: test-art-host-gtest-$$(art_gtest_name)
701test-art-host-gtest-$$(art_gtest_name): $$(ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES)
702 $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
Ian Rogersd912e5c2013-11-13 12:40:11 -0800703
Ian Rogersafd9acc2014-06-17 08:21:54 -0700704.PHONY: valgrind-test-art-host-gtest-$$(art_gtest_name)
705valgrind-test-art-host-gtest-$$(art_gtest_name): $$(ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES)
706 $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
707
708 # Clear locally defined variables.
709 ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES :=
710 ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
711 endif # host_or_target
712
713 # Clear locally defined variables.
714 art_target_or_host :=
715 art_gtest_filename :=
716 art_gtest_extra_c_includes :=
717 art_gtest_extra_shared_libraries :=
718 art_gtest_name :=
Nicolas Geoffray96a37c82014-10-29 23:50:40 +0000719 library_path :=
720 2nd_library_path :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700721endef # define-art-gtest
Carl Shapiro008e4122011-06-23 17:27:46 -0700722
Alex Light50fa9932015-08-10 15:30:07 -0700723
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700724ifeq ($(ART_BUILD_TARGET),true)
Richard Uhler66d874d2015-01-15 09:37:19 -0800725 $(foreach file,$(RUNTIME_GTEST_TARGET_SRC_FILES), $(eval $(call define-art-gtest,target,$(file),,libbacktrace)))
Dimitry Ivanov5edb0632016-04-29 11:14:25 -0700726 $(foreach file,$(COMPILER_GTEST_TARGET_SRC_FILES), $(eval $(call define-art-gtest,target,$(file),art/compiler,libartd-compiler libbacktrace libnativeloader)))
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700727endif
Ian Rogersc5f17732014-06-05 20:48:42 -0700728ifeq ($(ART_BUILD_HOST),true)
Richard Uhler66d874d2015-01-15 09:37:19 -0800729 $(foreach file,$(RUNTIME_GTEST_HOST_SRC_FILES), $(eval $(call define-art-gtest,host,$(file),,libbacktrace)))
Dimitry Ivanov5edb0632016-04-29 11:14:25 -0700730 $(foreach file,$(COMPILER_GTEST_HOST_SRC_FILES), $(eval $(call define-art-gtest,host,$(file),art/compiler,libartd-compiler libbacktrace libnativeloader)))
Brian Carlstrom07d579f2011-07-27 13:31:51 -0700731endif
Tsu Chiang Chuangec245a42014-05-15 21:16:21 -0700732
733# Used outside the art project to get a list of the current tests
734RUNTIME_TARGET_GTEST_MAKE_TARGETS :=
735$(foreach file, $(RUNTIME_GTEST_TARGET_SRC_FILES), $(eval RUNTIME_TARGET_GTEST_MAKE_TARGETS += $$(notdir $$(basename $$(file)))))
736COMPILER_TARGET_GTEST_MAKE_TARGETS :=
737$(foreach file, $(COMPILER_GTEST_TARGET_SRC_FILES), $(eval COMPILER_TARGET_GTEST_MAKE_TARGETS += $$(notdir $$(basename $$(file)))))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700738
739# Define all the combinations of host/target, valgrind and suffix such as:
740# test-art-host-gtest or valgrind-test-art-host-gtest64
741# $(1): host or target
742# $(2): HOST or TARGET
743# $(3): valgrind- or undefined
744# $(4): undefined, 32 or 64
745define define-test-art-gtest-combination
746 ifeq ($(1),host)
747 ifneq ($(2),HOST)
748 $$(error argument mismatch $(1) and ($2))
749 endif
750 else
751 ifneq ($(1),target)
752 $$(error found $(1) expected host or target)
753 endif
754 ifneq ($(2),TARGET)
755 $$(error argument mismatch $(1) and ($2))
756 endif
757 endif
758
759 rule_name := $(3)test-art-$(1)-gtest$(4)
Andreas Gampe928f72b2014-09-09 19:53:48 -0700760 ifeq ($(3),valgrind-)
Andreas Gampe928f72b2014-09-09 19:53:48 -0700761 dependencies := $$(ART_TEST_$(2)_VALGRIND_GTEST$(4)_RULES)
762 else
763 dependencies := $$(ART_TEST_$(2)_GTEST$(4)_RULES)
764 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700765
766.PHONY: $$(rule_name)
767$$(rule_name): $$(dependencies)
768 $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
769
770 # Clear locally defined variables.
771 rule_name :=
772 dependencies :=
773endef # define-test-art-gtest-combination
774
775$(eval $(call define-test-art-gtest-combination,target,TARGET,,))
Anton Kirilove5e76f42016-05-03 16:15:36 +0100776$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700777$(eval $(call define-test-art-gtest-combination,target,TARGET,,$(ART_PHONY_TEST_TARGET_SUFFIX)))
Anton Kirilove5e76f42016-05-03 16:15:36 +0100778$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,$(ART_PHONY_TEST_TARGET_SUFFIX)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700779ifdef TARGET_2ND_ARCH
780$(eval $(call define-test-art-gtest-combination,target,TARGET,,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)))
Anton Kirilove5e76f42016-05-03 16:15:36 +0100781$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700782endif
783$(eval $(call define-test-art-gtest-combination,host,HOST,,))
784$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,))
785$(eval $(call define-test-art-gtest-combination,host,HOST,,$(ART_PHONY_TEST_HOST_SUFFIX)))
786$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,$(ART_PHONY_TEST_HOST_SUFFIX)))
787ifneq ($(HOST_PREFER_32_BIT),true)
788$(eval $(call define-test-art-gtest-combination,host,HOST,,$(2ND_ART_PHONY_TEST_HOST_SUFFIX)))
789$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,$(2ND_ART_PHONY_TEST_HOST_SUFFIX)))
790endif
791
792# Clear locally defined variables.
793define-art-gtest-rule-target :=
794define-art-gtest-rule-host :=
795define-art-gtest :=
796define-test-art-gtest-combination :=
797RUNTIME_GTEST_COMMON_SRC_FILES :=
798COMPILER_GTEST_COMMON_SRC_FILES :=
799RUNTIME_GTEST_TARGET_SRC_FILES :=
800RUNTIME_GTEST_HOST_SRC_FILES :=
801COMPILER_GTEST_TARGET_SRC_FILES :=
802COMPILER_GTEST_HOST_SRC_FILES :=
803ART_TEST_CFLAGS :=
804ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
805ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
806ART_TEST_HOST_GTEST_RULES :=
807ART_TEST_HOST_VALGRIND_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
808ART_TEST_HOST_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
809ART_TEST_HOST_VALGRIND_GTEST_RULES :=
810ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
811ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
812ART_TEST_TARGET_GTEST_RULES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100813ART_TEST_TARGET_VALGRIND_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
814ART_TEST_TARGET_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
815ART_TEST_TARGET_VALGRIND_GTEST_RULES :=
Nicolas Geoffray96a37c82014-10-29 23:50:40 +0000816ART_GTEST_TARGET_ANDROID_ROOT :=
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700817ART_GTEST_class_linker_test_DEX_DEPS :=
818ART_GTEST_compiler_driver_test_DEX_DEPS :=
819ART_GTEST_dex_file_test_DEX_DEPS :=
820ART_GTEST_exception_test_DEX_DEPS :=
821ART_GTEST_elf_writer_test_HOST_DEPS :=
822ART_GTEST_elf_writer_test_TARGET_DEPS :=
823ART_GTEST_jni_compiler_test_DEX_DEPS :=
824ART_GTEST_jni_internal_test_DEX_DEPS :=
Richard Uhler66d874d2015-01-15 09:37:19 -0800825ART_GTEST_oat_file_assistant_test_DEX_DEPS :=
826ART_GTEST_oat_file_assistant_test_HOST_DEPS :=
827ART_GTEST_oat_file_assistant_test_TARGET_DEPS :=
Andreas Gampee1459ae2016-06-29 09:36:30 -0700828ART_GTEST_dex2oat_test_DEX_DEPS :=
829ART_GTEST_dex2oat_test_HOST_DEPS :=
830ART_GTEST_dex2oat_test_TARGET_DEPS :=
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700831ART_GTEST_object_test_DEX_DEPS :=
832ART_GTEST_proxy_test_DEX_DEPS :=
833ART_GTEST_reflection_test_DEX_DEPS :=
834ART_GTEST_stub_test_DEX_DEPS :=
835ART_GTEST_transaction_test_DEX_DEPS :=
Andreas Gampee1459ae2016-06-29 09:36:30 -0700836ART_GTEST_dex2oat_environment_tests_DEX_DEPS :=
Andreas Gampe3c0bb312015-02-19 10:02:19 -0800837ART_VALGRIND_DEPENDENCIES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100838ART_VALGRIND_TARGET_DEPENDENCIES :=
Ian Rogers1a2f84e2014-07-07 16:05:18 -0700839$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_TARGET_GTEST_$(dir)_DEX :=))
840$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_HOST_GTEST_$(dir)_DEX :=))
Richard Uhler66d874d2015-01-15 09:37:19 -0800841ART_TEST_HOST_GTEST_MainStripped_DEX :=
842ART_TEST_TARGET_GTEST_MainStripped_DEX :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700843GTEST_DEX_DIRECTORIES :=
Brian Carlstrom532714a2014-06-25 02:15:31 -0700844LOCAL_PATH :=