blob: e1712894103acd5b6eadd57192948199ca7b190f [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 \
Artem Udovichenkob3f2b5c2017-01-31 11:49:33 +030028 DefaultMethods \
Nicolas Geoffray01b70e82016-11-17 10:58:36 +000029 DexToDexDecompiler \
Mathieu Chartier1e4841e2016-12-15 14:21:04 -080030 ErroneousA \
31 ErroneousB \
Vladimir Marko72ab6842017-01-20 19:32:50 +000032 ErroneousInit \
Calin Juravlecdd49122017-07-05 20:09:53 -070033 ForClassLoaderA \
34 ForClassLoaderB \
35 ForClassLoaderC \
36 ForClassLoaderD \
Ian Rogersafd9acc2014-06-17 08:21:54 -070037 ExceptionHandle \
38 GetMethodSignature \
David Brazdil2b9c35b2018-01-12 15:44:43 +000039 HiddenApi \
Mathieu Chartier496577f2016-09-20 15:33:31 -070040 ImageLayoutA \
41 ImageLayoutB \
Andreas Gampea1ff30f2016-09-27 12:19:45 -070042 IMTA \
43 IMTB \
Sebastien Hertz0462c4c2015-04-01 16:34:17 +020044 Instrumentation \
Ian Rogersafd9acc2014-06-17 08:21:54 -070045 Interfaces \
Artem Udovichenkod9786b02015-10-14 16:36:55 +030046 Lookup \
Ian Rogersafd9acc2014-06-17 08:21:54 -070047 Main \
Mathieu Chartierd00e02b2017-05-24 12:04:13 -070048 ManyMethods \
Narayan Kamath25352fc2016-08-03 12:46:58 +010049 MethodTypes \
Richard Uhler66d874d2015-01-15 09:37:19 -080050 MultiDex \
Richard Uhler67ff7d12015-05-14 13:21:13 -070051 MultiDexModifiedSecondary \
Ian Rogersafd9acc2014-06-17 08:21:54 -070052 MyClass \
53 MyClassNatives \
54 Nested \
55 NonStaticLeafMethods \
Mathieu Chartier279ac5c2016-09-08 17:34:25 -070056 Packages \
Ian Rogersafd9acc2014-06-17 08:21:54 -070057 ProtoCompare \
58 ProtoCompare2 \
Calin Juravle877fd962016-01-05 14:29:29 +000059 ProfileTestMultiDex \
Ian Rogersafd9acc2014-06-17 08:21:54 -070060 StaticLeafMethods \
61 Statics \
62 StaticsFromCode \
63 Transaction \
64 XandY
65
66# Create build rules for each dex file recording the dependency.
67$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval $(call build-art-test-dex,art-gtest,$(dir), \
Ian Rogers1a2f84e2014-07-07 16:05:18 -070068 $(ART_TARGET_NATIVETEST_OUT),art/build/Android.gtest.mk,ART_TEST_TARGET_GTEST_$(dir)_DEX, \
69 ART_TEST_HOST_GTEST_$(dir)_DEX)))
Ian Rogersafd9acc2014-06-17 08:21:54 -070070
Richard Uhler66d874d2015-01-15 09:37:19 -080071# Create rules for MainStripped, a copy of Main with the classes.dex stripped
72# for the oat file assistant tests.
73ART_TEST_HOST_GTEST_MainStripped_DEX := $(basename $(ART_TEST_HOST_GTEST_Main_DEX))Stripped$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
74ART_TEST_TARGET_GTEST_MainStripped_DEX := $(basename $(ART_TEST_TARGET_GTEST_Main_DEX))Stripped$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
75
Nicolas Geoffrayf3075272018-01-08 12:41:19 +000076# Create rules for MainUncompressed, a copy of Main with the classes.dex uncompressed
77# for the dex2oat tests.
78ART_TEST_HOST_GTEST_MainUncompressed_DEX := $(basename $(ART_TEST_HOST_GTEST_Main_DEX))Uncompressed$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
79ART_TEST_TARGET_GTEST_MainUncompressed_DEX := $(basename $(ART_TEST_TARGET_GTEST_Main_DEX))Uncompressed$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
80
Mathieu Chartier700a9852018-02-06 18:27:38 -080081# Create rules for UncompressedEmpty, a classes.dex that is empty and uncompressed
82# for the dex2oat tests.
83ART_TEST_HOST_GTEST_EmptyUncompressed_DEX := $(basename $(ART_TEST_HOST_GTEST_Main_DEX))EmptyUncompressed$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
84ART_TEST_TARGET_GTEST_EmptyUncompressed_DEX := $(basename $(ART_TEST_TARGET_GTEST_Main_DEX))EmptyUncompressed$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
85
Andreas Gampefc604a72018-02-08 15:43:37 -080086# Create rules for MultiDexUncompressed, a copy of MultiDex with the classes.dex uncompressed
87# for the OatFile tests.
88ART_TEST_HOST_GTEST_MultiDexUncompressed_DEX := $(basename $(ART_TEST_HOST_GTEST_MultiDex_DEX))Uncompressed$(suffix $(ART_TEST_HOST_GTEST_MultiDex_DEX))
89ART_TEST_TARGET_GTEST_MultiDexUncompressed_DEX := $(basename $(ART_TEST_TARGET_GTEST_MultiDex_DEX))Uncompressed$(suffix $(ART_TEST_TARGET_GTEST_MultiDex_DEX))
90
Richard Uhler66d874d2015-01-15 09:37:19 -080091$(ART_TEST_HOST_GTEST_MainStripped_DEX): $(ART_TEST_HOST_GTEST_Main_DEX)
92 cp $< $@
93 $(call dexpreopt-remove-classes.dex,$@)
94
95$(ART_TEST_TARGET_GTEST_MainStripped_DEX): $(ART_TEST_TARGET_GTEST_Main_DEX)
96 cp $< $@
97 $(call dexpreopt-remove-classes.dex,$@)
98
Nicolas Geoffrayf3075272018-01-08 12:41:19 +000099$(ART_TEST_HOST_GTEST_MainUncompressed_DEX): $(ART_TEST_HOST_GTEST_Main_DEX) $(ZIPALIGN)
100 cp $< $@
101 $(call uncompress-dexs, $@)
102 $(call align-package, $@)
103
104$(ART_TEST_TARGET_GTEST_MainUncompressed_DEX): $(ART_TEST_TARGET_GTEST_Main_DEX) $(ZIPALIGN)
105 cp $< $@
106 $(call uncompress-dexs, $@)
107 $(call align-package, $@)
108
Mathieu Chartier700a9852018-02-06 18:27:38 -0800109$(ART_TEST_HOST_GTEST_EmptyUncompressed_DEX): $(ZIPALIGN)
110 touch $(dir $@)classes.dex
111 zip -j -qD -X -0 $@ $(dir $@)classes.dex
112 rm $(dir $@)classes.dex
113
114$(ART_TEST_TARGET_GTEST_EmptyUncompressed_DEX): $(ZIPALIGN)
115 touch $(dir $@)classes.dex
116 zip -j -qD -X -0 $@ $(dir $@)classes.dex
117 rm $(dir $@)classes.dex
118
Andreas Gampefc604a72018-02-08 15:43:37 -0800119$(ART_TEST_HOST_GTEST_MultiDexUncompressed_DEX): $(ART_TEST_HOST_GTEST_MultiDex_DEX) $(ZIPALIGN)
120 cp $< $@
121 $(call uncompress-dexs, $@)
122 $(call align-package, $@)
123
124$(ART_TEST_TARGET_GTEST_MultiDexUncompressed_DEX): $(ART_TEST_TARGET_GTEST_MultiDex_DEX) $(ZIPALIGN)
125 cp $< $@
126 $(call uncompress-dexs, $@)
127 $(call align-package, $@)
128
David Brazdilca3c8c32016-09-06 14:04:48 +0100129ART_TEST_GTEST_VerifierDeps_SRC := $(abspath $(wildcard $(LOCAL_PATH)/VerifierDeps/*.smali))
Nicolas Geoffray7cc3ae52017-03-07 14:33:37 +0000130ART_TEST_GTEST_VerifierDepsMulti_SRC := $(abspath $(wildcard $(LOCAL_PATH)/VerifierDepsMulti/*.smali))
David Brazdilca3c8c32016-09-06 14:04:48 +0100131ART_TEST_HOST_GTEST_VerifierDeps_DEX := $(dir $(ART_TEST_HOST_GTEST_Main_DEX))$(subst Main,VerifierDeps,$(basename $(notdir $(ART_TEST_HOST_GTEST_Main_DEX))))$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
David Brazdilf906f122016-09-16 16:33:31 +0100132ART_TEST_TARGET_GTEST_VerifierDeps_DEX := $(dir $(ART_TEST_TARGET_GTEST_Main_DEX))$(subst Main,VerifierDeps,$(basename $(notdir $(ART_TEST_TARGET_GTEST_Main_DEX))))$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
Nicolas Geoffray7cc3ae52017-03-07 14:33:37 +0000133ART_TEST_HOST_GTEST_VerifierDepsMulti_DEX := $(dir $(ART_TEST_HOST_GTEST_Main_DEX))$(subst Main,VerifierDepsMulti,$(basename $(notdir $(ART_TEST_HOST_GTEST_Main_DEX))))$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
134ART_TEST_TARGET_GTEST_VerifierDepsMulti_DEX := $(dir $(ART_TEST_TARGET_GTEST_Main_DEX))$(subst Main,VerifierDepsMulti,$(basename $(notdir $(ART_TEST_TARGET_GTEST_Main_DEX))))$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
David Brazdilca3c8c32016-09-06 14:04:48 +0100135
136$(ART_TEST_HOST_GTEST_VerifierDeps_DEX): $(ART_TEST_GTEST_VerifierDeps_SRC) $(HOST_OUT_EXECUTABLES)/smali
Ben Gruver14fc9db2017-04-28 15:30:49 -0700137 $(HOST_OUT_EXECUTABLES)/smali assemble --output $@ $(filter %.smali,$^)
David Brazdilca3c8c32016-09-06 14:04:48 +0100138
David Brazdilf906f122016-09-16 16:33:31 +0100139$(ART_TEST_TARGET_GTEST_VerifierDeps_DEX): $(ART_TEST_GTEST_VerifierDeps_SRC) $(HOST_OUT_EXECUTABLES)/smali
Ben Gruver14fc9db2017-04-28 15:30:49 -0700140 $(HOST_OUT_EXECUTABLES)/smali assemble --output $@ $(filter %.smali,$^)
David Brazdilf906f122016-09-16 16:33:31 +0100141
Nicolas Geoffray7cc3ae52017-03-07 14:33:37 +0000142$(ART_TEST_HOST_GTEST_VerifierDepsMulti_DEX): $(ART_TEST_GTEST_VerifierDepsMulti_SRC) $(HOST_OUT_EXECUTABLES)/smali
Ben Gruver14fc9db2017-04-28 15:30:49 -0700143 $(HOST_OUT_EXECUTABLES)/smali assemble --output $@ $(filter %.smali,$^)
Nicolas Geoffray7cc3ae52017-03-07 14:33:37 +0000144
145$(ART_TEST_TARGET_GTEST_VerifierDepsMulti_DEX): $(ART_TEST_GTEST_VerifierDepsMulti_SRC) $(HOST_OUT_EXECUTABLES)/smali
Ben Gruver14fc9db2017-04-28 15:30:49 -0700146 $(HOST_OUT_EXECUTABLES)/smali assemble --output $@ $(filter %.smali,$^)
Nicolas Geoffray7cc3ae52017-03-07 14:33:37 +0000147
Ian Rogersafd9acc2014-06-17 08:21:54 -0700148# Dex file dependencies for each gtest.
David Sehr139512d2018-02-08 15:44:50 -0800149ART_GTEST_art_dex_file_loader_test_DEX_DEPS := GetMethodSignature Main Nested MultiDex
Andreas Gampecac31ad2017-11-06 20:01:17 -0800150ART_GTEST_dex2oat_environment_tests_DEX_DEPS := Main MainStripped MultiDex MultiDexModifiedSecondary MyClassNatives Nested VerifierDeps VerifierDepsMulti
Andreas Gampee1459ae2016-06-29 09:36:30 -0700151
Mathieu Chartier93764b82017-07-17 14:51:53 -0700152ART_GTEST_atomic_dex_ref_map_test_DEX_DEPS := Interfaces
Calin Juravlecdd49122017-07-05 20:09:53 -0700153ART_GTEST_class_linker_test_DEX_DEPS := AllFields ErroneousA ErroneousB ErroneousInit ForClassLoaderA ForClassLoaderB ForClassLoaderC ForClassLoaderD Interfaces MethodTypes MultiDex MyClass Nested Statics StaticsFromCode
Calin Juravle57d0acc2017-07-11 17:41:30 -0700154ART_GTEST_class_loader_context_test_DEX_DEPS := Main MultiDex MyClass ForClassLoaderA ForClassLoaderB ForClassLoaderC ForClassLoaderD
Mathieu Chartierdb70ce52016-12-12 11:06:59 -0800155ART_GTEST_class_table_test_DEX_DEPS := XandY
Calin Juravle877fd962016-01-05 14:29:29 +0000156ART_GTEST_compiler_driver_test_DEX_DEPS := AbstractMethod StaticLeafMethods ProfileTestMultiDex
Narayan Kamath25352fc2016-08-03 12:46:58 +0100157ART_GTEST_dex_cache_test_DEX_DEPS := Main Packages MethodTypes
Mathieu Chartierd00e02b2017-05-24 12:04:13 -0700158ART_GTEST_dexlayout_test_DEX_DEPS := ManyMethods
Mathieu Chartier700a9852018-02-06 18:27:38 -0800159ART_GTEST_dex2oat_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS) ManyMethods Statics VerifierDeps MainUncompressed EmptyUncompressed
Mathieu Chartierf70fe3d2017-06-21 15:24:02 -0700160ART_GTEST_dex2oat_image_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS) Statics VerifierDeps
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700161ART_GTEST_exception_test_DEX_DEPS := ExceptionHandle
David Brazdil2b9c35b2018-01-12 15:44:43 +0000162ART_GTEST_hiddenapi_test_DEX_DEPS := HiddenApi
Artem Udovichenkob3f2b5c2017-01-31 11:49:33 +0300163ART_GTEST_image_test_DEX_DEPS := ImageLayoutA ImageLayoutB DefaultMethods
Andreas Gampea1ff30f2016-09-27 12:19:45 -0700164ART_GTEST_imtable_test_DEX_DEPS := IMTA IMTB
Sebastien Hertz0462c4c2015-04-01 16:34:17 +0200165ART_GTEST_instrumentation_test_DEX_DEPS := Instrumentation
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700166ART_GTEST_jni_compiler_test_DEX_DEPS := MyClassNatives
167ART_GTEST_jni_internal_test_DEX_DEPS := AllFields StaticLeafMethods
Andreas Gampee1459ae2016-06-29 09:36:30 -0700168ART_GTEST_oat_file_assistant_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
Calin Juravle36eb3132017-01-13 16:32:38 -0800169ART_GTEST_dexoptanalyzer_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
Richard Uhler84f50ae2017-02-06 15:12:45 +0000170ART_GTEST_image_space_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
Andreas Gampefc604a72018-02-08 15:43:37 -0800171ART_GTEST_oat_file_test_DEX_DEPS := Main MultiDex MainUncompressed MultiDexUncompressed
Mathieu Chartier07ddb6f2015-11-05 11:16:34 -0800172ART_GTEST_oat_test_DEX_DEPS := Main
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700173ART_GTEST_object_test_DEX_DEPS := ProtoCompare ProtoCompare2 StaticsFromCode XandY
Alex Klyubind1d5c952017-12-15 12:57:33 -0800174ART_GTEST_patchoat_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700175ART_GTEST_proxy_test_DEX_DEPS := Interfaces
176ART_GTEST_reflection_test_DEX_DEPS := Main NonStaticLeafMethods StaticLeafMethods
Calin Juravle877fd962016-01-05 14:29:29 +0000177ART_GTEST_profile_assistant_test_DEX_DEPS := ProfileTestMultiDex
Mathieu Chartierdb40eac2017-06-09 18:34:11 -0700178ART_GTEST_profile_compilation_info_test_DEX_DEPS := ManyMethods ProfileTestMultiDex
Andreas Gampe0f01b582017-01-18 15:22:37 -0800179ART_GTEST_runtime_callbacks_test_DEX_DEPS := XandY
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700180ART_GTEST_stub_test_DEX_DEPS := AllFields
181ART_GTEST_transaction_test_DEX_DEPS := Transaction
Artem Udovichenkod9786b02015-10-14 16:36:55 +0300182ART_GTEST_type_lookup_table_test_DEX_DEPS := Lookup
Andreas Gampeae78c262017-02-01 20:40:44 -0800183ART_GTEST_unstarted_runtime_test_DEX_DEPS := Nested
Mathieu Chartier1ca68902017-04-18 11:26:22 -0700184ART_GTEST_heap_verification_test_DEX_DEPS := ProtoCompare ProtoCompare2 StaticsFromCode XandY
Nicolas Geoffray7cc3ae52017-03-07 14:33:37 +0000185ART_GTEST_verifier_deps_test_DEX_DEPS := VerifierDeps VerifierDepsMulti MultiDex
Nicolas Geoffray01b70e82016-11-17 10:58:36 +0000186ART_GTEST_dex_to_dex_decompiler_test_DEX_DEPS := VerifierDeps DexToDexDecompiler
Vladimir Marko421087b2018-02-27 11:00:17 +0000187ART_GTEST_oatdump_app_test_DEX_DEPS := ProfileTestMultiDex
Ian Rogersafd9acc2014-06-17 08:21:54 -0700188
189# The elf writer test has dependencies on core.oat.
Richard Uhler67e1dc52017-02-06 16:50:17 +0000190ART_GTEST_elf_writer_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32)
191ART_GTEST_elf_writer_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_DEFAULT_64) $(TARGET_CORE_IMAGE_DEFAULT_32)
Brian Carlstrom53463ea2014-11-09 14:11:51 -0800192
Andreas Gampee1459ae2016-06-29 09:36:30 -0700193ART_GTEST_dex2oat_environment_tests_HOST_DEPS := \
Richard Uhlerbb00f812017-02-16 14:21:10 +0000194 $(HOST_CORE_IMAGE_optimizing_64) \
195 $(HOST_CORE_IMAGE_optimizing_32) \
196 $(HOST_CORE_IMAGE_interpreter_64) \
197 $(HOST_CORE_IMAGE_interpreter_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800198 patchoatd-host
Andreas Gampee1459ae2016-06-29 09:36:30 -0700199ART_GTEST_dex2oat_environment_tests_TARGET_DEPS := \
Richard Uhlerbb00f812017-02-16 14:21:10 +0000200 $(TARGET_CORE_IMAGE_optimizing_64) \
201 $(TARGET_CORE_IMAGE_optimizing_32) \
202 $(TARGET_CORE_IMAGE_interpreter_64) \
203 $(TARGET_CORE_IMAGE_interpreter_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800204 patchoatd-target
Andreas Gampee1459ae2016-06-29 09:36:30 -0700205
David Srbeckyec2cdf42017-12-08 16:21:25 +0000206ART_GTEST_oat_file_test_HOST_DEPS := \
207 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
208ART_GTEST_oat_file_test_TARGET_DEPS := \
209 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
210
Andreas Gampee1459ae2016-06-29 09:36:30 -0700211ART_GTEST_oat_file_assistant_test_HOST_DEPS := \
Richard Uhlerf51ac422016-07-08 09:22:33 -0700212 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
Andreas Gampee1459ae2016-06-29 09:36:30 -0700213ART_GTEST_oat_file_assistant_test_TARGET_DEPS := \
Richard Uhlerf51ac422016-07-08 09:22:33 -0700214 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
Andreas Gampee1459ae2016-06-29 09:36:30 -0700215
Calin Juravle36eb3132017-01-13 16:32:38 -0800216ART_GTEST_dexoptanalyzer_test_HOST_DEPS := \
217 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS) \
Andreas Gampe47200462017-11-09 11:40:03 -0800218 dexoptanalyzerd-host
Calin Juravle36eb3132017-01-13 16:32:38 -0800219ART_GTEST_dexoptanalyzer_test_TARGET_DEPS := \
220 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS) \
Andreas Gampe47200462017-11-09 11:40:03 -0800221 dexoptanalyzerd-target
Andreas Gampee1459ae2016-06-29 09:36:30 -0700222
Richard Uhler84f50ae2017-02-06 15:12:45 +0000223ART_GTEST_image_space_test_HOST_DEPS := \
224 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
225ART_GTEST_image_space_test_TARGET_DEPS := \
226 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
227
Andreas Gampee1459ae2016-06-29 09:36:30 -0700228ART_GTEST_dex2oat_test_HOST_DEPS := \
Andreas Gampe47200462017-11-09 11:40:03 -0800229 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS) \
230 dex2oatd-host
Andreas Gampee1459ae2016-06-29 09:36:30 -0700231ART_GTEST_dex2oat_test_TARGET_DEPS := \
Andreas Gampe47200462017-11-09 11:40:03 -0800232 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS) \
233 dex2oatd-target
Richard Uhler66d874d2015-01-15 09:37:19 -0800234
Mathieu Chartierf70fe3d2017-06-21 15:24:02 -0700235ART_GTEST_dex2oat_image_test_HOST_DEPS := \
Andreas Gampe47200462017-11-09 11:40:03 -0800236 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS) \
237 dex2oatd-host
Mathieu Chartierf70fe3d2017-06-21 15:24:02 -0700238ART_GTEST_dex2oat_image_test_TARGET_DEPS := \
Andreas Gampe47200462017-11-09 11:40:03 -0800239 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS) \
240 dex2oatd-target
Mathieu Chartierf70fe3d2017-06-21 15:24:02 -0700241
Brian Carlstrom53463ea2014-11-09 14:11:51 -0800242# TODO: document why this is needed.
Richard Uhler67e1dc52017-02-06 16:50:17 +0000243ART_GTEST_proxy_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700244
David Sehr55232f12017-04-19 14:06:49 -0700245# The dexdiag test requires the dexdiag utility.
Andreas Gampe47200462017-11-09 11:40:03 -0800246ART_GTEST_dexdiag_test_HOST_DEPS := dexdiag-host
247ART_GTEST_dexdiag_test_TARGET_DEPS := dexdiag-target
David Sehr55232f12017-04-19 14:06:49 -0700248
Aart Bikcfbe53c2015-07-06 14:27:27 -0700249# The dexdump test requires an image and the dexdump utility.
Aart Bik22c26f52015-07-08 21:20:13 +0000250# TODO: rename into dexdump when migration completes
Aart Bikcfbe53c2015-07-06 14:27:27 -0700251ART_GTEST_dexdump_test_HOST_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000252 $(HOST_CORE_IMAGE_DEFAULT_64) \
253 $(HOST_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800254 dexdump2-host
Aart Bikcfbe53c2015-07-06 14:27:27 -0700255ART_GTEST_dexdump_test_TARGET_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000256 $(TARGET_CORE_IMAGE_DEFAULT_64) \
257 $(TARGET_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800258 dexdump2-target
Aart Bikcfbe53c2015-07-06 14:27:27 -0700259
Jeff Haoc3acfc52016-08-29 14:18:26 -0700260# The dexlayout test requires an image and the dexlayout utility.
261# TODO: rename into dexdump when migration completes
262ART_GTEST_dexlayout_test_HOST_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000263 $(HOST_CORE_IMAGE_DEFAULT_64) \
264 $(HOST_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800265 dexlayoutd-host \
Andreas Gampe47200462017-11-09 11:40:03 -0800266 dexdump2-host
Jeff Haoc3acfc52016-08-29 14:18:26 -0700267ART_GTEST_dexlayout_test_TARGET_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000268 $(TARGET_CORE_IMAGE_DEFAULT_64) \
269 $(TARGET_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800270 dexlayoutd-target \
Andreas Gampe47200462017-11-09 11:40:03 -0800271 dexdump2-target
Jeff Haoc3acfc52016-08-29 14:18:26 -0700272
Aart Bik3e40f4a2015-07-07 17:09:41 -0700273# The dexlist test requires an image and the dexlist utility.
Aart Bik3e40f4a2015-07-07 17:09:41 -0700274ART_GTEST_dexlist_test_HOST_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000275 $(HOST_CORE_IMAGE_DEFAULT_64) \
276 $(HOST_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800277 dexlist-host
Aart Bik3e40f4a2015-07-07 17:09:41 -0700278ART_GTEST_dexlist_test_TARGET_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000279 $(TARGET_CORE_IMAGE_DEFAULT_64) \
280 $(TARGET_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800281 dexlist-target
Aart Bik3e40f4a2015-07-07 17:09:41 -0700282
Igor Murashkin37743352014-11-13 14:38:00 -0800283# The imgdiag test has dependencies on core.oat since it needs to load it during the test.
Andreas Gampec93b8b52014-12-19 23:12:25 -0800284# For the host, also add the installed tool (in the base size, that should suffice). For the
285# target, just the module is fine, the sync will happen late enough.
286ART_GTEST_imgdiag_test_HOST_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000287 $(HOST_CORE_IMAGE_DEFAULT_64) \
288 $(HOST_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800289 imgdiagd-host
Andreas Gampec93b8b52014-12-19 23:12:25 -0800290ART_GTEST_imgdiag_test_TARGET_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000291 $(TARGET_CORE_IMAGE_DEFAULT_64) \
292 $(TARGET_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800293 imgdiagd-target
Igor Murashkin37743352014-11-13 14:38:00 -0800294
Mathieu Chartierea216b32015-05-26 19:48:16 -0700295# Oatdump test requires an image and oatfile to dump.
296ART_GTEST_oatdump_test_HOST_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000297 $(HOST_CORE_IMAGE_DEFAULT_64) \
298 $(HOST_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800299 oatdumpd-host \
300 oatdumpds-host
Mathieu Chartierea216b32015-05-26 19:48:16 -0700301ART_GTEST_oatdump_test_TARGET_DEPS := \
Richard Uhler67e1dc52017-02-06 16:50:17 +0000302 $(TARGET_CORE_IMAGE_DEFAULT_64) \
303 $(TARGET_CORE_IMAGE_DEFAULT_32) \
Andreas Gampe47200462017-11-09 11:40:03 -0800304 oatdumpd-target
Vladimir Marko1352f132017-04-28 15:28:29 +0100305ART_GTEST_oatdump_image_test_HOST_DEPS := $(ART_GTEST_oatdump_test_HOST_DEPS)
306ART_GTEST_oatdump_image_test_TARGET_DEPS := $(ART_GTEST_oatdump_test_TARGET_DEPS)
Vladimir Marko421087b2018-02-27 11:00:17 +0000307ART_GTEST_oatdump_app_test_HOST_DEPS := $(ART_GTEST_oatdump_test_HOST_DEPS) \
308 dex2oatd-host \
309 dex2oatds-host
310ART_GTEST_oatdump_app_test_TARGET_DEPS := $(ART_GTEST_oatdump_test_TARGET_DEPS) \
311 dex2oatd-target
Mathieu Chartierea216b32015-05-26 19:48:16 -0700312
Alex Klyubind1d5c952017-12-15 12:57:33 -0800313ART_GTEST_patchoat_test_HOST_DEPS := \
314 $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
315ART_GTEST_patchoat_test_TARGET_DEPS := \
316 $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
317
Calin Juravle2e2db782016-02-23 12:00:03 +0000318# Profile assistant tests requires profman utility.
Andreas Gampe47200462017-11-09 11:40:03 -0800319ART_GTEST_profile_assistant_test_HOST_DEPS := profmand-host
Andreas Gampe693bfbf2017-11-10 12:23:31 -0800320ART_GTEST_profile_assistant_test_TARGET_DEPS := profmand-target
Calin Juravle2e2db782016-02-23 12:00:03 +0000321
David Brazdil2b9c35b2018-01-12 15:44:43 +0000322ART_GTEST_hiddenapi_test_HOST_DEPS := \
323 $(HOST_CORE_IMAGE_DEFAULT_64) \
324 $(HOST_CORE_IMAGE_DEFAULT_32) \
325 hiddenapid-host
326
Ian Rogersafd9acc2014-06-17 08:21:54 -0700327# The path for which all the source files are relative, not actually the current directory.
Brian Carlstrom7940e442013-07-12 13:46:57 -0700328LOCAL_PATH := art
329
Colin Cross6e95dd52016-09-12 15:37:10 -0700330ART_TEST_MODULES := \
331 art_cmdline_tests \
332 art_compiler_tests \
333 art_compiler_host_tests \
334 art_dex2oat_tests \
David Sehr55232f12017-04-19 14:06:49 -0700335 art_dexdiag_tests \
Colin Cross6e95dd52016-09-12 15:37:10 -0700336 art_dexdump_tests \
337 art_dexlayout_tests \
338 art_dexlist_tests \
Calin Juravle36eb3132017-01-13 16:32:38 -0800339 art_dexoptanalyzer_tests \
David Brazdil2b9c35b2018-01-12 15:44:43 +0000340 art_hiddenapi_tests \
Colin Cross6e95dd52016-09-12 15:37:10 -0700341 art_imgdiag_tests \
David Sehr67bf42e2018-02-26 16:43:04 -0800342 art_libartbase_tests \
David Sehr334b9d72018-02-12 18:27:56 -0800343 art_libdexfile_tests \
Colin Cross6e95dd52016-09-12 15:37:10 -0700344 art_oatdump_tests \
Alex Klyubind1d5c952017-12-15 12:57:33 -0800345 art_patchoat_tests \
Colin Cross6e95dd52016-09-12 15:37:10 -0700346 art_profman_tests \
347 art_runtime_tests \
348 art_runtime_compiler_tests \
Josh Gao1eac77e2018-02-26 15:54:41 -0800349 art_sigchain_tests \
Brian Carlstroma1ce1fe2014-02-24 23:23:58 -0800350
Colin Cross6e95dd52016-09-12 15:37:10 -0700351ART_TARGET_GTEST_FILES := $(foreach m,$(ART_TEST_MODULES),\
352 $(ART_TEST_LIST_device_$(TARGET_ARCH)_$(m)))
Alex Light50fa9932015-08-10 15:30:07 -0700353
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100354ifdef TARGET_2ND_ARCH
3552ND_ART_TARGET_GTEST_FILES := $(foreach m,$(ART_TEST_MODULES),\
356 $(ART_TEST_LIST_device_$(2ND_TARGET_ARCH)_$(m)))
357endif
358
Colin Cross6e95dd52016-09-12 15:37:10 -0700359ART_HOST_GTEST_FILES := $(foreach m,$(ART_TEST_MODULES),\
Colin Cross124f8812016-09-15 20:57:47 -0700360 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_$(m)))
Alex Light50fa9932015-08-10 15:30:07 -0700361
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100362ifneq ($(HOST_PREFER_32_BIT),true)
3632ND_ART_HOST_GTEST_FILES += $(foreach m,$(ART_TEST_MODULES),\
364 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_$(m)))
365endif
366
Ian Rogersafd9acc2014-06-17 08:21:54 -0700367# Variables holding collections of gtest pre-requisits used to run a number of gtests.
368ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
369ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
370ART_TEST_HOST_GTEST_RULES :=
371ART_TEST_HOST_VALGRIND_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
372ART_TEST_HOST_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
373ART_TEST_HOST_VALGRIND_GTEST_RULES :=
374ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
375ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
376ART_TEST_TARGET_GTEST_RULES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100377ART_TEST_TARGET_VALGRIND_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
378ART_TEST_TARGET_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
379ART_TEST_TARGET_VALGRIND_GTEST_RULES :=
Nicolas Geoffray58035ae2015-05-27 19:10:27 +0100380ART_TEST_HOST_GTEST_DEPENDENCIES :=
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700381
Nicolas Geoffray96a37c82014-10-29 23:50:40 +0000382ART_GTEST_TARGET_ANDROID_ROOT := '/system'
383ifneq ($(ART_TEST_ANDROID_ROOT),)
384 ART_GTEST_TARGET_ANDROID_ROOT := $(ART_TEST_ANDROID_ROOT)
385endif
386
Colin Crossb0155292018-02-12 16:50:49 -0800387ART_VALGRIND_TARGET_DEPENDENCIES :=
388
389# Has to match list in external/valgrind/Android.build_one.mk
390ART_VALGRIND_SUPPORTED_ARCH := arm arm64 x86_64
391
392# Valgrind is not supported for x86
393ifneq (,$(filter $(ART_VALGRIND_SUPPORTED_ARCH),$(TARGET_ARCH)))
Colin Cross6497ede2018-02-14 11:23:09 -0800394art_vg_arch := $(if $(filter x86_64,$(TARGET_ARCH)),amd64,$(TARGET_ARCH))
Colin Crossb0155292018-02-12 16:50:49 -0800395ART_VALGRIND_TARGET_DEPENDENCIES += \
Anton Kirilove5e76f42016-05-03 16:15:36 +0100396 $(TARGET_OUT_EXECUTABLES)/valgrind \
Colin Cross6497ede2018-02-14 11:23:09 -0800397 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/memcheck-$(art_vg_arch)-linux \
398 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_core-$(art_vg_arch)-linux.so \
399 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_memcheck-$(art_vg_arch)-linux.so \
Anton Kirilove5e76f42016-05-03 16:15:36 +0100400 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/default.supp
Colin Cross6497ede2018-02-14 11:23:09 -0800401art_vg_arch :=
Colin Crossb0155292018-02-12 16:50:49 -0800402endif
Anton Kirilove5e76f42016-05-03 16:15:36 +0100403
404ifdef TARGET_2ND_ARCH
Colin Crossb0155292018-02-12 16:50:49 -0800405ifneq (,$(filter $(ART_VALGRIND_SUPPORTED_ARCH),$(TARGET_2ND_ARCH)))
Anton Kirilove5e76f42016-05-03 16:15:36 +0100406ART_VALGRIND_TARGET_DEPENDENCIES += \
407 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/memcheck-$(TARGET_2ND_ARCH)-linux \
408 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_core-$(TARGET_2ND_ARCH)-linux.so \
409 $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_memcheck-$(TARGET_2ND_ARCH)-linux.so
410endif
Colin Crossb0155292018-02-12 16:50:49 -0800411endif
Anton Kirilove5e76f42016-05-03 16:15:36 +0100412
413include $(CLEAR_VARS)
414LOCAL_MODULE := valgrind-target-suppressions.txt
415LOCAL_MODULE_CLASS := ETC
416LOCAL_MODULE_TAGS := optional
417LOCAL_SRC_FILES := test/valgrind-target-suppressions.txt
418LOCAL_MODULE_PATH := $(ART_TARGET_TEST_OUT)
419include $(BUILD_PREBUILT)
420
Ian Rogersafd9acc2014-06-17 08:21:54 -0700421# Define a make rule for a target device gtest.
422# $(1): gtest name - the name of the test we're building such as leb128_test.
Colin Cross6e95dd52016-09-12 15:37:10 -0700423# $(2): path relative to $OUT to the test binary
424# $(3): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
425# $(4): LD_LIBRARY_PATH or undefined - used in case libartd.so is not in /system/lib/
Ian Rogersafd9acc2014-06-17 08:21:54 -0700426define define-art-gtest-rule-target
Colin Cross6e95dd52016-09-12 15:37:10 -0700427 gtest_rule := test-art-target-gtest-$(1)$$($(3)ART_PHONY_TEST_TARGET_SUFFIX)
428 gtest_exe := $(OUT_DIR)/$(2)
429 gtest_target_exe := $$(patsubst $(PRODUCT_OUT)/%,/%,$$(gtest_exe))
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700430
Brian Carlstrom532714a2014-06-25 02:15:31 -0700431 # Add the test dependencies to test-art-target-sync, which will be a prerequisite for the test
Ian Rogersafd9acc2014-06-17 08:21:54 -0700432 # to ensure files are pushed to the device.
433 TEST_ART_TARGET_SYNC_DEPS += \
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700434 $$(ART_GTEST_$(1)_TARGET_DEPS) \
Ian Rogers1a2f84e2014-07-07 16:05:18 -0700435 $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_TARGET_GTEST_$(file)_DEX)) \
Colin Cross6e95dd52016-09-12 15:37:10 -0700436 $$(gtest_exe) \
437 $$($(3)TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so \
438 $$($(3)TARGET_OUT_SHARED_LIBRARIES)/libopenjdkd.so \
Andreas Gampec7d4a582015-09-30 11:52:02 -0700439 $$(TARGET_OUT_JAVA_LIBRARIES)/core-libart-testdex.jar \
Anton Kirilove5e76f42016-05-03 16:15:36 +0100440 $$(TARGET_OUT_JAVA_LIBRARIES)/core-oj-testdex.jar \
441 $$(ART_TARGET_TEST_OUT)/valgrind-target-suppressions.txt
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700442
Colin Cross6e95dd52016-09-12 15:37:10 -0700443$$(gtest_rule) valgrind-$$(gtest_rule): PRIVATE_TARGET_EXE := $$(gtest_target_exe)
444
Ian Rogersafd9acc2014-06-17 08:21:54 -0700445.PHONY: $$(gtest_rule)
446$$(gtest_rule): test-art-target-sync
Colin Cross6e95dd52016-09-12 15:37:10 -0700447 $(hide) adb shell touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID
448 $(hide) adb shell rm $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID
449 $(hide) adb shell chmod 755 $$(PRIVATE_TARGET_EXE)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700450 $(hide) $$(call ART_TEST_SKIP,$$@) && \
Roland Levillaina42e7042017-10-30 17:24:43 +0000451 (adb shell "env $(GCOV_ENV) LD_LIBRARY_PATH=$(4) \
452 ANDROID_ROOT=$(ART_GTEST_TARGET_ANDROID_ROOT) $$(PRIVATE_TARGET_EXE) \
453 && touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID" \
454 && (adb pull $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID /tmp/ \
455 && $$(call ART_TEST_PASSED,$$@)) \
456 || $$(call ART_TEST_FAILED,$$@))
Ian Rogers6f3dbba2014-10-14 17:41:57 -0700457 $(hide) rm -f /tmp/$$@-$$$$PPID
Ian Rogersafd9acc2014-06-17 08:21:54 -0700458
Colin Cross6e95dd52016-09-12 15:37:10 -0700459 ART_TEST_TARGET_GTEST$($(3)ART_PHONY_TEST_TARGET_SUFFIX)_RULES += $$(gtest_rule)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700460 ART_TEST_TARGET_GTEST_RULES += $$(gtest_rule)
461 ART_TEST_TARGET_GTEST_$(1)_RULES += $$(gtest_rule)
462
Anton Kirilove5e76f42016-05-03 16:15:36 +0100463.PHONY: valgrind-$$(gtest_rule)
464valgrind-$$(gtest_rule): $(ART_VALGRIND_TARGET_DEPENDENCIES) test-art-target-sync
Colin Cross6e95dd52016-09-12 15:37:10 -0700465 $(hide) adb shell touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID
466 $(hide) adb shell rm $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID
467 $(hide) adb shell chmod 755 $$(PRIVATE_TARGET_EXE)
Anton Kirilove5e76f42016-05-03 16:15:36 +0100468 $(hide) $$(call ART_TEST_SKIP,$$@) && \
Roland Levillaina42e7042017-10-30 17:24:43 +0000469 (adb shell "env $(GCOV_ENV) LD_LIBRARY_PATH=$(4) \
470 ANDROID_ROOT=$(ART_GTEST_TARGET_ANDROID_ROOT) \
471 $$$$ANDROID_ROOT/bin/valgrind \
472 --leak-check=full --error-exitcode=1 --workaround-gcc296-bugs=yes \
473 --suppressions=$(ART_TARGET_TEST_DIR)/valgrind-target-suppressions.txt \
474 --num-callers=50 --show-mismatched-frees=no $$(PRIVATE_TARGET_EXE) \
475 && touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID" \
476 && (adb pull $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID /tmp/ \
477 && $$(call ART_TEST_PASSED,$$@)) \
478 || $$(call ART_TEST_FAILED,$$@))
Anton Kirilove5e76f42016-05-03 16:15:36 +0100479 $(hide) rm -f /tmp/$$@-$$$$PPID
480
Roland Levillaina42e7042017-10-30 17:24:43 +0000481 ART_TEST_TARGET_VALGRIND_GTEST$$($(3)ART_PHONY_TEST_TARGET_SUFFIX)_RULES += \
482 valgrind-$$(gtest_rule)
Anton Kirilove5e76f42016-05-03 16:15:36 +0100483 ART_TEST_TARGET_VALGRIND_GTEST_RULES += valgrind-$$(gtest_rule)
484 ART_TEST_TARGET_VALGRIND_GTEST_$(1)_RULES += valgrind-$$(gtest_rule)
485
Ian Rogersafd9acc2014-06-17 08:21:54 -0700486 # Clear locally defined variables.
Anton Kirilove5e76f42016-05-03 16:15:36 +0100487 valgrind_gtest_rule :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700488 gtest_rule :=
Colin Cross6e95dd52016-09-12 15:37:10 -0700489 gtest_exe :=
490 gtest_target_exe :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700491endef # define-art-gtest-rule-target
492
Andreas Gampe3c0bb312015-02-19 10:02:19 -0800493ART_VALGRIND_DEPENDENCIES := \
494 $(HOST_OUT_EXECUTABLES)/valgrind \
495 $(HOST_OUT)/lib64/valgrind/memcheck-amd64-linux \
496 $(HOST_OUT)/lib64/valgrind/memcheck-x86-linux \
497 $(HOST_OUT)/lib64/valgrind/default.supp \
498 $(HOST_OUT)/lib64/valgrind/vgpreload_core-amd64-linux.so \
499 $(HOST_OUT)/lib64/valgrind/vgpreload_core-x86-linux.so \
500 $(HOST_OUT)/lib64/valgrind/vgpreload_memcheck-amd64-linux.so \
501 $(HOST_OUT)/lib64/valgrind/vgpreload_memcheck-x86-linux.so
502
Ian Rogersafd9acc2014-06-17 08:21:54 -0700503# Define make rules for a host gtests.
504# $(1): gtest name - the name of the test we're building such as leb128_test.
Colin Cross6e95dd52016-09-12 15:37:10 -0700505# $(2): path relative to $OUT to the test binary
506# $(3): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700507define define-art-gtest-rule-host
Colin Cross6e95dd52016-09-12 15:37:10 -0700508 gtest_rule := test-art-host-gtest-$(1)$$($(3)ART_PHONY_TEST_HOST_SUFFIX)
509 gtest_exe := $(OUT_DIR)/$(2)
Ian Rogers665de8a2014-06-24 21:34:09 -0700510 # Dependencies for all host gtests.
511 gtest_deps := $$(HOST_CORE_DEX_LOCATIONS) \
Colin Cross6e95dd52016-09-12 15:37:10 -0700512 $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$$(ART_HOST_SHLIB_EXTENSION) \
513 $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$$(ART_HOST_SHLIB_EXTENSION) \
Nicolas Geoffray58035ae2015-05-27 19:10:27 +0100514 $$(gtest_exe) \
515 $$(ART_GTEST_$(1)_HOST_DEPS) \
516 $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_HOST_GTEST_$(file)_DEX))
Andreas Gampeca881de2018-02-27 21:26:32 -0800517 ifneq (,$(DIST_DIR))
518 gtest_xml_output := --gtest_output=xml:$(DIST_DIR)/gtest/$(1)$$($(3)ART_PHONY_TEST_HOST_SUFFIX).xml
519 else
520 gtest_xml_output :=
521 endif
Ian Rogers665de8a2014-06-24 21:34:09 -0700522
Nicolas Geoffray58035ae2015-05-27 19:10:27 +0100523 ART_TEST_HOST_GTEST_DEPENDENCIES += $$(gtest_deps)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700524
Andreas Gampe6acebf42018-01-22 22:15:43 -0800525.PHONY: $$(gtest_rule)
526ifeq (,$(SANITIZE_HOST))
Andreas Gampeca881de2018-02-27 21:26:32 -0800527$$(gtest_rule): PRIVATE_XML_OUTPUT := $$(gtest_xml_output)
Andreas Gampe6acebf42018-01-22 22:15:43 -0800528$$(gtest_rule): $$(gtest_exe) $$(gtest_deps)
Andreas Gampeca881de2018-02-27 21:26:32 -0800529 $(hide) ($$(call ART_TEST_SKIP,$$@) && $$< $$(PRIVATE_XML_OUTPUT) && \
Andreas Gampe6acebf42018-01-22 22:15:43 -0800530 $$(call ART_TEST_PASSED,$$@)) || $$(call ART_TEST_FAILED,$$@)
531else
Andreas Gampe03858052017-05-01 08:17:24 -0700532# Note: envsetup currently exports ASAN_OPTIONS=detect_leaks=0 to suppress leak detection, as some
533# build tools (e.g., ninja) intentionally leak. We want leak checks when we run our tests, so
534# override ASAN_OPTIONS. b/37751350
Andreas Gampe6acebf42018-01-22 22:15:43 -0800535# Note 2: Under sanitization, also capture the output, and run it through the stack tool on failure
536# (with the x86-64 ABI, as this allows symbolization of both x86 and x86-64). We don't do this in
537# general as it loses all the color output, and we have our own symbolization step when not running
538# under ASAN.
Andreas Gampeca881de2018-02-27 21:26:32 -0800539$$(gtest_rule): PRIVATE_XML_OUTPUT := $$(gtest_xml_output)
Nicolas Geoffray0f7c06d2015-05-28 10:21:03 +0100540$$(gtest_rule): $$(gtest_exe) $$(gtest_deps)
Andreas Gampe6acebf42018-01-22 22:15:43 -0800541 $(hide) ($$(call ART_TEST_SKIP,$$@) && set -o pipefail && \
Andreas Gampeca881de2018-02-27 21:26:32 -0800542 ASAN_OPTIONS=detect_leaks=1 $$< $$(PRIVATE_XML_OUTPUT) 2>&1 | tee $$<.tmp.out >&2 && \
Andreas Gampe6acebf42018-01-22 22:15:43 -0800543 { $$(call ART_TEST_PASSED,$$@) ; rm $$<.tmp.out ; }) || \
Andreas Gampec05fd3f2018-01-23 14:22:07 -0800544 ( grep -q AddressSanitizer $$<.tmp.out && export ANDROID_BUILD_TOP=`pwd` && \
Andreas Gampe6acebf42018-01-22 22:15:43 -0800545 { echo "ABI: 'x86_64'" | cat - $$<.tmp.out | development/scripts/stack | tail -n 3000 ; } ; \
546 rm $$<.tmp.out ; $$(call ART_TEST_FAILED,$$@))
547endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700548
Colin Cross6e95dd52016-09-12 15:37:10 -0700549 ART_TEST_HOST_GTEST$$($(3)ART_PHONY_TEST_HOST_SUFFIX)_RULES += $$(gtest_rule)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700550 ART_TEST_HOST_GTEST_RULES += $$(gtest_rule)
551 ART_TEST_HOST_GTEST_$(1)_RULES += $$(gtest_rule)
552
Andreas Gampe3c0bb312015-02-19 10:02:19 -0800553
Ian Rogersafd9acc2014-06-17 08:21:54 -0700554.PHONY: valgrind-$$(gtest_rule)
Andreas Gampe3db36002015-05-28 20:17:09 -0700555valgrind-$$(gtest_rule): $$(gtest_exe) $$(gtest_deps) $(ART_VALGRIND_DEPENDENCIES)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700556 $(hide) $$(call ART_TEST_SKIP,$$@) && \
Andreas Gampe8df91ac2015-02-20 13:15:15 -0800557 VALGRIND_LIB=$(HOST_OUT)/lib64/valgrind \
Hiroshi Yamauchidc15e892016-03-10 13:49:14 -0800558 $(HOST_OUT_EXECUTABLES)/valgrind --leak-check=full --error-exitcode=1 \
Andreas Gampebf13e802016-09-02 19:43:09 -0700559 --suppressions=art/test/valgrind-suppressions.txt --num-callers=50 \
560 $$< && \
Andreas Gampe3c0bb312015-02-19 10:02:19 -0800561 $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700562
Colin Cross6e95dd52016-09-12 15:37:10 -0700563 ART_TEST_HOST_VALGRIND_GTEST$$($(3)ART_PHONY_TEST_HOST_SUFFIX)_RULES += valgrind-$$(gtest_rule)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700564 ART_TEST_HOST_VALGRIND_GTEST_RULES += valgrind-$$(gtest_rule)
565 ART_TEST_HOST_VALGRIND_GTEST_$(1)_RULES += valgrind-$$(gtest_rule)
566
567 # Clear locally defined variables.
568 valgrind_gtest_rule :=
569 gtest_rule :=
570 gtest_exe :=
Ian Rogers665de8a2014-06-24 21:34:09 -0700571 gtest_deps :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700572endef # define-art-gtest-rule-host
573
574# Define the rules to build and run host and target gtests.
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100575# $(1): file name
576# $(2): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
577define define-art-gtest-target
578 art_gtest_filename := $(1)
Brian Carlstrom0796af02011-10-12 14:31:45 -0700579
Ian Rogersafd9acc2014-06-17 08:21:54 -0700580 include $$(CLEAR_VARS)
Brian Carlstrom47a0d5a2011-10-12 21:20:05 -0700581 art_gtest_name := $$(notdir $$(basename $$(art_gtest_filename)))
Colin Cross6e95dd52016-09-12 15:37:10 -0700582
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100583 library_path :=
584 2ND_library_path :=
585 ifneq ($$(ART_TEST_ANDROID_ROOT),)
586 ifdef TARGET_2ND_ARCH
587 2ND_library_path := $$(ART_TEST_ANDROID_ROOT)/lib
588 library_path := $$(ART_TEST_ANDROID_ROOT)/lib64
589 else
590 ifneq ($(filter %64,$(TARGET_ARCH)),)
Nicolas Geoffray9eb40742014-10-29 22:38:53 +0000591 library_path := $$(ART_TEST_ANDROID_ROOT)/lib64
592 else
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100593 library_path := $$(ART_TEST_ANDROID_ROOT)/lib
Nicolas Geoffray9eb40742014-10-29 22:38:53 +0000594 endif
595 endif
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100596 endif
Andreas Gampe5ca4eaa2014-05-29 02:09:33 -0700597
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100598 ifndef ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700599 ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100600 ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100601 endif
602 $$(eval $$(call define-art-gtest-rule-target,$$(art_gtest_name),$$(art_gtest_filename),$(2),$$($(2)library_path)))
603
604 # Clear locally defined variables.
605 art_gtest_filename :=
606 art_gtest_name :=
607 library_path :=
608 2ND_library_path :=
609endef # define-art-gtest-target
610
611# $(1): file name
612# $(2): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
613define define-art-gtest-host
614 art_gtest_filename := $(1)
615
616 include $$(CLEAR_VARS)
617 art_gtest_name := $$(notdir $$(basename $$(art_gtest_filename)))
618 ifndef ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES
619 ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES :=
620 ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
621 endif
622 $$(eval $$(call define-art-gtest-rule-host,$$(art_gtest_name),$$(art_gtest_filename),$(2)))
623
624 # Clear locally defined variables.
625 art_gtest_filename :=
626 art_gtest_name :=
627endef # define-art-gtest-host
628
629# Define the rules to build and run gtests for both archs on target.
630# $(1): test name
631define define-art-gtest-target-both
632 art_gtest_name := $(1)
Andreas Gampeafbaa1a2014-03-25 18:09:32 -0700633
Ian Rogersafd9acc2014-06-17 08:21:54 -0700634 # A rule to run the different architecture versions of the gtest.
635.PHONY: test-art-target-gtest-$$(art_gtest_name)
636test-art-target-gtest-$$(art_gtest_name): $$(ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES)
637 $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
638
Anton Kirilove5e76f42016-05-03 16:15:36 +0100639.PHONY: valgrind-test-art-target-gtest-$$(art_gtest_name)
640valgrind-test-art-target-gtest-$$(art_gtest_name): $$(ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES)
641 $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
642
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100643 # Clear now unused variables.
644 ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES :=
645 ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
646 art_gtest_name :=
647endef # define-art-gtest-target-both
Ian Rogersd912e5c2013-11-13 12:40:11 -0800648
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100649# Define the rules to build and run gtests for both archs on host.
650# $(1): test name
651define define-art-gtest-host-both
652 art_gtest_name := $(1)
653
Ian Rogersafd9acc2014-06-17 08:21:54 -0700654.PHONY: test-art-host-gtest-$$(art_gtest_name)
655test-art-host-gtest-$$(art_gtest_name): $$(ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES)
656 $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
Ian Rogersd912e5c2013-11-13 12:40:11 -0800657
Ian Rogersafd9acc2014-06-17 08:21:54 -0700658.PHONY: valgrind-test-art-host-gtest-$$(art_gtest_name)
659valgrind-test-art-host-gtest-$$(art_gtest_name): $$(ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES)
660 $$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
661
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100662 # Clear now unused variables.
663 ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES :=
664 ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700665 art_gtest_name :=
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100666endef # define-art-gtest-host-both
Alex Light50fa9932015-08-10 15:30:07 -0700667
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700668ifeq ($(ART_BUILD_TARGET),true)
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100669 $(foreach file,$(ART_TARGET_GTEST_FILES), $(eval $(call define-art-gtest-target,$(file),)))
670 ifdef TARGET_2ND_ARCH
671 $(foreach file,$(2ND_ART_TARGET_GTEST_FILES), $(eval $(call define-art-gtest-target,$(file),2ND_)))
672 endif
673 # Rules to run the different architecture versions of the gtest.
674 $(foreach file,$(ART_TARGET_GTEST_FILES), $(eval $(call define-art-gtest-target-both,$$(notdir $$(basename $$(file))))))
Brian Carlstrom4b620ff2011-09-11 01:11:01 -0700675endif
Ian Rogersc5f17732014-06-05 20:48:42 -0700676ifeq ($(ART_BUILD_HOST),true)
Nicolas Geoffray6bbea4c2016-09-16 16:41:43 +0100677 $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),)))
678 ifneq ($(HOST_PREFER_32_BIT),true)
679 $(foreach file,$(2ND_ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),2ND_)))
680 endif
681 # Rules to run the different architecture versions of the gtest.
682 $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host-both,$$(notdir $$(basename $$(file))))))
Brian Carlstrom07d579f2011-07-27 13:31:51 -0700683endif
Tsu Chiang Chuangec245a42014-05-15 21:16:21 -0700684
685# Used outside the art project to get a list of the current tests
686RUNTIME_TARGET_GTEST_MAKE_TARGETS :=
Colin Cross6e95dd52016-09-12 15:37:10 -0700687$(foreach file, $(ART_TARGET_GTEST_FILES), $(eval RUNTIME_TARGET_GTEST_MAKE_TARGETS += $$(notdir $$(basename $$(file)))))
Tsu Chiang Chuangec245a42014-05-15 21:16:21 -0700688COMPILER_TARGET_GTEST_MAKE_TARGETS :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700689
690# Define all the combinations of host/target, valgrind and suffix such as:
691# test-art-host-gtest or valgrind-test-art-host-gtest64
692# $(1): host or target
693# $(2): HOST or TARGET
694# $(3): valgrind- or undefined
695# $(4): undefined, 32 or 64
696define define-test-art-gtest-combination
697 ifeq ($(1),host)
698 ifneq ($(2),HOST)
699 $$(error argument mismatch $(1) and ($2))
700 endif
701 else
702 ifneq ($(1),target)
703 $$(error found $(1) expected host or target)
704 endif
705 ifneq ($(2),TARGET)
706 $$(error argument mismatch $(1) and ($2))
707 endif
708 endif
709
710 rule_name := $(3)test-art-$(1)-gtest$(4)
Andreas Gampe928f72b2014-09-09 19:53:48 -0700711 ifeq ($(3),valgrind-)
Andreas Gampe928f72b2014-09-09 19:53:48 -0700712 dependencies := $$(ART_TEST_$(2)_VALGRIND_GTEST$(4)_RULES)
713 else
714 dependencies := $$(ART_TEST_$(2)_GTEST$(4)_RULES)
715 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700716
717.PHONY: $$(rule_name)
Alan Leung50173eb2017-12-20 13:33:21 -0800718$$(rule_name): $$(dependencies) dx d8-compat-dx desugar
Ian Rogersafd9acc2014-06-17 08:21:54 -0700719 $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
720
721 # Clear locally defined variables.
722 rule_name :=
723 dependencies :=
724endef # define-test-art-gtest-combination
725
726$(eval $(call define-test-art-gtest-combination,target,TARGET,,))
Anton Kirilove5e76f42016-05-03 16:15:36 +0100727$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700728$(eval $(call define-test-art-gtest-combination,target,TARGET,,$(ART_PHONY_TEST_TARGET_SUFFIX)))
Anton Kirilove5e76f42016-05-03 16:15:36 +0100729$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,$(ART_PHONY_TEST_TARGET_SUFFIX)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700730ifdef TARGET_2ND_ARCH
731$(eval $(call define-test-art-gtest-combination,target,TARGET,,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)))
Anton Kirilove5e76f42016-05-03 16:15:36 +0100732$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700733endif
734$(eval $(call define-test-art-gtest-combination,host,HOST,,))
735$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,))
736$(eval $(call define-test-art-gtest-combination,host,HOST,,$(ART_PHONY_TEST_HOST_SUFFIX)))
737$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,$(ART_PHONY_TEST_HOST_SUFFIX)))
738ifneq ($(HOST_PREFER_32_BIT),true)
739$(eval $(call define-test-art-gtest-combination,host,HOST,,$(2ND_ART_PHONY_TEST_HOST_SUFFIX)))
740$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,$(2ND_ART_PHONY_TEST_HOST_SUFFIX)))
741endif
742
743# Clear locally defined variables.
744define-art-gtest-rule-target :=
745define-art-gtest-rule-host :=
746define-art-gtest :=
747define-test-art-gtest-combination :=
748RUNTIME_GTEST_COMMON_SRC_FILES :=
749COMPILER_GTEST_COMMON_SRC_FILES :=
750RUNTIME_GTEST_TARGET_SRC_FILES :=
751RUNTIME_GTEST_HOST_SRC_FILES :=
752COMPILER_GTEST_TARGET_SRC_FILES :=
753COMPILER_GTEST_HOST_SRC_FILES :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700754ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
755ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
756ART_TEST_HOST_GTEST_RULES :=
757ART_TEST_HOST_VALGRIND_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
758ART_TEST_HOST_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
759ART_TEST_HOST_VALGRIND_GTEST_RULES :=
760ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
761ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
762ART_TEST_TARGET_GTEST_RULES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100763ART_TEST_TARGET_VALGRIND_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
764ART_TEST_TARGET_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
765ART_TEST_TARGET_VALGRIND_GTEST_RULES :=
Nicolas Geoffray96a37c82014-10-29 23:50:40 +0000766ART_GTEST_TARGET_ANDROID_ROOT :=
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700767ART_GTEST_class_linker_test_DEX_DEPS :=
Mathieu Chartierdb70ce52016-12-12 11:06:59 -0800768ART_GTEST_class_table_test_DEX_DEPS :=
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700769ART_GTEST_compiler_driver_test_DEX_DEPS :=
770ART_GTEST_dex_file_test_DEX_DEPS :=
771ART_GTEST_exception_test_DEX_DEPS :=
772ART_GTEST_elf_writer_test_HOST_DEPS :=
773ART_GTEST_elf_writer_test_TARGET_DEPS :=
Andreas Gampea1ff30f2016-09-27 12:19:45 -0700774ART_GTEST_imtable_test_DEX_DEPS :=
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700775ART_GTEST_jni_compiler_test_DEX_DEPS :=
776ART_GTEST_jni_internal_test_DEX_DEPS :=
Richard Uhler66d874d2015-01-15 09:37:19 -0800777ART_GTEST_oat_file_assistant_test_DEX_DEPS :=
778ART_GTEST_oat_file_assistant_test_HOST_DEPS :=
779ART_GTEST_oat_file_assistant_test_TARGET_DEPS :=
Calin Juravle36eb3132017-01-13 16:32:38 -0800780ART_GTEST_dexoptanalyzer_test_DEX_DEPS :=
781ART_GTEST_dexoptanalyzer_test_HOST_DEPS :=
782ART_GTEST_dexoptanalyzer_test_TARGET_DEPS :=
Richard Uhler84f50ae2017-02-06 15:12:45 +0000783ART_GTEST_image_space_test_DEX_DEPS :=
784ART_GTEST_image_space_test_HOST_DEPS :=
785ART_GTEST_image_space_test_TARGET_DEPS :=
Andreas Gampee1459ae2016-06-29 09:36:30 -0700786ART_GTEST_dex2oat_test_DEX_DEPS :=
787ART_GTEST_dex2oat_test_HOST_DEPS :=
788ART_GTEST_dex2oat_test_TARGET_DEPS :=
Mathieu Chartierf70fe3d2017-06-21 15:24:02 -0700789ART_GTEST_dex2oat_image_test_DEX_DEPS :=
790ART_GTEST_dex2oat_image_test_HOST_DEPS :=
791ART_GTEST_dex2oat_image_test_TARGET_DEPS :=
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700792ART_GTEST_object_test_DEX_DEPS :=
Alex Klyubind1d5c952017-12-15 12:57:33 -0800793ART_GTEST_patchoat_test_DEX_DEPS :=
794ART_GTEST_patchoat_test_HOST_DEPS :=
795ART_GTEST_patchoat_test_TARGET_DEPS :=
Brian Carlstromeb85f2b2014-06-25 13:23:00 -0700796ART_GTEST_proxy_test_DEX_DEPS :=
797ART_GTEST_reflection_test_DEX_DEPS :=
798ART_GTEST_stub_test_DEX_DEPS :=
799ART_GTEST_transaction_test_DEX_DEPS :=
Andreas Gampee1459ae2016-06-29 09:36:30 -0700800ART_GTEST_dex2oat_environment_tests_DEX_DEPS :=
Mathieu Chartier1ca68902017-04-18 11:26:22 -0700801ART_GTEST_heap_verification_test_DEX_DEPS :=
David Brazdilca3c8c32016-09-06 14:04:48 +0100802ART_GTEST_verifier_deps_test_DEX_DEPS :=
Andreas Gampe3c0bb312015-02-19 10:02:19 -0800803ART_VALGRIND_DEPENDENCIES :=
Anton Kirilove5e76f42016-05-03 16:15:36 +0100804ART_VALGRIND_TARGET_DEPENDENCIES :=
Ian Rogers1a2f84e2014-07-07 16:05:18 -0700805$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_TARGET_GTEST_$(dir)_DEX :=))
806$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_HOST_GTEST_$(dir)_DEX :=))
Richard Uhler66d874d2015-01-15 09:37:19 -0800807ART_TEST_HOST_GTEST_MainStripped_DEX :=
808ART_TEST_TARGET_GTEST_MainStripped_DEX :=
Nicolas Geoffrayf3075272018-01-08 12:41:19 +0000809ART_TEST_HOST_GTEST_MainUncompressed_DEX :=
810ART_TEST_TARGET_GTEST_MainUncompressed_DEX :=
Mathieu Chartier700a9852018-02-06 18:27:38 -0800811ART_TEST_HOST_GTEST_EmptyUncompressed_DEX :=
812ART_TEST_TARGET_GTEST_EmptyUncompressed_DEX :=
David Brazdilca3c8c32016-09-06 14:04:48 +0100813ART_TEST_GTEST_VerifierDeps_SRC :=
814ART_TEST_HOST_GTEST_VerifierDeps_DEX :=
David Brazdilf906f122016-09-16 16:33:31 +0100815ART_TEST_TARGET_GTEST_VerifierDeps_DEX :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700816GTEST_DEX_DIRECTORIES :=
Brian Carlstrom532714a2014-06-25 02:15:31 -0700817LOCAL_PATH :=