blob: 60165d93dd7e8ba1b48a73d5e84d0ed064aa1405 [file] [log] [blame]
Ian Rogersafd9acc2014-06-17 08:21:54 -07001# Copyright (C) 2011 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16LOCAL_PATH := $(call my-dir)
17
18include art/build/Android.common_test.mk
19
20# List of all tests of the form 003-omnibus-opcodes.
21TEST_ART_RUN_TESTS := $(wildcard $(LOCAL_PATH)/[0-9]*)
22TEST_ART_RUN_TESTS := $(subst $(LOCAL_PATH)/,, $(TEST_ART_RUN_TESTS))
23
Ian Rogersf5c44b32014-08-19 16:52:36 -070024########################################################################
25# The art-run-tests module, used to build all run-tests into an image.
Alex Light9dcc4572014-08-14 14:16:26 -070026
Ian Rogersafd9acc2014-06-17 08:21:54 -070027# The path where build only targets will be output, e.g.
28# out/target/product/generic_x86_64/obj/PACKAGING/art-run-tests_intermediates/DATA
29art_run_tests_dir := $(call intermediates-dir-for,PACKAGING,art-run-tests)/DATA
30
31# A generated list of prerequisites that call 'run-test --build-only', the actual prerequisite is
32# an empty file touched in the intermediate directory.
33TEST_ART_RUN_TEST_BUILD_RULES :=
34
Nicolas Geoffray07f2bc12015-05-29 13:40:25 +010035# Dependencies for actually running a run-test.
36TEST_ART_RUN_TEST_DEPENDENCIES := $(DX) $(HOST_OUT_EXECUTABLES)/jasmin $(HOST_OUT_EXECUTABLES)/smali $(HOST_OUT_EXECUTABLES)/dexmerger
37
Ian Rogersafd9acc2014-06-17 08:21:54 -070038# Helper to create individual build targets for tests. Must be called with $(eval).
39# $(1): the test number
40define define-build-art-run-test
41 dmart_target := $(art_run_tests_dir)/art-run-tests/$(1)/touch
Nicolas Geoffray07f2bc12015-05-29 13:40:25 +010042$$(dmart_target): $(TEST_ART_RUN_TEST_DEPENDENCIES)
Ian Rogersafd9acc2014-06-17 08:21:54 -070043 $(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@)
44 $(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
Andreas Gampe8fda9f22014-10-03 16:15:37 -070045 SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
46 DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
Ian Rogersafd9acc2014-06-17 08:21:54 -070047 $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1)
48 $(hide) touch $$@
49
50 TEST_ART_RUN_TEST_BUILD_RULES += $$(dmart_target)
51 dmart_target :=
52endef
Ian Rogersbf66bce2014-06-24 23:15:34 -070053$(foreach test, $(TEST_ART_RUN_TESTS), $(eval $(call define-build-art-run-test,$(test))))
Ian Rogersafd9acc2014-06-17 08:21:54 -070054
55include $(CLEAR_VARS)
56LOCAL_MODULE_TAGS := tests
57LOCAL_MODULE := art-run-tests
Ian Rogersabbf2422014-10-15 11:57:01 -070058LOCAL_ADDITIONAL_DEPENDENCIES := $(TEST_ART_RUN_TEST_BUILD_RULES)
Ian Rogersafd9acc2014-06-17 08:21:54 -070059# The build system use this flag to pick up files generated by declare-make-art-run-test.
60LOCAL_PICKUP_FILES := $(art_run_tests_dir)
61
62include $(BUILD_PHONY_PACKAGE)
63
64# Clear temp vars.
Ian Rogersafd9acc2014-06-17 08:21:54 -070065art_run_tests_dir :=
66define-build-art-run-test :=
Ian Rogers8a14b752014-07-18 15:06:53 -070067TEST_ART_RUN_TEST_BUILD_RULES :=
Ian Rogersafd9acc2014-06-17 08:21:54 -070068
69########################################################################
Ian Rogersf5c44b32014-08-19 16:52:36 -070070# General rules to build and run a run-test.
Ian Rogersafd9acc2014-06-17 08:21:54 -070071
Ian Rogersf5c44b32014-08-19 16:52:36 -070072TARGET_TYPES := host target
Nicolas Geoffray41bb3312014-10-24 13:49:08 +010073PREBUILD_TYPES :=
74ifeq ($(ART_TEST_RUN_TEST_PREBUILD),true)
75 PREBUILD_TYPES += prebuild
76endif
Ian Rogers86df3ac2014-08-27 10:54:11 -070077ifeq ($(ART_TEST_RUN_TEST_NO_PREBUILD),true)
78 PREBUILD_TYPES += no-prebuild
79endif
80ifeq ($(ART_TEST_RUN_TEST_NO_DEX2OAT),true)
81 PREBUILD_TYPES += no-dex2oat
82endif
83COMPILER_TYPES :=
84ifeq ($(ART_TEST_DEFAULT_COMPILER),true)
85 COMPILER_TYPES += default
86endif
87ifeq ($(ART_TEST_INTERPRETER),true)
88 COMPILER_TYPES += interpreter
89endif
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080090ifeq ($(ART_TEST_JIT),true)
91 COMPILER_TYPES += jit
92endif
Ian Rogers86df3ac2014-08-27 10:54:11 -070093ifeq ($(ART_TEST_OPTIMIZING),true)
94 COMPILER_TYPES += optimizing
95endif
96RELOCATE_TYPES := relocate
97ifeq ($(ART_TEST_RUN_TEST_NO_RELOCATE),true)
98 RELOCATE_TYPES += no-relocate
99endif
100ifeq ($(ART_TEST_RUN_TEST_RELOCATE_NO_PATCHOAT),true)
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700101 RELOCATE_TYPES += relocate-npatchoat
Ian Rogers86df3ac2014-08-27 10:54:11 -0700102endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700103TRACE_TYPES := ntrace
Ian Rogers86df3ac2014-08-27 10:54:11 -0700104ifeq ($(ART_TEST_TRACE),true)
105 TRACE_TYPES += trace
106endif
107GC_TYPES := cms
Alex Light992f1e72014-08-27 16:08:57 -0700108ifeq ($(ART_TEST_GC_STRESS),true)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700109 GC_TYPES += gcstress
110endif
Alex Light992f1e72014-08-27 16:08:57 -0700111ifeq ($(ART_TEST_GC_VERIFY),true)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700112 GC_TYPES += gcverify
113endif
114JNI_TYPES := checkjni
115ifeq ($(ART_TEST_JNI_FORCECOPY),true)
116 JNI_TYPES += forcecopy
117endif
118IMAGE_TYPES := image
119ifeq ($(ART_TEST_RUN_TEST_NO_IMAGE),true)
120 IMAGE_TYPES += no-image
121endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700122ifeq ($(ART_TEST_PIC_IMAGE),true)
123 IMAGE_TYPES += picimage
124endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700125PICTEST_TYPES := npictest
Andreas Gampec23c9c92014-10-28 14:47:25 -0700126ifeq ($(ART_TEST_PIC_TEST),true)
127 PICTEST_TYPES += pictest
128endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100129RUN_TYPES :=
130ifeq ($(ART_TEST_RUN_TEST_DEBUG),true)
131 RUN_TYPES += debug
132endif
133ifeq ($(ART_TEST_RUN_TEST_NDEBUG),true)
134 RUN_TYPES += ndebug
135endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700136DEBUGGABLE_TYPES := ndebuggable
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000137ifeq ($(ART_TEST_RUN_TEST_DEBUGGABLE),true)
138DEBUGGABLE_TYPES += debuggable
139endif
Nicolas Geoffray41bb3312014-10-24 13:49:08 +0100140ADDRESS_SIZES_TARGET := $(ART_PHONY_TEST_TARGET_SUFFIX)
141ADDRESS_SIZES_HOST := $(ART_PHONY_TEST_HOST_SUFFIX)
142ifeq ($(ART_TEST_RUN_TEST_2ND_ARCH),true)
143 ADDRESS_SIZES_TARGET += $(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
144 ADDRESS_SIZES_HOST += $(2ND_ART_PHONY_TEST_HOST_SUFFIX)
145endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700146ALL_ADDRESS_SIZES := 64 32
Ian Rogers86df3ac2014-08-27 10:54:11 -0700147
Ian Rogersf5c44b32014-08-19 16:52:36 -0700148# List all run test names with number arguments agreeing with the comment above.
149define all-run-test-names
150 $(foreach target, $(1), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100151 $(foreach run-type, $(2), \
152 $(foreach prebuild, $(3), \
153 $(foreach compiler, $(4), \
154 $(foreach relocate, $(5), \
155 $(foreach trace, $(6), \
156 $(foreach gc, $(7), \
157 $(foreach jni, $(8), \
158 $(foreach image, $(9), \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700159 $(foreach pictest, $(10), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000160 $(foreach debuggable, $(11), \
161 $(foreach test, $(12), \
162 $(foreach address_size, $(13), \
163 test-art-$(target)-run-test-$(run-type)-$(prebuild)-$(compiler)-$(relocate)-$(trace)-$(gc)-$(jni)-$(image)-$(pictest)-$(debuggable)-$(test)$(address_size) \
164 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700165endef # all-run-test-names
166
167# To generate a full list or tests:
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100168# $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -0700169# $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000170# $(DEBUGGABLE_TYPES) $(TEST_ART_RUN_TESTS), $(ALL_ADDRESS_SIZES)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700171
172# Convert's a rule name to the form used in variables, e.g. no-relocate to NO_RELOCATE
173define name-to-var
174$(shell echo $(1) | tr '[:lower:]' '[:upper:]' | tr '-' '_')
175endef # name-to-var
176
177# Tests that are timing sensitive and flaky on heavily loaded systems.
178TEST_ART_TIMING_SENSITIVE_RUN_TESTS := \
179 053-wait-some \
Mathieu Chartiere4a91bb2015-01-28 13:11:44 -0800180 055-enum-performance \
181 133-static-invoke-super
Ian Rogersf5c44b32014-08-19 16:52:36 -0700182
183 # disable timing sensitive tests on "dist" builds.
184ifdef dist_goal
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100185 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700186 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000187 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_TIMING_SENSITIVE_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700188endif
189
Ian Rogers86df3ac2014-08-27 10:54:11 -0700190TEST_ART_TIMING_SENSITIVE_RUN_TESTS :=
191
Ian Rogers40e19122014-09-02 15:59:28 -0700192# Note 116-nodex2oat is not broken per-se it just doesn't (and isn't meant to) work with --prebuild.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700193TEST_ART_BROKEN_PREBUILD_RUN_TESTS := \
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -0800194 116-nodex2oat \
Jean Christophe Beyler24e04aa2014-09-12 12:03:25 -0700195 118-noimage-dex2oat \
196 134-nodex2oat-nofallback
Ian Rogersf5c44b32014-08-19 16:52:36 -0700197
Ian Rogers40e19122014-09-02 15:59:28 -0700198ifneq (,$(filter prebuild,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100199 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),prebuild, \
Ian Rogers40e19122014-09-02 15:59:28 -0700200 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000201 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_PREBUILD_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700202endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700203
Ian Rogers86df3ac2014-08-27 10:54:11 -0700204TEST_ART_BROKEN_PREBUILD_RUN_TESTS :=
205
Ian Rogersf5c44b32014-08-19 16:52:36 -0700206TEST_ART_BROKEN_NO_PREBUILD_TESTS := \
207 117-nopatchoat
208
Ian Rogers40e19122014-09-02 15:59:28 -0700209ifneq (,$(filter no-prebuild,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100210 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-prebuild, \
Ian Rogers40e19122014-09-02 15:59:28 -0700211 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000212 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_PREBUILD_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700213endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700214
Ian Rogers86df3ac2014-08-27 10:54:11 -0700215TEST_ART_BROKEN_NO_PREBUILD_TESTS :=
216
Ian Rogers40e19122014-09-02 15:59:28 -0700217# Note 117-nopatchoat is not broken per-se it just doesn't work (and isn't meant to) without
218# --prebuild --relocate
219TEST_ART_BROKEN_NO_RELOCATE_TESTS := \
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -0800220 117-nopatchoat \
221 118-noimage-dex2oat \
222 119-noimage-patchoat
Ian Rogers40e19122014-09-02 15:59:28 -0700223
224ifneq (,$(filter no-relocate,$(RELOCATE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100225 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700226 $(COMPILER_TYPES), no-relocate,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000227 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_RELOCATE_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700228endif
229
230TEST_ART_BROKEN_NO_RELOCATE_TESTS :=
231
Nicolas Geoffray2b84d2b2015-06-12 08:38:20 +0100232# 098-ddmc is broken until we restore the old behavior of getRecentAllocation() of DDMS. b/20037135
233ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
234 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
235 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), 098-ddmc, $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700236
Ian Rogersf5c44b32014-08-19 16:52:36 -0700237# 115-native-bridge setup is complicated. Need to implement it correctly for the target.
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100238ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000239 $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), 115-native-bridge, \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700240 $(ALL_ADDRESS_SIZES))
241
Andreas Gampe3a913092015-01-10 00:26:17 -0800242# 130-hprof dumps the heap and runs hprof-conv to check whether the file is somewhat readable. This
243# is only possible on the host.
244# TODO: Turn off all the other combinations, this is more about testing actual ART code. A gtest is
245# very hard to write here, as (for a complete test) JDWP must be set up.
246ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
247 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000248 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),130-hprof,$(ALL_ADDRESS_SIZES))
Andreas Gampe3a913092015-01-10 00:26:17 -0800249
Andreas Gampe94329d32015-04-24 20:22:06 -0700250# 131 is an old test. The functionality has been implemented at an earlier stage and is checked
251# in tests 138.
252ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
253 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
254 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),131-structural-change,$(ALL_ADDRESS_SIZES))
255
Andreas Gampe69b5d8f2015-06-03 15:43:16 -0700256# 138-duplicate-classes-check. Turned off temporarily, b/21333911.
257ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
258 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
259 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),138-duplicate-classes-check,$(ALL_ADDRESS_SIZES))
260
Alex Light03a112d2014-08-25 13:25:56 -0700261# All these tests check that we have sane behavior if we don't have a patchoat or dex2oat.
262# Therefore we shouldn't run them in situations where we actually don't have these since they
263# explicitly test for them. These all also assume we have an image.
264TEST_ART_BROKEN_FALLBACK_RUN_TESTS := \
265 116-nodex2oat \
266 117-nopatchoat \
267 118-noimage-dex2oat \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700268 119-noimage-patchoat \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700269 137-cfi \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700270 138-duplicate-classes-check2
271
272# This test fails without an image.
273TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS := \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700274 137-cfi \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700275 138-duplicate-classes-check
Alex Light03a112d2014-08-25 13:25:56 -0700276
Ian Rogers40e19122014-09-02 15:59:28 -0700277ifneq (,$(filter no-dex2oat,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100278 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-dex2oat, \
Ian Rogers40e19122014-09-02 15:59:28 -0700279 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000280 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700281endif
Alex Light03a112d2014-08-25 13:25:56 -0700282
Alex Light03a112d2014-08-25 13:25:56 -0700283
Ian Rogers40e19122014-09-02 15:59:28 -0700284ifneq (,$(filter no-image,$(IMAGE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100285 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700286 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000287 $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700288 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
289 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
290 $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700291endif
292
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700293ifneq (,$(filter relocate-npatchoat,$(RELOCATE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100294 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700295 $(COMPILER_TYPES), relocate-npatchoat,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000296 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700297endif
Alex Light03a112d2014-08-25 13:25:56 -0700298
Ian Rogers86df3ac2014-08-27 10:54:11 -0700299TEST_ART_BROKEN_FALLBACK_RUN_TESTS :=
300
Andreas Gampee1bbed22015-05-20 13:55:00 -0700301# 137:
302# This test unrolls and expects managed frames, but tracing means we run the interpreter.
303# 802:
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800304# This test dynamically enables tracing to force a deoptimization. This makes the test meaningless
305# when already tracing, and writes an error message that we do not want to check for.
306TEST_ART_BROKEN_TRACING_RUN_TESTS := \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700307 137-cfi \
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800308 802-deoptimization
309
310ifneq (,$(filter trace,$(TRACE_TYPES)))
311 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
312 $(COMPILER_TYPES),$(RELOCATE_TYPES),trace,$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000313 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_TRACING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800314endif
315
316TEST_ART_BROKEN_TRACING_RUN_TESTS :=
317
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100318# The following tests use libarttest.so, which is linked against libartd.so, so will
319# not work when libart.so is the one loaded.
320# TODO: Find a way to run these tests in ndebug mode.
321TEST_ART_BROKEN_NDEBUG_TESTS := \
322 004-JniTest \
323 004-ReferenceMap \
324 004-SignalTest \
325 004-StackWalk \
326 004-UnsafeTest \
Nicolas Geoffray64dea7e2014-11-07 14:32:42 +0000327 051-thread \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100328 115-native-bridge \
329 116-nodex2oat \
330 117-nopatchoat \
331 118-noimage-dex2oat \
332 119-noimage-patchoat \
Nicolas Geoffray8c9200a2015-01-15 08:42:47 +0000333 131-structural-change \
Andreas Gampe73810102015-04-22 18:57:06 -0700334 137-cfi \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700335 139-register-natives \
Nicolas Geoffrayd845fd02015-03-03 12:43:45 +0000336 454-get-vreg \
337 455-set-vreg \
Nicolas Geoffray64d69ab2015-03-10 19:26:24 +0000338 457-regs \
Nicolas Geoffray915b9d02015-03-11 15:11:19 +0000339 461-get-reference-vreg \
Nicolas Geoffrayd8126be2015-03-27 10:22:41 +0000340 466-get-live-vreg \
Nicolas Geoffray32c9ea52015-06-12 14:52:33 +0100341 497-inlining-and-class-loader \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100342
343ifneq (,$(filter ndebug,$(RUN_TYPES)))
344 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),ndebug,$(PREBUILD_TYPES), \
345 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000346 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_NDEBUG_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100347endif
348
349TEST_ART_BROKEN_NDEBUG_TESTS :=
350
Andreas Gampee1bbed22015-05-20 13:55:00 -0700351# Known broken tests for the interpreter.
352# CFI unwinding expects managed frames.
353TEST_ART_BROKEN_INTERPRETER_RUN_TESTS := \
354 137-cfi
355
356ifneq (,$(filter interpreter,$(COMPILER_TYPES)))
357 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
358 interpreter,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
359 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_INTERPRETER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
360endif
361
362TEST_ART_BROKEN_INTERPRETER_RUN_TESTS :=
363
Andreas Gampeaab9f732015-05-20 14:50:06 -0700364# Known broken tests for the JIT.
365# CFI unwinding expects managed frames, and the test does not iterate enough to even compile. JIT
366# also uses Generic JNI instead of the JNI compiler.
367TEST_ART_BROKEN_JIT_RUN_TESTS := \
368 137-cfi
369
370ifneq (,$(filter jit,$(COMPILER_TYPES)))
371 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
372 jit,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
373 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_JIT_RUN_TESTS),$(ALL_ADDRESS_SIZES))
374endif
375
376TEST_ART_BROKEN_JIT_RUN_TESTS :=
377
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100378# Known broken tests for the default compiler (Quick).
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000379TEST_ART_BROKEN_DEFAULT_RUN_TESTS := \
Vladimir Marko07785bb2015-06-15 18:52:54 +0100380 457-regs
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100381
382ifneq (,$(filter default,$(COMPILER_TYPES)))
383 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Nicolas Geoffray83cae422014-10-22 15:08:03 +0100384 default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000385 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_DEFAULT_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100386endif
387
388TEST_ART_BROKEN_DEFAULT_RUN_TESTS :=
389
Alexandre Rames5319def2014-10-23 10:03:10 +0100390# Known broken tests for the arm64 optimizing compiler backend.
Serban Constantinescu02d81cc2015-01-05 16:08:49 +0000391TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS :=
Alexandre Rames5319def2014-10-23 10:03:10 +0100392
393ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
394 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
395 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000396 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS),64)
Alexandre Rames5319def2014-10-23 10:03:10 +0100397endif
398
399TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS :=
400
Alexey Frunze4dda3372015-06-01 18:31:49 -0700401# Known broken tests for the MIPS64 optimizing compiler backend in 64-bit mode. b/21555893
402TEST_ART_BROKEN_OPTIMIZING_MIPS64_64BIT_RUN_TESTS := \
403 004-SignalTest \
404 018-stack-overflow \
405 107-int-math2 \
406 449-checker-bce
407
408ifeq ($(TARGET_ARCH),mips64)
409 ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
410 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
411 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
412 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_MIPS64_64BIT_RUN_TESTS),64)
413 endif
414endif
415
416TEST_ART_BROKEN_OPTIMIZING_MIPS64_64BIT_RUN_TESTS :=
417
418# Known broken tests for the MIPS64 optimizing compiler backend in 32-bit mode. b/21555893
419TEST_ART_BROKEN_OPTIMIZING_MIPS64_32BIT_RUN_TESTS := \
420 496-checker-inlining-and-class-loader
421
422ifeq ($(TARGET_ARCH),mips64)
423 ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
424 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
425 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
426 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_MIPS64_32BIT_RUN_TESTS),32)
427 endif
428endif
429
430TEST_ART_BROKEN_OPTIMIZING_MIPS64_32BIT_RUN_TESTS :=
431
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100432# Known broken tests for the optimizing compiler.
Nicolas Geoffrayaa8dd2f2015-01-23 17:48:28 +0000433TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS :=
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100434
435ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
436 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
437 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000438 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100439endif
440
Nicolas Geoffray5d672a62014-12-04 14:39:31 +0000441# If ART_USE_OPTIMIZING_COMPILER is set to true, then the default core.art has been
442# compiled with the optimizing compiler.
443ifeq ($(ART_USE_OPTIMIZING_COMPILER),true)
444 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
445 default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000446 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffray5d672a62014-12-04 14:39:31 +0000447endif
448
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100449TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS :=
450
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000451# Tests that should fail when the optimizing compiler compiles them non-debuggable.
452TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS := \
Nicolas Geoffray915b9d02015-03-11 15:11:19 +0000453 454-get-vreg \
454 455-set-vreg \
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000455 457-regs \
456
457ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
458 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
459 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700460 $(IMAGE_TYPES),$(PICTEST_TYPES),ndebuggable,$(TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000461endif
462
463TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS :=
464
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000465# Tests that should fail when the optimizing compiler compiles them debuggable.
466TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS := \
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000467
468ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
469 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
470 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
471 $(IMAGE_TYPES),$(PICTEST_TYPES),debuggable,$(TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
472endif
473
474TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS :=
475
Hiroshi Yamauchi1d858232015-05-05 13:36:39 -0700476# Tests that should fail in the read barrier configuration.
Andreas Gampee1bbed22015-05-20 13:55:00 -0700477# 137: Read barrier forces interpreter. Cannot run this with the interpreter.
478TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS := \
479 137-cfi
Hiroshi Yamauchi1d858232015-05-05 13:36:39 -0700480
481ifeq ($(ART_USE_READ_BARRIER),true)
482 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
483 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
484 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
485endif
486
487TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS :=
Alexandre Rames5319def2014-10-23 10:03:10 +0100488
Andreas Gampe44372192015-05-21 10:01:42 -0700489# Tests that should fail in the heap poisoning configuration.
490# 137: Heap poisoning forces interpreter. Cannot run this with the interpreter.
491TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS := \
492 137-cfi
493
494ifeq ($(ART_HEAP_POISONING),true)
495 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
496 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
497 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
498endif
499
500TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS :=
501
Ian Rogersf5c44b32014-08-19 16:52:36 -0700502# Clear variables ahead of appending to them when defining tests.
503$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
504$(foreach target, $(TARGET_TYPES), \
505 $(foreach prebuild, $(PREBUILD_TYPES), \
506 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
507$(foreach target, $(TARGET_TYPES), \
508 $(foreach compiler, $(COMPILER_TYPES), \
509 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
510$(foreach target, $(TARGET_TYPES), \
511 $(foreach relocate, $(RELOCATE_TYPES), \
512 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
513$(foreach target, $(TARGET_TYPES), \
514 $(foreach trace, $(TRACE_TYPES), \
515 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
516$(foreach target, $(TARGET_TYPES), \
517 $(foreach gc, $(GC_TYPES), \
518 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
519$(foreach target, $(TARGET_TYPES), \
520 $(foreach jni, $(JNI_TYPES), \
521 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
522$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700523 $(foreach image, $(IMAGE_TYPES), \
524 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
525$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700526 $(foreach test, $(TEST_ART_RUN_TESTS), \
527 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
528$(foreach target, $(TARGET_TYPES), \
529 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
530 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100531$(foreach target, $(TARGET_TYPES), \
532 $(foreach run_type, $(RUN_TYPES), \
533 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000534$(foreach target, $(TARGET_TYPES), \
535 $(foreach debuggable_type, $(DEBUGGABLE_TYPES), \
536 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700537
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700538# We need dex2oat and dalvikvm on the target as well as the core images (all images as we sync
539# only once).
540TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_EXECUTABLES) $(TARGET_CORE_IMG_OUTS)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700541
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700542# Also need libarttest.
543TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so
544ifdef TARGET_2ND_ARCH
545TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so
546endif
547
Andreas Gampe855564b2014-07-25 02:32:19 -0700548# Also need libnativebridgetest.
549TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so
550ifdef TARGET_2ND_ARCH
551TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so
552endif
553
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700554# All tests require the host executables. The tests also depend on the core images, but on
555# specific version depending on the compiler.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700556ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \
557 $(ART_HOST_EXECUTABLES) \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700558 $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700559 $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700560 $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700561
562ifneq ($(HOST_PREFER_32_BIT),true)
563ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700564 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700565 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700566 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700567endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700568
Ian Rogersf5c44b32014-08-19 16:52:36 -0700569# Create a rule to build and run a tests following the form:
Calin Juravle9228b2a2014-10-22 15:54:34 +0100570# test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}-
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700571# {4: interpreter default optimizing jit}-{5: relocate nrelocate relocate-npatchoat}-
572# {6: trace or ntrace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}-
573# {9: no-image image picimage}-{10: pictest npictest}-
574# {11: ndebuggable debuggable}-{12: test name}{13: 32 or 64}
Ian Rogersafd9acc2014-06-17 08:21:54 -0700575define define-test-art-run-test
Nicolas Geoffray611e1db2014-10-09 17:34:45 +0100576 run_test_options :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700577 prereq_rule :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700578 test_groups :=
579 uc_host_or_target :=
Alex Lightbfac14a2014-07-30 09:41:21 -0700580 ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true)
581 run_test_options += --always-clean
582 endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700583 ifeq ($(1),host)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700584 uc_host_or_target := HOST
Ian Rogersf5c44b32014-08-19 16:52:36 -0700585 test_groups := ART_RUN_TEST_HOST_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700586 run_test_options += --host
587 prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES)
588 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700589 ifeq ($(1),target)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700590 uc_host_or_target := TARGET
Ian Rogersf5c44b32014-08-19 16:52:36 -0700591 test_groups := ART_RUN_TEST_TARGET_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700592 prereq_rule := test-art-target-sync
593 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700594 $$(error found $(1) expected $(TARGET_TYPES))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700595 endif
596 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100597 ifeq ($(2),debug)
598 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUG_RULES
599 else
600 ifeq ($(2),ndebug)
601 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELEASE_RULES
602 run_test_options += -O
603 else
604 $$(error found $(2) expected $(RUN_TYPES))
605 endif
606 endif
607 ifeq ($(3),prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700608 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES
609 run_test_options += --prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700610 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100611 ifeq ($(3),no-prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700612 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES
613 run_test_options += --no-prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700614 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100615 ifeq ($(3),no-dex2oat)
Alex Light03a112d2014-08-25 13:25:56 -0700616 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES
617 run_test_options += --no-prebuild --no-dex2oat
618 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100619 $$(error found $(3) expected $(PREBUILD_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700620 endif
Alex Lighta59dd802014-07-02 16:28:08 -0700621 endif
622 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100623 ifeq ($(4),optimizing)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700624 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700625 run_test_options += --optimizing
Ian Rogersafd9acc2014-06-17 08:21:54 -0700626 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100627 ifeq ($(4),interpreter)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700628 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700629 run_test_options += --interpreter
630 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100631 ifeq ($(4),default)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700632 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEFAULT_RULES
Nicolas Geoffrayc9338b92014-12-03 13:36:10 +0000633 run_test_options += --quick
Ian Rogersafd9acc2014-06-17 08:21:54 -0700634 else
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800635 ifeq ($(4),jit)
Mathieu Chartier3fc1b122015-02-26 10:58:08 -0800636 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JIT_RULES
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800637 run_test_options += --jit
638 else
639 $$(error found $(4) expected $(COMPILER_TYPES))
640 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700641 endif
642 endif
643 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700644
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100645 ifeq ($(5),relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700646 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES
647 run_test_options += --relocate
Ian Rogersafd9acc2014-06-17 08:21:54 -0700648 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100649 ifeq ($(5),no-relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700650 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES
651 run_test_options += --no-relocate
652 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700653 ifeq ($(5),relocate-npatchoat)
Alex Light03a112d2014-08-25 13:25:56 -0700654 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES
655 run_test_options += --relocate --no-patchoat
656 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100657 $$(error found $(5) expected $(RELOCATE_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700658 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700659 endif
660 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100661 ifeq ($(6),trace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700662 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
Ian Rogers716e4f82014-07-16 11:18:03 -0700663 run_test_options += --trace
Ian Rogers716e4f82014-07-16 11:18:03 -0700664 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700665 ifeq ($(6),ntrace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700666 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES
Ian Rogers701aa642014-07-18 11:38:13 -0700667 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100668 $$(error found $(6) expected $(TRACE_TYPES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700669 endif
670 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100671 ifeq ($(7),gcverify)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700672 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700673 run_test_options += --gcverify
674 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100675 ifeq ($(7),gcstress)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700676 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700677 run_test_options += --gcstress
678 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100679 ifeq ($(7),cms)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700680 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES
Ian Rogers8a14b752014-07-18 15:06:53 -0700681 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100682 $$(error found $(7) expected $(GC_TYPES))
Ian Rogers701aa642014-07-18 11:38:13 -0700683 endif
Ian Rogers716e4f82014-07-16 11:18:03 -0700684 endif
685 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100686 ifeq ($(8),forcecopy)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700687 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700688 run_test_options += --runtime-option -Xjniopts:forcecopy
689 ifneq ($$(ART_TEST_JNI_FORCECOPY),true)
690 skip_test := true
691 endif
692 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100693 ifeq ($(8),checkjni)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700694 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700695 run_test_options += --runtime-option -Xcheck:jni
696 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100697 ifeq ($(8),jni)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700698 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES
699 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100700 $$(error found $(8) expected $(JNI_TYPES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700701 endif
702 endif
703 endif
Mathieu Chartiere2a12c02015-02-27 13:21:15 -0800704 ifeq ($(4),jit)
705 # Use interpreter image for JIT.
706 image_suffix := interpreter
707 else
708 image_suffix := $(4)
709 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100710 ifeq ($(9),no-image)
Alex Light03a112d2014-08-25 13:25:56 -0700711 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES
712 run_test_options += --no-image
Andreas Gampebf03e842014-10-29 20:46:17 -0700713 # Add the core dependency. This is required for pre-building.
714 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000715 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700716 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000717 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700718 endif
Alex Light03a112d2014-08-25 13:25:56 -0700719 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100720 ifeq ($(9),image)
Alex Light03a112d2014-08-25 13:25:56 -0700721 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
Andreas Gampec23c9c92014-10-28 14:47:25 -0700722 # Add the core dependency.
723 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000724 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700725 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000726 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700727 endif
Alex Light03a112d2014-08-25 13:25:56 -0700728 else
Andreas Gampec23c9c92014-10-28 14:47:25 -0700729 ifeq ($(9),picimage)
730 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
731 run_test_options += --pic-image
732 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000733 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700734 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000735 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700736 endif
737 else
738 $$(error found $(9) expected $(IMAGE_TYPES))
739 endif
Alex Light03a112d2014-08-25 13:25:56 -0700740 endif
741 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700742 ifeq ($(10),pictest)
743 run_test_options += --pic-test
744 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700745 ifeq ($(10),npictest)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700746 # Nothing to be done.
747 else
748 $$(error found $(10) expected $(PICTEST_TYPES))
749 endif
750 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000751 ifeq ($(11),debuggable)
752 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUGGABLE_RULES
753 run_test_options += --debuggable
754 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700755 ifeq ($(11),ndebuggable)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000756 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NONDEBUGGABLE_RULES
757 # Nothing to be done.
758 else
759 $$(error found $(11) expected $(DEBUGGABLE_TYPES))
760 endif
761 endif
762 # $(12) is the test name.
763 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(12))_RULES
764 ifeq ($(13),64)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700765 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES
766 run_test_options += --64
767 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000768 ifeq ($(13),32)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700769 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES
770 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000771 $$(error found $(13) expected $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700772 endif
773 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000774 run_test_rule_name := test-art-$(1)-run-test-$(2)-$(3)-$(4)-$(5)-$(6)-$(7)-$(8)-$(9)-$(10)-$(11)-$(12)$(13)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700775 run_test_options := --output-path $(ART_HOST_TEST_DIR)/run-test-output/$$(run_test_rule_name) \
Ian Rogers5242c0a2014-07-18 11:02:19 -0700776 $$(run_test_options)
Nicolas Geoffrayc8f23fc2014-10-28 17:59:47 +0000777 ifneq ($(ART_TEST_ANDROID_ROOT),)
778 run_test_options := --android-root $(ART_TEST_ANDROID_ROOT) $$(run_test_options)
779 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700780$$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options)
781.PHONY: $$(run_test_rule_name)
Andreas Gampe3a913092015-01-10 00:26:17 -0800782$$(run_test_rule_name): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin $(HOST_OUT_EXECUTABLES)/smali $(HOST_OUT_EXECUTABLES)/dexmerger $(HOST_OUT_EXECUTABLES)/hprof-conv $$(prereq_rule)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700783 $(hide) $$(call ART_TEST_SKIP,$$@) && \
784 DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
Andreas Gampe8fda9f22014-10-03 16:15:37 -0700785 SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
786 DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000787 art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(12) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700788 && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
789 $$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \
790 echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \
791 rm -r $(ART_HOST_TEST_DIR)) || true
792
Ian Rogersf5c44b32014-08-19 16:52:36 -0700793 $$(foreach test_group,$$(test_groups), $$(eval $$(value test_group) += $$(run_test_rule_name)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700794
795 # Clear locally defined variables.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700796 uc_host_or_target :=
797 test_groups :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700798 run_test_options :=
799 run_test_rule_name :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700800 prereq_rule :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700801endef # define-test-art-run-test
802
Ian Rogersf5c44b32014-08-19 16:52:36 -0700803$(foreach target, $(TARGET_TYPES), \
804 $(foreach test, $(TEST_ART_RUN_TESTS), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100805 $(foreach run_type, $(RUN_TYPES), \
806 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \
807 $(foreach prebuild, $(PREBUILD_TYPES), \
808 $(foreach compiler, $(COMPILER_TYPES), \
809 $(foreach relocate, $(RELOCATE_TYPES), \
810 $(foreach trace, $(TRACE_TYPES), \
811 $(foreach gc, $(GC_TYPES), \
812 $(foreach jni, $(JNI_TYPES), \
813 $(foreach image, $(IMAGE_TYPES), \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700814 $(foreach pictest, $(PICTEST_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000815 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
816 $(eval $(call define-test-art-run-test,$(target),$(run_type),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(pictest),$(debuggable),$(test),$(address_size))) \
817 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700818define-test-art-run-test :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700819
Ian Rogersafd9acc2014-06-17 08:21:54 -0700820# Define a phony rule whose purpose is to test its prerequisites.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700821# $(1): host or target
Ian Rogersafd9acc2014-06-17 08:21:54 -0700822# $(2): list of prerequisites
Ian Rogersf5c44b32014-08-19 16:52:36 -0700823define define-test-art-run-test-group
Ian Rogersafd9acc2014-06-17 08:21:54 -0700824.PHONY: $(1)
825$(1): $(2)
826 $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
827
Ian Rogersafd9acc2014-06-17 08:21:54 -0700828endef # define-test-art-run-test-group
829
Ian Rogersafd9acc2014-06-17 08:21:54 -0700830
Ian Rogersf5c44b32014-08-19 16:52:36 -0700831$(foreach target, $(TARGET_TYPES), $(eval \
832 $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES))))
833$(foreach target, $(TARGET_TYPES), \
834 $(foreach prebuild, $(PREBUILD_TYPES), $(eval \
835 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(prebuild),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES)))))
836$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100837 $(foreach run-type, $(RUN_TYPES), $(eval \
838 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(run-type),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run-type))_RULES)))))
839$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700840 $(foreach compiler, $(COMPILER_TYPES), $(eval \
841 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(compiler),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES)))))
842$(foreach target, $(TARGET_TYPES), \
843 $(foreach relocate, $(RELOCATE_TYPES), $(eval \
844 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(relocate),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES)))))
845$(foreach target, $(TARGET_TYPES), \
846 $(foreach trace, $(TRACE_TYPES), $(eval \
847 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(trace),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES)))))
848$(foreach target, $(TARGET_TYPES), \
849 $(foreach gc, $(GC_TYPES), $(eval \
850 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(gc),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES)))))
851$(foreach target, $(TARGET_TYPES), \
852 $(foreach jni, $(JNI_TYPES), $(eval \
853 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(jni),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES)))))
854$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000855 $(foreach debuggable, $(DEBUGGABLE_TYPES), $(eval \
856 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(debuggable),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable))_RULES)))))
857$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700858 $(foreach image, $(IMAGE_TYPES), $(eval \
859 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(image),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES)))))
860$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700861 $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \
862 $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(test),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES)))))
863$(foreach target, $(TARGET_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -0700864 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \
Ian Rogersa3cf6ce2014-10-02 16:35:52 -0700865 $(call define-test-art-run-test-group,test-art-$(target)-run-test$(address_size),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(address_size)_RULES)))))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700866
Ian Rogersf5c44b32014-08-19 16:52:36 -0700867# Clear variables now we're finished with them.
868$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
869$(foreach target, $(TARGET_TYPES), \
870 $(foreach prebuild, $(PREBUILD_TYPES), \
871 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
872$(foreach target, $(TARGET_TYPES), \
873 $(foreach compiler, $(COMPILER_TYPES), \
874 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
875$(foreach target, $(TARGET_TYPES), \
876 $(foreach relocate, $(RELOCATE_TYPES), \
877 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
878$(foreach target, $(TARGET_TYPES), \
879 $(foreach trace, $(TRACE_TYPES), \
880 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
881$(foreach target, $(TARGET_TYPES), \
882 $(foreach gc, $(GC_TYPES), \
883 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
884$(foreach target, $(TARGET_TYPES), \
885 $(foreach jni, $(JNI_TYPES), \
886 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
887$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000888 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
889 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable))_RULES :=)))
890$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700891 $(foreach image, $(IMAGE_TYPES), \
892 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
893$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700894 $(foreach test, $(TEST_ART_RUN_TESTS), \
895 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
896$(foreach target, $(TARGET_TYPES), \
897 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
898 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100899$(foreach target, $(TARGET_TYPES), \
900 $(foreach run_type, $(RUN_TYPES), \
901 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700902define-test-art-run-test-group :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700903TARGET_TYPES :=
904PREBUILD_TYPES :=
905COMPILER_TYPES :=
906RELOCATE_TYPES :=
907TRACE_TYPES :=
908GC_TYPES :=
909JNI_TYPES :=
Alex Light03a112d2014-08-25 13:25:56 -0700910IMAGE_TYPES :=
Ian Rogers86df3ac2014-08-27 10:54:11 -0700911ADDRESS_SIZES_TARGET :=
912ADDRESS_SIZES_HOST :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700913ALL_ADDRESS_SIZES :=
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100914RUN_TYPES :=
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000915DEBUGGABLE_TYPES :=
Ian Rogers9fcaa4b2014-08-26 19:59:52 -0700916
917include $(LOCAL_PATH)/Android.libarttest.mk
918include art/test/Android.libnativebridgetest.mk