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# Build rules are excluded from Mac, since we can not run ART tests there in the first place.
18ifneq ($(HOST_OS),darwin)
19
20LOCAL_PATH := $(call my-dir)
21
22###################################################################################################
23# Create module in testcases to hold all common data and tools needed for ART host tests.
24
25# ART binary tools and libraries (automatic list of all art_cc_binary/art_cc_library modules).
26my_files := $(ART_TESTCASES_CONTENT)
27
28# Manually add system libraries that we need to run the host ART tools.
29my_files += \
30  $(foreach lib, libbase libc++ libicu libicu_jni liblog libsigchain libunwindstack \
31    libziparchive libjavacore libandroidio libopenjdkd liblz4 liblzma, \
32    $(call intermediates-dir-for,SHARED_LIBRARIES,$(lib),HOST)/$(lib).so:lib64/$(lib).so \
33    $(call intermediates-dir-for,SHARED_LIBRARIES,$(lib),HOST,,2ND)/$(lib).so:lib/$(lib).so) \
34  $(foreach lib, libcrypto libz libicuuc libicui18n libexpat, \
35    $(call intermediates-dir-for,SHARED_LIBRARIES,$(lib),HOST)/$(lib).so:lib64/$(lib)-host.so \
36    $(call intermediates-dir-for,SHARED_LIBRARIES,$(lib),HOST,,2ND)/$(lib).so:lib/$(lib)-host.so)
37
38# Add apex directories for art, conscrypt and i18n.
39icu_data_file := $(firstword $(wildcard external/icu/icu4c/source/stubdata/icu*.dat))
40my_files += $(foreach infix,_ _VDEX_,$(foreach suffix,$(HOST_ARCH) $(HOST_2ND_ARCH), \
41  $(DEXPREOPT_IMAGE$(infix)BUILT_INSTALLED_art_host_$(suffix))))
42# `dexpreopt_bootjars.go` uses a single source of input regardless of variants, so we should use the
43# same source to avoid checksum mismatches on the oat files.
44my_files += \
45  $(foreach jar,$(CORE_IMG_JARS),\
46    $(OUT_DIR)/soong/dexpreopt_$(TARGET_ARCH)/dex_artjars_input/$(jar).jar:apex/com.android.art/javalib/$(jar).jar) \
47  $(OUT_DIR)/soong/dexpreopt_$(TARGET_ARCH)/dex_artjars_input/conscrypt.jar:apex/com.android.conscrypt/javalib/conscrypt.jar\
48  $(OUT_DIR)/soong/dexpreopt_$(TARGET_ARCH)/dex_artjars_input/core-icu4j.jar:apex/com.android.i18n/javalib/core-icu4j.jar \
49  $(icu_data_file):com.android.i18n/etc/icu/$(notdir $(icu_data_file))
50
51# Create phony module that will copy all the data files into testcases directory.
52# For now, this copies everything to "out/host/linux-x86/" subdirectory, since it
53# is hard-coded in many places. TODO: Refactor tests to remove the need for this.
54include $(CLEAR_VARS)
55LOCAL_IS_HOST_MODULE := true
56LOCAL_MODULE := art_common
57LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0
58LOCAL_LICENSE_CONDITIONS := notice
59LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../NOTICE
60LOCAL_MODULE_TAGS := tests
61LOCAL_MODULE_CLASS := NATIVE_TESTS
62LOCAL_MODULE_SUFFIX := .txt
63LOCAL_COMPATIBILITY_SUITE := art-host-tests
64LOCAL_COMPATIBILITY_SUPPORT_FILES := $(ART_TESTCASES_PREBUILT_CONTENT) \
65	$(foreach f,$(my_files),$(call word-colon,1,$f):out/host/linux-x86/$(call word-colon,2,$f))
66include $(BUILD_SYSTEM)/base_rules.mk
67
68$(LOCAL_BUILT_MODULE):
69	@mkdir -p $(dir $@)
70	echo "This directory contains common data and tools needed for ART host tests" > $@
71
72my_files :=
73include $(CLEAR_VARS)
74###################################################################################################
75
76# The path for which all the dex files are relative, not actually the current directory.
77LOCAL_PATH := art/test
78
79include art/build/Android.common_test.mk
80include art/build/Android.common_path.mk
81include art/build/Android.common_build.mk
82
83# Deprecated core.art dependencies.
84HOST_CORE_IMAGE_DEFAULT_32 :=
85HOST_CORE_IMAGE_DEFAULT_64 :=
86TARGET_CORE_IMAGE_DEFAULT_32 :=
87TARGET_CORE_IMAGE_DEFAULT_64 :=
88
89# The elf writer test has dependencies on core.oat.
90ART_GTEST_elf_writer_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32)
91ART_GTEST_elf_writer_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_DEFAULT_64) $(TARGET_CORE_IMAGE_DEFAULT_32)
92
93# The two_runtimes_test test has dependencies on core.oat.
94ART_GTEST_two_runtimes_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32)
95ART_GTEST_two_runtimes_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_DEFAULT_64) $(TARGET_CORE_IMAGE_DEFAULT_32)
96
97# The transaction test has dependencies on core.oat.
98ART_GTEST_transaction_test_HOST_DEPS := $(HOST_CORE_IMAGE_DEFAULT_64) $(HOST_CORE_IMAGE_DEFAULT_32)
99ART_GTEST_transaction_test_TARGET_DEPS := $(TARGET_CORE_IMAGE_DEFAULT_64) $(TARGET_CORE_IMAGE_DEFAULT_32)
100
101# The path for which all the source files are relative, not actually the current directory.
102LOCAL_PATH := art
103
104ART_TEST_MODULES_COMMON := \
105    art_cmdline_tests \
106    art_compiler_host_tests \
107    art_compiler_tests \
108    art_dexanalyze_tests \
109    art_dexdump_tests \
110    art_dexlist_tests \
111    art_dexoptanalyzer_tests \
112    art_disassembler_tests \
113    art_hiddenapi_tests \
114    art_imgdiag_tests \
115    art_libartbase_tests \
116    art_libartpalette_tests \
117    art_libartservice_tests \
118    art_libarttools_tests \
119    art_libdexfile_external_tests \
120    art_libdexfile_support_static_tests \
121    art_libdexfile_support_tests \
122    art_libdexfile_tests \
123    art_libprofile_tests \
124    art_oatdump_tests \
125    art_profman_tests \
126    art_runtime_tests \
127
128# b/258770641 Temporarily disable sigchain and dex2oat tests on ASAN configuration while we
129# investigate the failures.
130ifeq (,$(SANITIZE_HOST))
131  ART_TEST_MODULES_COMMON += art_sigchain_tests
132  ART_TEST_MODULES_COMMON += art_dex2oat_tests
133endif
134
135ART_TEST_MODULES_TARGET := $(ART_TEST_MODULES_COMMON) \
136    art_artd_tests \
137    art_odrefresh_tests \
138
139ART_TEST_MODULES_HOST := $(ART_TEST_MODULES_COMMON)
140
141ifneq (,$(wildcard frameworks/native/libs/binder))
142  # Only include the artd host tests if we have the binder sources available and
143  # can build the libbinder_ndk dependency. It is not available as a prebuilt on
144  # master-art.
145  ART_TEST_MODULES_HOST += art_artd_tests
146endif
147
148ART_TARGET_GTEST_NAMES := $(foreach tm,$(ART_TEST_MODULES_TARGET),\
149  $(foreach path,$(ART_TEST_LIST_device_$(TARGET_ARCH)_$(tm)),\
150    $(notdir $(path))\
151   )\
152)
153
154ART_HOST_GTEST_FILES := $(foreach m,$(ART_TEST_MODULES_HOST),\
155    $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_$(m)))
156
157ifneq ($(HOST_PREFER_32_BIT),true)
1582ND_ART_HOST_GTEST_FILES += $(foreach m,$(ART_TEST_MODULES_HOST),\
159    $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_$(m)))
160endif
161
162# Variables holding collections of gtest pre-requisits used to run a number of gtests.
163ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
164ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
165ART_TEST_HOST_GTEST_RULES :=
166ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES :=
167ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES :=
168ART_TEST_HOST_GTEST_BUILD_RULES :=
169ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
170ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
171ART_TEST_TARGET_GTEST_RULES :=
172ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_BUILD_RULES :=
173ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_BUILD_RULES :=
174ART_TEST_TARGET_GTEST_BUILD_RULES :=
175ART_TEST_HOST_GTEST_DEPENDENCIES :=
176ART_TEST_TARGET_GTEST_DEPENDENCIES :=
177
178ART_GTEST_TARGET_ANDROID_ROOT := '/system'
179ifneq ($(ART_TEST_ANDROID_ROOT),)
180  ART_GTEST_TARGET_ANDROID_ROOT := $(ART_TEST_ANDROID_ROOT)
181endif
182
183ART_GTEST_TARGET_ANDROID_I18N_ROOT := '/apex/com.android.i18n'
184ifneq ($(ART_TEST_ANDROID_I18N_ROOT),)
185  ART_GTEST_TARGET_ANDROID_I18N_ROOT := $(ART_TEST_ANDROID_I18N_ROOT)
186endif
187
188ART_GTEST_TARGET_ANDROID_ART_ROOT := '/apex/com.android.art'
189ifneq ($(ART_TEST_ANDROID_ART_ROOT),)
190  ART_GTEST_TARGET_ANDROID_ART_ROOT := $(ART_TEST_ANDROID_ART_ROOT)
191endif
192
193ART_GTEST_TARGET_ANDROID_TZDATA_ROOT := '/apex/com.android.tzdata'
194ifneq ($(ART_TEST_ANDROID_TZDATA_ROOT),)
195  ART_GTEST_TARGET_ANDROID_TZDATA_ROOT := $(ART_TEST_ANDROID_TZDATA_ROOT)
196endif
197
198# Define make rules for a host gtests.
199# $(1): gtest name - the name of the test we're building such as leb128_test.
200# $(2): path relative to $OUT to the test binary
201# $(3): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
202define define-art-gtest-rule-host
203  gtest_suffix := $(1)$$($(3)ART_PHONY_TEST_HOST_SUFFIX)
204  gtest_rule := test-art-host-gtest-$$(gtest_suffix)
205  gtest_build_rule := test-art-host-gtest-dependencies-$$(gtest_suffix)
206  gtest_output := $(call intermediates-dir-for,PACKAGING,art-host-gtest,HOST)/$$(gtest_suffix).xml
207  $$(call dist-for-goals,$$(gtest_rule),$$(gtest_output):gtest/$$(gtest_suffix))
208  $$(call declare-1p-target,$$(gtest_output))
209  gtest_exe := $(2)
210  # Dependencies for all host gtests.
211  gtest_deps := $$(ART_HOST_DEX_DEPENDENCIES) \
212    $$(ART_TEST_HOST_GTEST_DEPENDENCIES) \
213    $$(HOST_OUT)/$$(I18N_APEX)/timestamp \
214    $$(HOST_BOOT_IMAGE_JARS) \
215    $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libicu_jni$$(ART_HOST_SHLIB_EXTENSION) \
216    $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$$(ART_HOST_SHLIB_EXTENSION) \
217    $$($(3)ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$$(ART_HOST_SHLIB_EXTENSION) \
218    $$(gtest_exe) \
219    $$(ART_GTEST_$(1)_HOST_DEPS) \
220    $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_HOST_GTEST_$(file)_DEX)) \
221    $(HOST_OUT_EXECUTABLES)/signal_dumper
222
223  # Note: The "host arch" Make variables defined in build/make/core/envsetup.mk
224  # and art/build/Android.common.mk have different meanings:
225  #
226  #   * In build/make/core/envsetup.mk:
227  #     * HOST_ARCH := x86_64
228  #     * HOST_2ND_ARCH := x86
229  #
230  #   * In art/build/Android.common.mk:
231  #     * When `HOST_PREFER_32_BIT` is `true`:
232  #       * ART_HOST_ARCH := x86
233  #       * 2ND_ART_HOST_ARCH :=
234  #       * 2ND_HOST_ARCH :=
235  #     * Otherwise:
236  #       * ART_HOST_ARCH := x86_64
237  #       * 2ND_ART_HOST_ARCH := x86
238  #       * 2ND_HOST_ARCH := x86
239  ifeq ($(HOST_PREFER_32_BIT),true)
240    gtest_deps += $$(2ND_HOST_BOOT_IMAGE) # Depend on the 32-bit boot image.
241  else
242    gtest_deps += $$($(3)HOST_BOOT_IMAGE)
243  endif
244
245.PHONY: $$(gtest_build_rule)
246$$(gtest_build_rule) : $$(gtest_exe) $$(gtest_deps)
247
248
249.PHONY: $$(gtest_rule)
250$$(gtest_rule): $$(gtest_output)
251
252# Re-run the tests, even if nothing changed. Until the build system has a dedicated "no cache"
253# option, claim to write a file that is never produced.
254$$(gtest_output): .KATI_IMPLICIT_OUTPUTS := $$(gtest_output)-nocache
255# Limit concurrent runs. Each test itself is already highly parallel (and thus memory hungry).
256$$(gtest_output): .KATI_NINJA_POOL := highmem_pool
257$$(gtest_output): NAME := $$(gtest_rule)
258ifeq (,$(SANITIZE_HOST))
259$$(gtest_output): $$(gtest_exe) $$(gtest_deps)
260	$(hide) ($$(call ART_TEST_SKIP,$$(NAME)) && \
261		timeout --foreground -k 120s 2400s $(HOST_OUT_EXECUTABLES)/signal_dumper -s 15 \
262			$$< --gtest_output=xml:$$@ && \
263		$$(call ART_TEST_PASSED,$$(NAME))) || $$(call ART_TEST_FAILED,$$(NAME))
264else
265# Note: envsetup currently exports ASAN_OPTIONS=detect_leaks=0 to suppress leak detection, as some
266#       build tools (e.g., ninja) intentionally leak. We want leak checks when we run our tests, so
267#       override ASAN_OPTIONS. b/37751350
268# Note 2: Under sanitization, also capture the output, and run it through the stack tool on failure
269# (with the x86-64 ABI, as this allows symbolization of both x86 and x86-64). We don't do this in
270# general as it loses all the color output, and we have our own symbolization step when not running
271# under ASAN.
272$$(gtest_output): $$(gtest_exe) $$(gtest_deps)
273	$(hide) ($$(call ART_TEST_SKIP,$$(NAME)) && set -o pipefail && \
274		ASAN_OPTIONS=detect_leaks=1 timeout --foreground -k 180s 3600s \
275			$(HOST_OUT_EXECUTABLES)/signal_dumper -s 15 \
276				$$< --gtest_output=xml:$$@ 2>&1 | tee $$<.tmp.out >&2 && \
277		{ $$(call ART_TEST_PASSED,$$(NAME)) ; rm $$<.tmp.out ; }) || \
278		( grep -q AddressSanitizer $$<.tmp.out && export ANDROID_BUILD_TOP=`pwd` && \
279			{ echo "ABI: 'x86_64'" | cat - $$<.tmp.out | development/scripts/stack | tail -n 3000 ; } ; \
280		rm $$<.tmp.out ; $$(call ART_TEST_FAILED,$$(NAME)))
281endif
282
283  ART_TEST_HOST_GTEST$$($(3)ART_PHONY_TEST_HOST_SUFFIX)_RULES += $$(gtest_rule)
284  ART_TEST_HOST_GTEST_BUILD_RULES += $$(gtest_build_rule)
285  ART_TEST_HOST_GTEST$$($(3)ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES += $$(gtest_build_rule)
286  ART_TEST_HOST_GTEST_RULES += $$(gtest_rule)
287  ART_TEST_HOST_GTEST_$(1)_RULES += $$(gtest_rule)
288
289
290  # Clear locally defined variables.
291  gtest_deps :=
292  gtest_exe :=
293  gtest_output :=
294  gtest_rule :=
295  gtest_suffix :=
296endef  # define-art-gtest-rule-host
297
298ART_TEST_HOST_GTEST_DEPENDENCIES := $(HOST_I18N_DATA)
299ART_TEST_TARGET_GTEST_DEPENDENCIES := $(TESTING_ART_APEX)
300
301# Add the additional dependencies for the specified test
302# $(1): test name
303define add-art-gtest-dependencies
304  # Note that, both the primary and the secondary arches of the libs are built by depending
305  # on the module name.
306  gtest_deps := \
307    $$(ART_GTEST_$(1)_TARGET_DEPS) \
308    $(foreach file,$(ART_GTEST_$(1)_DEX_DEPS),$(ART_TEST_TARGET_GTEST_$(file)_DEX)) \
309
310  ART_TEST_TARGET_GTEST_DEPENDENCIES += $$(gtest_deps)
311
312  # Clear locally defined variables.
313  gtest_deps :=
314endef  # add-art-gtest-dependencies
315
316# $(1): file name
317# $(2): 2ND_ or undefined - used to differentiate between the primary and secondary architecture.
318define define-art-gtest-host
319  art_gtest_filename := $(1)
320
321  include $$(CLEAR_VARS)
322  art_gtest_name := $$(notdir $$(basename $$(art_gtest_filename)))
323  ifndef ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES
324    ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES :=
325  endif
326  $$(eval $$(call define-art-gtest-rule-host,$$(art_gtest_name),$$(art_gtest_filename),$(2)))
327
328  # Clear locally defined variables.
329  art_gtest_filename :=
330  art_gtest_name :=
331endef  # define-art-gtest-host
332
333# Define the rules to build and run gtests for both archs on host.
334# $(1): test name
335define define-art-gtest-host-both
336  art_gtest_name := $(1)
337
338.PHONY: test-art-host-gtest-$$(art_gtest_name)
339test-art-host-gtest-$$(art_gtest_name): $$(ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES)
340	$$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
341
342  # Clear now unused variables.
343  ART_TEST_HOST_GTEST_$$(art_gtest_name)_RULES :=
344  art_gtest_name :=
345endef  # define-art-gtest-host-both
346
347ifeq ($(ART_BUILD_TARGET),true)
348  $(foreach name,$(ART_TARGET_GTEST_NAMES), $(eval $(call add-art-gtest-dependencies,$(name),)))
349  ART_TEST_TARGET_GTEST_DEPENDENCIES += \
350    com.android.i18n \
351    libjavacore.com.android.art.testing \
352    libopenjdkd.com.android.art.testing \
353    com.android.art.testing \
354    com.android.conscrypt
355endif
356ifeq ($(ART_BUILD_HOST),true)
357  $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),)))
358  ifneq ($(HOST_PREFER_32_BIT),true)
359    $(foreach file,$(2ND_ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host,$(file),2ND_)))
360  endif
361  # Rules to run the different architecture versions of the gtest.
362  $(foreach file,$(ART_HOST_GTEST_FILES), $(eval $(call define-art-gtest-host-both,$$(notdir $$(basename $$(file))))))
363endif
364
365# Define all the combinations of host/target and suffix such as:
366# test-art-host-gtest or test-art-host-gtest64
367# $(1): host or target
368# $(2): HOST or TARGET
369# $(3): undefined, 32 or 64
370define define-test-art-gtest-combination
371  ifeq ($(1),host)
372    ifneq ($(2),HOST)
373      $$(error argument mismatch $(1) and ($2))
374    endif
375  else
376    ifneq ($(1),target)
377      $$(error found $(1) expected host or target)
378    endif
379    ifneq ($(2),TARGET)
380      $$(error argument mismatch $(1) and ($2))
381    endif
382  endif
383
384  rule_name := test-art-$(1)-gtest$(3)
385  dependencies := $$(ART_TEST_$(2)_GTEST$(3)_RULES)
386
387.PHONY: $$(rule_name)
388$$(rule_name): $$(dependencies) d8
389	$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
390
391  # Clear locally defined variables.
392  rule_name :=
393  dependencies :=
394endef  # define-test-art-gtest-combination
395
396$(eval $(call define-test-art-gtest-combination,target,TARGET,))
397$(eval $(call define-test-art-gtest-combination,target,TARGET,$(ART_PHONY_TEST_TARGET_SUFFIX)))
398ifdef 2ND_ART_PHONY_TEST_TARGET_SUFFIX
399$(eval $(call define-test-art-gtest-combination,target,TARGET,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)))
400endif
401$(eval $(call define-test-art-gtest-combination,host,HOST,))
402$(eval $(call define-test-art-gtest-combination,host,HOST,$(ART_PHONY_TEST_HOST_SUFFIX)))
403ifneq ($(HOST_PREFER_32_BIT),true)
404$(eval $(call define-test-art-gtest-combination,host,HOST,$(2ND_ART_PHONY_TEST_HOST_SUFFIX)))
405endif
406
407# Define all the combinations of host/target and suffix such as:
408# test-art-host-gtest-dependencies or test-art-host-gtest-dependencies64
409# $(1): host or target
410# $(2): HOST or TARGET
411# $(3): undefined, 32 or 64
412define define-test-art-gtest-dependency-combination
413  ifeq ($(1),host)
414    ifneq ($(2),HOST)
415      $$(error argument mismatch $(1) and ($2))
416    endif
417  else
418    ifneq ($(1),target)
419      $$(error found $(1) expected host or target)
420    endif
421    ifneq ($(2),TARGET)
422      $$(error argument mismatch $(1) and ($2))
423    endif
424  endif
425
426  rule_name := test-art-$(1)-gtest-dependencies$(3)
427  dependencies := $$(ART_TEST_$(2)_GTEST$(3)_BUILD_RULES)
428
429.PHONY: $$(rule_name)
430$$(rule_name): $$(dependencies) d8
431
432  # Clear locally defined variables.
433  rule_name :=
434  dependencies :=
435endef  # define-test-art-gtest-dependency-combination
436
437# TODO Get target-deps working too
438# $(eval $(call define-test-art-gtest-dependency-combination,target,TARGET,))
439# $(eval $(call define-test-art-gtest-dependency-combination,target,TARGET,$(ART_PHONY_TEST_TARGET_SUFFIX)))
440# ifdef 2ND_ART_PHONY_TEST_TARGET_SUFFIX
441# $(eval $(call define-test-art-gtest-dependency-combination,target,TARGET,$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)))
442# endif
443$(eval $(call define-test-art-gtest-dependency-combination,host,HOST,))
444$(eval $(call define-test-art-gtest-dependency-combination,host,HOST,$(ART_PHONY_TEST_HOST_SUFFIX)))
445ifneq ($(HOST_PREFER_32_BIT),true)
446$(eval $(call define-test-art-gtest-dependency-combination,host,HOST,$(2ND_ART_PHONY_TEST_HOST_SUFFIX)))
447endif
448
449# Clear locally defined variables.
450define-art-gtest-rule-target :=
451define-art-gtest-rule-host :=
452define-art-gtest :=
453define-test-art-gtest-combination :=
454RUNTIME_GTEST_COMMON_SRC_FILES :=
455COMPILER_GTEST_COMMON_SRC_FILES :=
456RUNTIME_GTEST_TARGET_SRC_FILES :=
457RUNTIME_GTEST_HOST_SRC_FILES :=
458COMPILER_GTEST_TARGET_SRC_FILES :=
459COMPILER_GTEST_HOST_SRC_FILES :=
460ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
461ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_RULES :=
462ART_TEST_HOST_GTEST_RULES :=
463ART_TEST_HOST_GTEST$(ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES :=
464ART_TEST_HOST_GTEST$(2ND_ART_PHONY_TEST_HOST_SUFFIX)_BUILD_RULES :=
465ART_TEST_HOST_GTEST_BUILD_RULES :=
466ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
467ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_RULES :=
468ART_TEST_TARGET_GTEST_RULES :=
469ART_TEST_TARGET_GTEST$(ART_PHONY_TEST_TARGET_SUFFIX)_BUILD_RULES :=
470ART_TEST_TARGET_GTEST$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)_BUILD_RULES :=
471ART_TEST_TARGET_GTEST_BUILD_RULES :=
472ART_GTEST_TARGET_ANDROID_ROOT :=
473ART_GTEST_TARGET_ANDROID_I18N_ROOT :=
474ART_GTEST_TARGET_ANDROID_ART_ROOT :=
475ART_GTEST_TARGET_ANDROID_TZDATA_ROOT :=
476ART_GTEST_class_linker_test_DEX_DEPS :=
477ART_GTEST_class_table_test_DEX_DEPS :=
478ART_GTEST_compiler_driver_test_DEX_DEPS :=
479ART_GTEST_dex_file_test_DEX_DEPS :=
480ART_GTEST_exception_test_DEX_DEPS :=
481ART_GTEST_elf_writer_test_HOST_DEPS :=
482ART_GTEST_elf_writer_test_TARGET_DEPS :=
483ART_GTEST_imtable_test_DEX_DEPS :=
484ART_GTEST_jni_compiler_test_DEX_DEPS :=
485ART_GTEST_jni_internal_test_DEX_DEPS :=
486ART_GTEST_oat_file_assistant_test_DEX_DEPS :=
487ART_GTEST_oat_file_assistant_test_HOST_DEPS :=
488ART_GTEST_oat_file_assistant_test_TARGET_DEPS :=
489ART_GTEST_dexanalyze_test_DEX_DEPS :=
490ART_GTEST_dexoptanalyzer_test_DEX_DEPS :=
491ART_GTEST_dexoptanalyzer_test_HOST_DEPS :=
492ART_GTEST_dexoptanalyzer_test_TARGET_DEPS :=
493ART_GTEST_image_space_test_DEX_DEPS :=
494ART_GTEST_image_space_test_HOST_DEPS :=
495ART_GTEST_image_space_test_TARGET_DEPS :=
496ART_GTEST_dex2oat_test_DEX_DEPS :=
497ART_GTEST_dex2oat_test_HOST_DEPS :=
498ART_GTEST_dex2oat_test_TARGET_DEPS :=
499ART_GTEST_dex2oat_image_test_DEX_DEPS :=
500ART_GTEST_dex2oat_image_test_HOST_DEPS :=
501ART_GTEST_dex2oat_image_test_TARGET_DEPS :=
502ART_GTEST_object_test_DEX_DEPS :=
503ART_GTEST_proxy_test_DEX_DEPS :=
504ART_GTEST_reflection_test_DEX_DEPS :=
505ART_GTEST_stub_test_DEX_DEPS :=
506ART_GTEST_transaction_test_DEX_DEPS :=
507ART_GTEST_dex2oat_environment_tests_DEX_DEPS :=
508ART_GTEST_heap_verification_test_DEX_DEPS :=
509ART_GTEST_verifier_deps_test_DEX_DEPS :=
510$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_TARGET_GTEST_$(dir)_DEX :=))
511$(foreach dir,$(GTEST_DEX_DIRECTORIES), $(eval ART_TEST_HOST_GTEST_$(dir)_DEX :=))
512ART_TEST_HOST_GTEST_MainStripped_DEX :=
513ART_TEST_TARGET_GTEST_MainStripped_DEX :=
514ART_TEST_HOST_GTEST_MainUncompressedAligned_DEX :=
515ART_TEST_TARGET_GTEST_MainUncompressedAligned_DEX :=
516ART_TEST_HOST_GTEST_EmptyUncompressed_DEX :=
517ART_TEST_TARGET_GTEST_EmptyUncompressed_DEX :=
518ART_TEST_GTEST_VerifierDeps_SRC :=
519ART_TEST_HOST_GTEST_VerifierDeps_DEX :=
520ART_TEST_TARGET_GTEST_VerifierDeps_DEX :=
521ART_TEST_GTEST_VerifySoftFailDuringClinit_SRC :=
522ART_TEST_HOST_GTEST_VerifySoftFailDuringClinit_DEX :=
523ART_TEST_TARGET_GTEST_VerifySoftFailDuringClinit_DEX :=
524GTEST_DEX_DIRECTORIES :=
525LOCAL_PATH :=
526
527endif # ifneq ($(HOST_OS),darwin)
528