• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2011 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17# 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
22include art/build/Android.common_build.mk
23
24# Subdirectories in art/test which contain dex files used as inputs for gtests.
25GTEST_DEX_DIRECTORIES := \
26  AbstractMethod \
27  AllFields \
28  DefaultMethods \
29  DexToDexDecompiler \
30  ErroneousA \
31  ErroneousB \
32  ErroneousInit \
33  ForClassLoaderA \
34  ForClassLoaderB \
35  ForClassLoaderC \
36  ForClassLoaderD \
37  ExceptionHandle \
38  GetMethodSignature \
39  HiddenApi \
40  HiddenApiSignatures \
41  ImageLayoutA \
42  ImageLayoutB \
43  IMTA \
44  IMTB \
45  Instrumentation \
46  Interfaces \
47  Lookup \
48  Main \
49  ManyMethods \
50  MethodTypes \
51  MultiDex \
52  MultiDexModifiedSecondary \
53  MyClass \
54  MyClassNatives \
55  Nested \
56  NonStaticLeafMethods \
57  Packages \
58  ProtoCompare \
59  ProtoCompare2 \
60  ProfileTestMultiDex \
61  StaticLeafMethods \
62  Statics \
63  StaticsFromCode \
64  Transaction \
65  XandY
66
67# Create build rules for each dex file recording the dependency.
68$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval $(call build-art-test-dex,art-gtest,$(dir), \
69  $(ART_TARGET_NATIVETEST_OUT),art/build/Android.gtest.mk,ART_TEST_TARGET_GTEST_$(dir)_DEX, \
70  ART_TEST_HOST_GTEST_$(dir)_DEX)))
71
72# Create rules for MainStripped, a copy of Main with the classes.dex stripped
73# for the oat file assistant tests.
74ART_TEST_HOST_GTEST_MainStripped_DEX := $(basename $(ART_TEST_HOST_GTEST_Main_DEX))Stripped$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
75ART_TEST_TARGET_GTEST_MainStripped_DEX := $(basename $(ART_TEST_TARGET_GTEST_Main_DEX))Stripped$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
76
77# Create rules for MainUncompressed, a copy of Main with the classes.dex uncompressed
78# for the dex2oat tests.
79ART_TEST_HOST_GTEST_MainUncompressed_DEX := $(basename $(ART_TEST_HOST_GTEST_Main_DEX))Uncompressed$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
80ART_TEST_TARGET_GTEST_MainUncompressed_DEX := $(basename $(ART_TEST_TARGET_GTEST_Main_DEX))Uncompressed$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
81
82# Create rules for UncompressedEmpty, a classes.dex that is empty and uncompressed
83# for the dex2oat tests.
84ART_TEST_HOST_GTEST_EmptyUncompressed_DEX := $(basename $(ART_TEST_HOST_GTEST_Main_DEX))EmptyUncompressed$(suffix $(ART_TEST_HOST_GTEST_Main_DEX))
85ART_TEST_TARGET_GTEST_EmptyUncompressed_DEX := $(basename $(ART_TEST_TARGET_GTEST_Main_DEX))EmptyUncompressed$(suffix $(ART_TEST_TARGET_GTEST_Main_DEX))
86
87# Create rules for MultiDexUncompressed, a copy of MultiDex with the classes.dex uncompressed
88# for the OatFile tests.
89ART_TEST_HOST_GTEST_MultiDexUncompressed_DEX := $(basename $(ART_TEST_HOST_GTEST_MultiDex_DEX))Uncompressed$(suffix $(ART_TEST_HOST_GTEST_MultiDex_DEX))
90ART_TEST_TARGET_GTEST_MultiDexUncompressed_DEX := $(basename $(ART_TEST_TARGET_GTEST_MultiDex_DEX))Uncompressed$(suffix $(ART_TEST_TARGET_GTEST_MultiDex_DEX))
91
92$(ART_TEST_HOST_GTEST_MainStripped_DEX): $(ART_TEST_HOST_GTEST_Main_DEX)
93	cp $< $@
94	$(call dexpreopt-remove-classes.dex,$@)
95
96$(ART_TEST_TARGET_GTEST_MainStripped_DEX): $(ART_TEST_TARGET_GTEST_Main_DEX)
97	cp $< $@
98	$(call dexpreopt-remove-classes.dex,$@)
99
100$(ART_TEST_HOST_GTEST_MainUncompressed_DEX): $(ART_TEST_HOST_GTEST_Main_DEX) $(ZIPALIGN)
101	cp $< $@
102	$(call uncompress-dexs, $@)
103	$(call align-package, $@)
104
105$(ART_TEST_TARGET_GTEST_MainUncompressed_DEX): $(ART_TEST_TARGET_GTEST_Main_DEX) $(ZIPALIGN)
106	cp $< $@
107	$(call uncompress-dexs, $@)
108	$(call align-package, $@)
109
110$(ART_TEST_HOST_GTEST_EmptyUncompressed_DEX): $(ZIPALIGN)
111	touch $(dir $@)classes.dex
112	zip -j -qD -X -0 $@ $(dir $@)classes.dex
113	rm $(dir $@)classes.dex
114
115$(ART_TEST_TARGET_GTEST_EmptyUncompressed_DEX): $(ZIPALIGN)
116	touch $(dir $@)classes.dex
117	zip -j -qD -X -0 $@ $(dir $@)classes.dex
118	rm $(dir $@)classes.dex
119
120$(ART_TEST_HOST_GTEST_MultiDexUncompressed_DEX): $(ART_TEST_HOST_GTEST_MultiDex_DEX) $(ZIPALIGN)
121	cp $< $@
122	$(call uncompress-dexs, $@)
123	$(call align-package, $@)
124
125$(ART_TEST_TARGET_GTEST_MultiDexUncompressed_DEX): $(ART_TEST_TARGET_GTEST_MultiDex_DEX) $(ZIPALIGN)
126	cp $< $@
127	$(call uncompress-dexs, $@)
128	$(call align-package, $@)
129
130ART_TEST_GTEST_VerifierDeps_SRC := $(abspath $(wildcard $(LOCAL_PATH)/VerifierDeps/*.smali))
131ART_TEST_GTEST_VerifierDepsMulti_SRC := $(abspath $(wildcard $(LOCAL_PATH)/VerifierDepsMulti/*.smali))
132ART_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))
133ART_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))
134ART_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))
135ART_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))
136
137$(ART_TEST_HOST_GTEST_VerifierDeps_DEX): $(ART_TEST_GTEST_VerifierDeps_SRC) $(HOST_OUT_EXECUTABLES)/smali
138	 $(HOST_OUT_EXECUTABLES)/smali assemble --output $@ $(filter %.smali,$^)
139
140$(ART_TEST_TARGET_GTEST_VerifierDeps_DEX): $(ART_TEST_GTEST_VerifierDeps_SRC) $(HOST_OUT_EXECUTABLES)/smali
141	 $(HOST_OUT_EXECUTABLES)/smali assemble --output $@ $(filter %.smali,$^)
142
143$(ART_TEST_HOST_GTEST_VerifierDepsMulti_DEX): $(ART_TEST_GTEST_VerifierDepsMulti_SRC) $(HOST_OUT_EXECUTABLES)/smali
144	 $(HOST_OUT_EXECUTABLES)/smali assemble --output $@ $(filter %.smali,$^)
145
146$(ART_TEST_TARGET_GTEST_VerifierDepsMulti_DEX): $(ART_TEST_GTEST_VerifierDepsMulti_SRC) $(HOST_OUT_EXECUTABLES)/smali
147	 $(HOST_OUT_EXECUTABLES)/smali assemble --output $@ $(filter %.smali,$^)
148
149# Dex file dependencies for each gtest.
150ART_GTEST_art_dex_file_loader_test_DEX_DEPS := GetMethodSignature Main Nested MultiDex
151ART_GTEST_dex2oat_environment_tests_DEX_DEPS := Main MainStripped MultiDex MultiDexModifiedSecondary MyClassNatives Nested VerifierDeps VerifierDepsMulti
152
153ART_GTEST_atomic_dex_ref_map_test_DEX_DEPS := Interfaces
154ART_GTEST_class_linker_test_DEX_DEPS := AllFields ErroneousA ErroneousB ErroneousInit ForClassLoaderA ForClassLoaderB ForClassLoaderC ForClassLoaderD Interfaces MethodTypes MultiDex MyClass Nested Statics StaticsFromCode
155ART_GTEST_class_loader_context_test_DEX_DEPS := Main MultiDex MyClass ForClassLoaderA ForClassLoaderB ForClassLoaderC ForClassLoaderD
156ART_GTEST_class_table_test_DEX_DEPS := XandY
157ART_GTEST_compiler_driver_test_DEX_DEPS := AbstractMethod StaticLeafMethods ProfileTestMultiDex
158ART_GTEST_dex_cache_test_DEX_DEPS := Main Packages MethodTypes
159ART_GTEST_dexlayout_test_DEX_DEPS := ManyMethods
160ART_GTEST_dex2oat_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS) ManyMethods Statics VerifierDeps MainUncompressed EmptyUncompressed
161ART_GTEST_dex2oat_image_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS) Statics VerifierDeps
162ART_GTEST_exception_test_DEX_DEPS := ExceptionHandle
163ART_GTEST_hiddenapi_test_DEX_DEPS := HiddenApi
164ART_GTEST_hidden_api_test_DEX_DEPS := HiddenApiSignatures
165ART_GTEST_image_test_DEX_DEPS := ImageLayoutA ImageLayoutB DefaultMethods
166ART_GTEST_imtable_test_DEX_DEPS := IMTA IMTB
167ART_GTEST_instrumentation_test_DEX_DEPS := Instrumentation
168ART_GTEST_jni_compiler_test_DEX_DEPS := MyClassNatives
169ART_GTEST_jni_internal_test_DEX_DEPS := AllFields StaticLeafMethods
170ART_GTEST_oat_file_assistant_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
171ART_GTEST_dexoptanalyzer_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
172ART_GTEST_image_space_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
173ART_GTEST_oat_file_test_DEX_DEPS := Main MultiDex MainUncompressed MultiDexUncompressed
174ART_GTEST_oat_test_DEX_DEPS := Main
175ART_GTEST_oat_writer_test_DEX_DEPS := Main
176ART_GTEST_object_test_DEX_DEPS := ProtoCompare ProtoCompare2 StaticsFromCode XandY
177ART_GTEST_patchoat_test_DEX_DEPS := $(ART_GTEST_dex2oat_environment_tests_DEX_DEPS)
178ART_GTEST_proxy_test_DEX_DEPS := Interfaces
179ART_GTEST_reflection_test_DEX_DEPS := Main NonStaticLeafMethods StaticLeafMethods
180ART_GTEST_profile_assistant_test_DEX_DEPS := ProfileTestMultiDex
181ART_GTEST_profile_compilation_info_test_DEX_DEPS := ManyMethods ProfileTestMultiDex
182ART_GTEST_runtime_callbacks_test_DEX_DEPS := XandY
183ART_GTEST_stub_test_DEX_DEPS := AllFields
184ART_GTEST_transaction_test_DEX_DEPS := Transaction
185ART_GTEST_type_lookup_table_test_DEX_DEPS := Lookup
186ART_GTEST_unstarted_runtime_test_DEX_DEPS := Nested
187ART_GTEST_heap_verification_test_DEX_DEPS := ProtoCompare ProtoCompare2 StaticsFromCode XandY
188ART_GTEST_verifier_deps_test_DEX_DEPS := VerifierDeps VerifierDepsMulti MultiDex
189ART_GTEST_dex_to_dex_decompiler_test_DEX_DEPS := VerifierDeps DexToDexDecompiler
190ART_GTEST_oatdump_app_test_DEX_DEPS := ProfileTestMultiDex
191
192# The elf writer test has dependencies on core.oat.
193ART_GTEST_elf_writer_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32)
194ART_GTEST_elf_writer_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_DEFAULT_64) $(TARGET_CORE_IMAGE_DEFAULT_32)
195
196ART_GTEST_dex2oat_environment_tests_HOST_DEPS := \
197  $(HOST_CORE_IMAGE_optimizing_64) \
198  $(HOST_CORE_IMAGE_optimizing_32) \
199  $(HOST_CORE_IMAGE_interpreter_64) \
200  $(HOST_CORE_IMAGE_interpreter_32) \
201  patchoatd-host
202ART_GTEST_dex2oat_environment_tests_TARGET_DEPS := \
203  $(TARGET_CORE_IMAGE_optimizing_64) \
204  $(TARGET_CORE_IMAGE_optimizing_32) \
205  $(TARGET_CORE_IMAGE_interpreter_64) \
206  $(TARGET_CORE_IMAGE_interpreter_32) \
207  patchoatd-target
208
209ART_GTEST_oat_file_test_HOST_DEPS := \
210  $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
211ART_GTEST_oat_file_test_TARGET_DEPS := \
212  $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
213
214ART_GTEST_oat_file_assistant_test_HOST_DEPS := \
215  $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
216ART_GTEST_oat_file_assistant_test_TARGET_DEPS := \
217  $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
218
219ART_GTEST_dexoptanalyzer_test_HOST_DEPS := \
220  $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS) \
221  dexoptanalyzerd-host
222ART_GTEST_dexoptanalyzer_test_TARGET_DEPS := \
223  $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS) \
224  dexoptanalyzerd-target
225
226ART_GTEST_image_space_test_HOST_DEPS := \
227  $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
228ART_GTEST_image_space_test_TARGET_DEPS := \
229  $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
230
231ART_GTEST_dex2oat_test_HOST_DEPS := \
232  $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS) \
233  dex2oatd-host
234ART_GTEST_dex2oat_test_TARGET_DEPS := \
235  $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS) \
236  dex2oatd-target
237
238ART_GTEST_dex2oat_image_test_HOST_DEPS := \
239  $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS) \
240  dex2oatd-host
241ART_GTEST_dex2oat_image_test_TARGET_DEPS := \
242  $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS) \
243  dex2oatd-target
244
245# TODO: document why this is needed.
246ART_GTEST_proxy_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32)
247
248# The dexdiag test requires the dexdiag utility.
249ART_GTEST_dexdiag_test_HOST_DEPS := dexdiag-host
250ART_GTEST_dexdiag_test_TARGET_DEPS := dexdiag-target
251
252# The dexdump test requires an image and the dexdump utility.
253# TODO: rename into dexdump when migration completes
254ART_GTEST_dexdump_test_HOST_DEPS := \
255  $(HOST_CORE_IMAGE_DEFAULT_64) \
256  $(HOST_CORE_IMAGE_DEFAULT_32) \
257  dexdump2-host
258ART_GTEST_dexdump_test_TARGET_DEPS := \
259  $(TARGET_CORE_IMAGE_DEFAULT_64) \
260  $(TARGET_CORE_IMAGE_DEFAULT_32) \
261  dexdump2-target
262
263# The dexlayout test requires an image and the dexlayout utility.
264# TODO: rename into dexdump when migration completes
265ART_GTEST_dexlayout_test_HOST_DEPS := \
266  $(HOST_CORE_IMAGE_DEFAULT_64) \
267  $(HOST_CORE_IMAGE_DEFAULT_32) \
268  dexlayoutd-host \
269  dexdump2-host
270ART_GTEST_dexlayout_test_TARGET_DEPS := \
271  $(TARGET_CORE_IMAGE_DEFAULT_64) \
272  $(TARGET_CORE_IMAGE_DEFAULT_32) \
273  dexlayoutd-target \
274  dexdump2-target
275
276# The dexlist test requires an image and the dexlist utility.
277ART_GTEST_dexlist_test_HOST_DEPS := \
278  $(HOST_CORE_IMAGE_DEFAULT_64) \
279  $(HOST_CORE_IMAGE_DEFAULT_32) \
280  dexlist-host
281ART_GTEST_dexlist_test_TARGET_DEPS := \
282  $(TARGET_CORE_IMAGE_DEFAULT_64) \
283  $(TARGET_CORE_IMAGE_DEFAULT_32) \
284  dexlist-target
285
286# The imgdiag test has dependencies on core.oat since it needs to load it during the test.
287# For the host, also add the installed tool (in the base size, that should suffice). For the
288# target, just the module is fine, the sync will happen late enough.
289ART_GTEST_imgdiag_test_HOST_DEPS := \
290  $(HOST_CORE_IMAGE_DEFAULT_64) \
291  $(HOST_CORE_IMAGE_DEFAULT_32) \
292  imgdiagd-host
293ART_GTEST_imgdiag_test_TARGET_DEPS := \
294  $(TARGET_CORE_IMAGE_DEFAULT_64) \
295  $(TARGET_CORE_IMAGE_DEFAULT_32) \
296  imgdiagd-target
297
298# Oatdump test requires an image and oatfile to dump.
299ART_GTEST_oatdump_test_HOST_DEPS := \
300  $(HOST_CORE_IMAGE_DEFAULT_64) \
301  $(HOST_CORE_IMAGE_DEFAULT_32) \
302  oatdumpd-host \
303  oatdumpds-host \
304  dexdump2-host
305ART_GTEST_oatdump_test_TARGET_DEPS := \
306  $(TARGET_CORE_IMAGE_DEFAULT_64) \
307  $(TARGET_CORE_IMAGE_DEFAULT_32) \
308  oatdumpd-target \
309  dexdump2-target
310ART_GTEST_oatdump_image_test_HOST_DEPS := $(ART_GTEST_oatdump_test_HOST_DEPS)
311ART_GTEST_oatdump_image_test_TARGET_DEPS := $(ART_GTEST_oatdump_test_TARGET_DEPS)
312ART_GTEST_oatdump_app_test_HOST_DEPS := $(ART_GTEST_oatdump_test_HOST_DEPS) \
313  dex2oatd-host \
314  dex2oatds-host
315ART_GTEST_oatdump_app_test_TARGET_DEPS := $(ART_GTEST_oatdump_test_TARGET_DEPS) \
316  dex2oatd-target
317
318ART_GTEST_patchoat_test_HOST_DEPS := \
319  $(ART_GTEST_dex2oat_environment_tests_HOST_DEPS)
320ART_GTEST_patchoat_test_TARGET_DEPS := \
321  $(ART_GTEST_dex2oat_environment_tests_TARGET_DEPS)
322
323# Profile assistant tests requires profman utility.
324ART_GTEST_profile_assistant_test_HOST_DEPS := profmand-host
325ART_GTEST_profile_assistant_test_TARGET_DEPS := profmand-target
326
327ART_GTEST_hiddenapi_test_HOST_DEPS := \
328  $(HOST_CORE_IMAGE_DEFAULT_64) \
329  $(HOST_CORE_IMAGE_DEFAULT_32) \
330  hiddenapid-host
331
332# The path for which all the source files are relative, not actually the current directory.
333LOCAL_PATH := art
334
335ART_TEST_MODULES := \
336    art_cmdline_tests \
337    art_compiler_tests \
338    art_compiler_host_tests \
339    art_dex2oat_tests \
340    art_dexdiag_tests \
341    art_dexdump_tests \
342    art_dexlayout_tests \
343    art_dexlist_tests \
344    art_dexoptanalyzer_tests \
345    art_hiddenapi_tests \
346    art_imgdiag_tests \
347    art_libartbase_tests \
348    art_libdexfile_tests \
349    art_oatdump_tests \
350    art_patchoat_tests \
351    art_profman_tests \
352    art_runtime_tests \
353    art_runtime_compiler_tests \
354    art_sigchain_tests \
355
356ART_TARGET_GTEST_FILES := $(foreach m,$(ART_TEST_MODULES),\
357    $(ART_TEST_LIST_device_$(TARGET_ARCH)_$(m)))
358
359ifdef TARGET_2ND_ARCH
3602ND_ART_TARGET_GTEST_FILES := $(foreach m,$(ART_TEST_MODULES),\
361    $(ART_TEST_LIST_device_$(2ND_TARGET_ARCH)_$(m)))
362endif
363
364ART_HOST_GTEST_FILES := $(foreach m,$(ART_TEST_MODULES),\
365    $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_$(m)))
366
367ifneq ($(HOST_PREFER_32_BIT),true)
3682ND_ART_HOST_GTEST_FILES += $(foreach m,$(ART_TEST_MODULES),\
369    $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_$(m)))
370endif
371
372# Variables holding collections of gtest pre-requisits used to run a number of gtests.
373ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
374ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
375ART_TEST_HOST_GTEST_RULES :=
376ART_TEST_HOST_VALGRIND_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
377ART_TEST_HOST_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
378ART_TEST_HOST_VALGRIND_GTEST_RULES :=
379ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
380ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
381ART_TEST_TARGET_GTEST_RULES :=
382ART_TEST_TARGET_VALGRIND_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
383ART_TEST_TARGET_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
384ART_TEST_TARGET_VALGRIND_GTEST_RULES :=
385ART_TEST_HOST_GTEST_DEPENDENCIES :=
386
387ART_GTEST_TARGET_ANDROID_ROOT := '/system'
388ifneq ($(ART_TEST_ANDROID_ROOT),)
389  ART_GTEST_TARGET_ANDROID_ROOT := $(ART_TEST_ANDROID_ROOT)
390endif
391
392ART_VALGRIND_TARGET_DEPENDENCIES :=
393
394# Has to match list in external/valgrind/Android.build_one.mk
395ART_VALGRIND_SUPPORTED_ARCH := arm arm64 x86_64
396
397# Valgrind is not supported for x86
398ifneq (,$(filter $(ART_VALGRIND_SUPPORTED_ARCH),$(TARGET_ARCH)))
399art_vg_arch := $(if $(filter x86_64,$(TARGET_ARCH)),amd64,$(TARGET_ARCH))
400ART_VALGRIND_TARGET_DEPENDENCIES += \
401  $(TARGET_OUT_EXECUTABLES)/valgrind \
402  $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/memcheck-$(art_vg_arch)-linux \
403  $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_core-$(art_vg_arch)-linux.so \
404  $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_memcheck-$(art_vg_arch)-linux.so \
405  $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/default.supp
406art_vg_arch :=
407endif
408
409ifdef TARGET_2ND_ARCH
410ifneq (,$(filter $(ART_VALGRIND_SUPPORTED_ARCH),$(TARGET_2ND_ARCH)))
411ART_VALGRIND_TARGET_DEPENDENCIES += \
412  $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/memcheck-$(TARGET_2ND_ARCH)-linux \
413  $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_core-$(TARGET_2ND_ARCH)-linux.so \
414  $(TARGET_OUT_SHARED_LIBRARIES)/valgrind/vgpreload_memcheck-$(TARGET_2ND_ARCH)-linux.so
415endif
416endif
417
418include $(CLEAR_VARS)
419LOCAL_MODULE := valgrind-target-suppressions.txt
420LOCAL_MODULE_CLASS := ETC
421LOCAL_MODULE_TAGS := optional
422LOCAL_SRC_FILES := test/valgrind-target-suppressions.txt
423LOCAL_MODULE_PATH := $(ART_TARGET_TEST_OUT)
424include $(BUILD_PREBUILT)
425
426# Define a make rule for a target device gtest.
427# $(1): gtest name - the name of the test we're building such as leb128_test.
428# $(2): path relative to $OUT to the test binary
429# $(3): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
430# $(4): LD_LIBRARY_PATH or undefined - used in case libartd.so is not in /system/lib/
431define define-art-gtest-rule-target
432  gtest_rule := test-art-target-gtest-$(1)$$($(3)ART_PHONY_TEST_TARGET_SUFFIX)
433  gtest_exe := $(OUT_DIR)/$(2)
434  gtest_target_exe := $$(patsubst $(PRODUCT_OUT)/%,/%,$$(gtest_exe))
435
436  # Add the test dependencies to test-art-target-sync, which will be a prerequisite for the test
437  # to ensure files are pushed to the device.
438  TEST_ART_TARGET_SYNC_DEPS += \
439    $$(ART_GTEST_$(1)_TARGET_DEPS) \
440    $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_TARGET_GTEST_$(file)_DEX)) \
441    $$(gtest_exe) \
442    $$($(3)TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so \
443    $$($(3)TARGET_OUT_SHARED_LIBRARIES)/libopenjdkd.so \
444    $$(TARGET_OUT_JAVA_LIBRARIES)/core-libart-testdex.jar \
445    $$(TARGET_OUT_JAVA_LIBRARIES)/core-oj-testdex.jar \
446    $$(ART_TARGET_TEST_OUT)/valgrind-target-suppressions.txt
447
448$$(gtest_rule) valgrind-$$(gtest_rule): PRIVATE_TARGET_EXE := $$(gtest_target_exe)
449
450.PHONY: $$(gtest_rule)
451$$(gtest_rule): test-art-target-sync
452	$(hide) adb shell touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID
453	$(hide) adb shell rm $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID
454	$(hide) adb shell chmod 755 $$(PRIVATE_TARGET_EXE)
455	$(hide) $$(call ART_TEST_SKIP,$$@) && \
456	  (adb shell "env $(GCOV_ENV) LD_LIBRARY_PATH=$(4) \
457	       ANDROID_ROOT=$(ART_GTEST_TARGET_ANDROID_ROOT) $$(PRIVATE_TARGET_EXE) \
458	     && touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID" \
459	   && (adb pull $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID /tmp/ \
460	       && $$(call ART_TEST_PASSED,$$@)) \
461	   || $$(call ART_TEST_FAILED,$$@))
462	$(hide) rm -f /tmp/$$@-$$$$PPID
463
464  ART_TEST_TARGET_GTEST$($(3)ART_PHONY_TEST_TARGET_SUFFIX)_RULES += $$(gtest_rule)
465  ART_TEST_TARGET_GTEST_RULES += $$(gtest_rule)
466  ART_TEST_TARGET_GTEST_$(1)_RULES += $$(gtest_rule)
467
468.PHONY: valgrind-$$(gtest_rule)
469valgrind-$$(gtest_rule): $(ART_VALGRIND_TARGET_DEPENDENCIES) test-art-target-sync
470	$(hide) adb shell touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID
471	$(hide) adb shell rm $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID
472	$(hide) adb shell chmod 755 $$(PRIVATE_TARGET_EXE)
473	$(hide) $$(call ART_TEST_SKIP,$$@) && \
474	  (adb shell "env $(GCOV_ENV) LD_LIBRARY_PATH=$(4) \
475	       ANDROID_ROOT=$(ART_GTEST_TARGET_ANDROID_ROOT) \
476	       $$$$ANDROID_ROOT/bin/valgrind \
477	       --leak-check=full --error-exitcode=1 --workaround-gcc296-bugs=yes \
478	       --suppressions=$(ART_TARGET_TEST_DIR)/valgrind-target-suppressions.txt \
479	       --num-callers=50 --show-mismatched-frees=no $$(PRIVATE_TARGET_EXE) \
480	     && touch $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID" \
481	   && (adb pull $(ART_TARGET_TEST_DIR)/$(TARGET_$(3)ARCH)/$$@-$$$$PPID /tmp/ \
482	       && $$(call ART_TEST_PASSED,$$@)) \
483	   || $$(call ART_TEST_FAILED,$$@))
484	$(hide) rm -f /tmp/$$@-$$$$PPID
485
486  ART_TEST_TARGET_VALGRIND_GTEST$$($(3)ART_PHONY_TEST_TARGET_SUFFIX)_RULES += \
487    valgrind-$$(gtest_rule)
488  ART_TEST_TARGET_VALGRIND_GTEST_RULES += valgrind-$$(gtest_rule)
489  ART_TEST_TARGET_VALGRIND_GTEST_$(1)_RULES += valgrind-$$(gtest_rule)
490
491  # Clear locally defined variables.
492  valgrind_gtest_rule :=
493  gtest_rule :=
494  gtest_exe :=
495  gtest_target_exe :=
496endef  # define-art-gtest-rule-target
497
498ART_VALGRIND_DEPENDENCIES := \
499  $(HOST_OUT_EXECUTABLES)/valgrind \
500  $(HOST_OUT)/lib64/valgrind/memcheck-amd64-linux \
501  $(HOST_OUT)/lib64/valgrind/memcheck-x86-linux \
502  $(HOST_OUT)/lib64/valgrind/default.supp \
503  $(HOST_OUT)/lib64/valgrind/vgpreload_core-amd64-linux.so \
504  $(HOST_OUT)/lib64/valgrind/vgpreload_core-x86-linux.so \
505  $(HOST_OUT)/lib64/valgrind/vgpreload_memcheck-amd64-linux.so \
506  $(HOST_OUT)/lib64/valgrind/vgpreload_memcheck-x86-linux.so
507
508# Define make rules for a host gtests.
509# $(1): gtest name - the name of the test we're building such as leb128_test.
510# $(2): path relative to $OUT to the test binary
511# $(3): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
512define define-art-gtest-rule-host
513  gtest_rule := test-art-host-gtest-$(1)$$($(3)ART_PHONY_TEST_HOST_SUFFIX)
514  gtest_exe := $(OUT_DIR)/$(2)
515  # Dependencies for all host gtests.
516  gtest_deps := $$(HOST_CORE_DEX_LOCATIONS) \
517    $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$$(ART_HOST_SHLIB_EXTENSION) \
518    $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$$(ART_HOST_SHLIB_EXTENSION) \
519    $$(gtest_exe) \
520    $$(ART_GTEST_$(1)_HOST_DEPS) \
521    $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_HOST_GTEST_$(file)_DEX))
522  ifneq (,$(DIST_DIR))
523    gtest_xml_output := --gtest_output=xml:$(DIST_DIR)/gtest/$(1)$$($(3)ART_PHONY_TEST_HOST_SUFFIX).xml
524  else
525    gtest_xml_output :=
526  endif
527
528  ART_TEST_HOST_GTEST_DEPENDENCIES += $$(gtest_deps)
529
530.PHONY: $$(gtest_rule)
531ifeq (,$(SANITIZE_HOST))
532$$(gtest_rule): PRIVATE_XML_OUTPUT := $$(gtest_xml_output)
533$$(gtest_rule): $$(gtest_exe) $$(gtest_deps)
534	$(hide) ($$(call ART_TEST_SKIP,$$@) && $$< $$(PRIVATE_XML_OUTPUT) && \
535		$$(call ART_TEST_PASSED,$$@)) || $$(call ART_TEST_FAILED,$$@)
536else
537# Note: envsetup currently exports ASAN_OPTIONS=detect_leaks=0 to suppress leak detection, as some
538#       build tools (e.g., ninja) intentionally leak. We want leak checks when we run our tests, so
539#       override ASAN_OPTIONS. b/37751350
540# Note 2: Under sanitization, also capture the output, and run it through the stack tool on failure
541# (with the x86-64 ABI, as this allows symbolization of both x86 and x86-64). We don't do this in
542# general as it loses all the color output, and we have our own symbolization step when not running
543# under ASAN.
544$$(gtest_rule): PRIVATE_XML_OUTPUT := $$(gtest_xml_output)
545$$(gtest_rule): $$(gtest_exe) $$(gtest_deps)
546	$(hide) ($$(call ART_TEST_SKIP,$$@) && set -o pipefail && \
547		ASAN_OPTIONS=detect_leaks=1 $$< $$(PRIVATE_XML_OUTPUT) 2>&1 | tee $$<.tmp.out >&2 && \
548		{ $$(call ART_TEST_PASSED,$$@) ; rm $$<.tmp.out ; }) || \
549		( grep -q AddressSanitizer $$<.tmp.out && export ANDROID_BUILD_TOP=`pwd` && \
550			{ echo "ABI: 'x86_64'" | cat - $$<.tmp.out | development/scripts/stack | tail -n 3000 ; } ; \
551		rm $$<.tmp.out ; $$(call ART_TEST_FAILED,$$@))
552endif
553
554  ART_TEST_HOST_GTEST$$($(3)ART_PHONY_TEST_HOST_SUFFIX)_RULES += $$(gtest_rule)
555  ART_TEST_HOST_GTEST_RULES += $$(gtest_rule)
556  ART_TEST_HOST_GTEST_$(1)_RULES += $$(gtest_rule)
557
558
559.PHONY: valgrind-$$(gtest_rule)
560valgrind-$$(gtest_rule): $$(gtest_exe) $$(gtest_deps) $(ART_VALGRIND_DEPENDENCIES)
561	$(hide) $$(call ART_TEST_SKIP,$$@) && \
562	  VALGRIND_LIB=$(HOST_OUT)/lib64/valgrind \
563	  $(HOST_OUT_EXECUTABLES)/valgrind --leak-check=full --error-exitcode=1 \
564	    --suppressions=art/test/valgrind-suppressions.txt --num-callers=50 \
565	    $$< && \
566	    $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
567
568  ART_TEST_HOST_VALGRIND_GTEST$$($(3)ART_PHONY_TEST_HOST_SUFFIX)_RULES += valgrind-$$(gtest_rule)
569  ART_TEST_HOST_VALGRIND_GTEST_RULES += valgrind-$$(gtest_rule)
570  ART_TEST_HOST_VALGRIND_GTEST_$(1)_RULES += valgrind-$$(gtest_rule)
571
572  # Clear locally defined variables.
573  valgrind_gtest_rule :=
574  gtest_rule :=
575  gtest_exe :=
576  gtest_deps :=
577endef  # define-art-gtest-rule-host
578
579# Define the rules to build and run host and target gtests.
580# $(1): file name
581# $(2): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
582define define-art-gtest-target
583  art_gtest_filename := $(1)
584
585  include $$(CLEAR_VARS)
586  art_gtest_name := $$(notdir $$(basename $$(art_gtest_filename)))
587
588  library_path :=
589  2ND_library_path :=
590  ifneq ($$(ART_TEST_ANDROID_ROOT),)
591    ifdef TARGET_2ND_ARCH
592      2ND_library_path := $$(ART_TEST_ANDROID_ROOT)/lib
593      library_path := $$(ART_TEST_ANDROID_ROOT)/lib64
594    else
595      ifneq ($(filter %64,$(TARGET_ARCH)),)
596        library_path := $$(ART_TEST_ANDROID_ROOT)/lib64
597      else
598        library_path := $$(ART_TEST_ANDROID_ROOT)/lib
599      endif
600    endif
601  endif
602
603  ifndef ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES
604    ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES :=
605    ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
606  endif
607  $$(eval $$(call define-art-gtest-rule-target,$$(art_gtest_name),$$(art_gtest_filename),$(2),$$($(2)library_path)))
608
609  # Clear locally defined variables.
610  art_gtest_filename :=
611  art_gtest_name :=
612  library_path :=
613  2ND_library_path :=
614endef  # define-art-gtest-target
615
616# $(1): file name
617# $(2): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
618define define-art-gtest-host
619  art_gtest_filename := $(1)
620
621  include $$(CLEAR_VARS)
622  art_gtest_name := $$(notdir $$(basename $$(art_gtest_filename)))
623  ifndef ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES
624    ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES :=
625    ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
626  endif
627  $$(eval $$(call define-art-gtest-rule-host,$$(art_gtest_name),$$(art_gtest_filename),$(2)))
628
629  # Clear locally defined variables.
630  art_gtest_filename :=
631  art_gtest_name :=
632endef  # define-art-gtest-host
633
634# Define the rules to build and run gtests for both archs on target.
635# $(1): test name
636define define-art-gtest-target-both
637  art_gtest_name := $(1)
638
639    # A rule to run the different architecture versions of the gtest.
640.PHONY: test-art-target-gtest-$$(art_gtest_name)
641test-art-target-gtest-$$(art_gtest_name): $$(ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES)
642	$$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
643
644.PHONY: valgrind-test-art-target-gtest-$$(art_gtest_name)
645valgrind-test-art-target-gtest-$$(art_gtest_name): $$(ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES)
646	$$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
647
648  # Clear now unused variables.
649  ART_TEST_TARGET_GTEST_$$(art_gtest_name)_RULES :=
650  ART_TEST_TARGET_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
651  art_gtest_name :=
652endef  # define-art-gtest-target-both
653
654# Define the rules to build and run gtests for both archs on host.
655# $(1): test name
656define define-art-gtest-host-both
657  art_gtest_name := $(1)
658
659.PHONY: test-art-host-gtest-$$(art_gtest_name)
660test-art-host-gtest-$$(art_gtest_name): $$(ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES)
661	$$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
662
663.PHONY: valgrind-test-art-host-gtest-$$(art_gtest_name)
664valgrind-test-art-host-gtest-$$(art_gtest_name): $$(ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES)
665	$$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
666
667  # Clear now unused variables.
668  ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES :=
669  ART_TEST_HOST_VALGRIND_GTEST_$$(art_gtest_name)_RULES :=
670  art_gtest_name :=
671endef  # define-art-gtest-host-both
672
673ifeq ($(ART_BUILD_TARGET),true)
674  $(foreach file,$(ART_TARGET_GTEST_FILES), $(eval $(call define-art-gtest-target,$(file),)))
675  ifdef TARGET_2ND_ARCH
676    $(foreach file,$(2ND_ART_TARGET_GTEST_FILES), $(eval $(call define-art-gtest-target,$(file),2ND_)))
677  endif
678  # Rules to run the different architecture versions of the gtest.
679  $(foreach file,$(ART_TARGET_GTEST_FILES), $(eval $(call define-art-gtest-target-both,$$(notdir $$(basename $$(file))))))
680endif
681ifeq ($(ART_BUILD_HOST),true)
682  $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),)))
683  ifneq ($(HOST_PREFER_32_BIT),true)
684    $(foreach file,$(2ND_ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),2ND_)))
685  endif
686  # Rules to run the different architecture versions of the gtest.
687  $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host-both,$$(notdir $$(basename $$(file))))))
688endif
689
690# Used outside the art project to get a list of the current tests
691RUNTIME_TARGET_GTEST_MAKE_TARGETS :=
692$(foreach file, $(ART_TARGET_GTEST_FILES), $(eval RUNTIME_TARGET_GTEST_MAKE_TARGETS += $$(notdir $$(basename $$(file)))))
693COMPILER_TARGET_GTEST_MAKE_TARGETS :=
694
695# Define all the combinations of host/target, valgrind and suffix such as:
696# test-art-host-gtest or valgrind-test-art-host-gtest64
697# $(1): host or target
698# $(2): HOST or TARGET
699# $(3): valgrind- or undefined
700# $(4): undefined, 32 or 64
701define define-test-art-gtest-combination
702  ifeq ($(1),host)
703    ifneq ($(2),HOST)
704      $$(error argument mismatch $(1) and ($2))
705    endif
706  else
707    ifneq ($(1),target)
708      $$(error found $(1) expected host or target)
709    endif
710    ifneq ($(2),TARGET)
711      $$(error argument mismatch $(1) and ($2))
712    endif
713  endif
714
715  rule_name := $(3)test-art-$(1)-gtest$(4)
716  ifeq ($(3),valgrind-)
717    dependencies := $$(ART_TEST_$(2)_VALGRIND_GTEST$(4)_RULES)
718  else
719    dependencies := $$(ART_TEST_$(2)_GTEST$(4)_RULES)
720  endif
721
722.PHONY: $$(rule_name)
723$$(rule_name): $$(dependencies) dx d8-compat-dx desugar
724	$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
725
726  # Clear locally defined variables.
727  rule_name :=
728  dependencies :=
729endef  # define-test-art-gtest-combination
730
731$(eval $(call define-test-art-gtest-combination,target,TARGET,,))
732$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,))
733$(eval $(call define-test-art-gtest-combination,target,TARGET,,$(ART_PHONY_TEST_TARGET_SUFFIX)))
734$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,$(ART_PHONY_TEST_TARGET_SUFFIX)))
735ifdef TARGET_2ND_ARCH
736$(eval $(call define-test-art-gtest-combination,target,TARGET,,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)))
737$(eval $(call define-test-art-gtest-combination,target,TARGET,valgrind-,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)))
738endif
739$(eval $(call define-test-art-gtest-combination,host,HOST,,))
740$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,))
741$(eval $(call define-test-art-gtest-combination,host,HOST,,$(ART_PHONY_TEST_HOST_SUFFIX)))
742$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,$(ART_PHONY_TEST_HOST_SUFFIX)))
743ifneq ($(HOST_PREFER_32_BIT),true)
744$(eval $(call define-test-art-gtest-combination,host,HOST,,$(2ND_ART_PHONY_TEST_HOST_SUFFIX)))
745$(eval $(call define-test-art-gtest-combination,host,HOST,valgrind-,$(2ND_ART_PHONY_TEST_HOST_SUFFIX)))
746endif
747
748# Clear locally defined variables.
749define-art-gtest-rule-target :=
750define-art-gtest-rule-host :=
751define-art-gtest :=
752define-test-art-gtest-combination :=
753RUNTIME_GTEST_COMMON_SRC_FILES :=
754COMPILER_GTEST_COMMON_SRC_FILES :=
755RUNTIME_GTEST_TARGET_SRC_FILES :=
756RUNTIME_GTEST_HOST_SRC_FILES :=
757COMPILER_GTEST_TARGET_SRC_FILES :=
758COMPILER_GTEST_HOST_SRC_FILES :=
759ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
760ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
761ART_TEST_HOST_GTEST_RULES :=
762ART_TEST_HOST_VALGRIND_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
763ART_TEST_HOST_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
764ART_TEST_HOST_VALGRIND_GTEST_RULES :=
765ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
766ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
767ART_TEST_TARGET_GTEST_RULES :=
768ART_TEST_TARGET_VALGRIND_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
769ART_TEST_TARGET_VALGRIND_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
770ART_TEST_TARGET_VALGRIND_GTEST_RULES :=
771ART_GTEST_TARGET_ANDROID_ROOT :=
772ART_GTEST_class_linker_test_DEX_DEPS :=
773ART_GTEST_class_table_test_DEX_DEPS :=
774ART_GTEST_compiler_driver_test_DEX_DEPS :=
775ART_GTEST_dex_file_test_DEX_DEPS :=
776ART_GTEST_exception_test_DEX_DEPS :=
777ART_GTEST_elf_writer_test_HOST_DEPS :=
778ART_GTEST_elf_writer_test_TARGET_DEPS :=
779ART_GTEST_imtable_test_DEX_DEPS :=
780ART_GTEST_jni_compiler_test_DEX_DEPS :=
781ART_GTEST_jni_internal_test_DEX_DEPS :=
782ART_GTEST_oat_file_assistant_test_DEX_DEPS :=
783ART_GTEST_oat_file_assistant_test_HOST_DEPS :=
784ART_GTEST_oat_file_assistant_test_TARGET_DEPS :=
785ART_GTEST_dexoptanalyzer_test_DEX_DEPS :=
786ART_GTEST_dexoptanalyzer_test_HOST_DEPS :=
787ART_GTEST_dexoptanalyzer_test_TARGET_DEPS :=
788ART_GTEST_image_space_test_DEX_DEPS :=
789ART_GTEST_image_space_test_HOST_DEPS :=
790ART_GTEST_image_space_test_TARGET_DEPS :=
791ART_GTEST_dex2oat_test_DEX_DEPS :=
792ART_GTEST_dex2oat_test_HOST_DEPS :=
793ART_GTEST_dex2oat_test_TARGET_DEPS :=
794ART_GTEST_dex2oat_image_test_DEX_DEPS :=
795ART_GTEST_dex2oat_image_test_HOST_DEPS :=
796ART_GTEST_dex2oat_image_test_TARGET_DEPS :=
797ART_GTEST_object_test_DEX_DEPS :=
798ART_GTEST_patchoat_test_DEX_DEPS :=
799ART_GTEST_patchoat_test_HOST_DEPS :=
800ART_GTEST_patchoat_test_TARGET_DEPS :=
801ART_GTEST_proxy_test_DEX_DEPS :=
802ART_GTEST_reflection_test_DEX_DEPS :=
803ART_GTEST_stub_test_DEX_DEPS :=
804ART_GTEST_transaction_test_DEX_DEPS :=
805ART_GTEST_dex2oat_environment_tests_DEX_DEPS :=
806ART_GTEST_heap_verification_test_DEX_DEPS :=
807ART_GTEST_verifier_deps_test_DEX_DEPS :=
808ART_VALGRIND_DEPENDENCIES :=
809ART_VALGRIND_TARGET_DEPENDENCIES :=
810$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_TARGET_GTEST_$(dir)_DEX :=))
811$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_HOST_GTEST_$(dir)_DEX :=))
812ART_TEST_HOST_GTEST_MainStripped_DEX :=
813ART_TEST_TARGET_GTEST_MainStripped_DEX :=
814ART_TEST_HOST_GTEST_MainUncompressed_DEX :=
815ART_TEST_TARGET_GTEST_MainUncompressed_DEX :=
816ART_TEST_HOST_GTEST_EmptyUncompressed_DEX :=
817ART_TEST_TARGET_GTEST_EmptyUncompressed_DEX :=
818ART_TEST_GTEST_VerifierDeps_SRC :=
819ART_TEST_HOST_GTEST_VerifierDeps_DEX :=
820ART_TEST_TARGET_GTEST_VerifierDeps_DEX :=
821GTEST_DEX_DIRECTORIES :=
822LOCAL_PATH :=
823