blob: bba6f8e7214e397a8441229e730cb512e59887e6 [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
Dan Willemsen7fb2c2c2016-08-01 22:58:31 -070029art_run_tests_build_dir := $(call intermediates-dir-for,JAVA_LIBRARIES,art-run-tests)/DATA
30art_run_tests_install_dir := $(call intermediates-dir-for,PACKAGING,art-run-tests)/DATA
Ian Rogersafd9acc2014-06-17 08:21:54 -070031
32# A generated list of prerequisites that call 'run-test --build-only', the actual prerequisite is
33# an empty file touched in the intermediate directory.
34TEST_ART_RUN_TEST_BUILD_RULES :=
35
Nicolas Geoffray07f2bc12015-05-29 13:40:25 +010036# Dependencies for actually running a run-test.
Sebastien Hertz19ac0272015-02-24 17:39:50 +010037TEST_ART_RUN_TEST_DEPENDENCIES := \
38 $(DX) \
39 $(HOST_OUT_EXECUTABLES)/jasmin \
40 $(HOST_OUT_EXECUTABLES)/smali \
Sebastien Hertz2b763c32016-03-31 09:22:50 +020041 $(HOST_OUT_EXECUTABLES)/dexmerger \
42 $(JACK)
Sebastien Hertz19ac0272015-02-24 17:39:50 +010043
Sebastien Hertz2b763c32016-03-31 09:22:50 +020044TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES := setup-jack-server
Nicolas Geoffray07f2bc12015-05-29 13:40:25 +010045
Hiroshi Yamauchi093f1b42015-07-14 12:20:30 -070046ifeq ($(ART_TEST_DEBUG_GC),true)
47 ART_TEST_WITH_STRACE := true
48endif
49
Ian Rogersafd9acc2014-06-17 08:21:54 -070050# Helper to create individual build targets for tests. Must be called with $(eval).
51# $(1): the test number
52define define-build-art-run-test
Dan Willemsen7fb2c2c2016-08-01 22:58:31 -070053 dmart_target := $(art_run_tests_build_dir)/art-run-tests/$(1)/touch
54 dmart_install_target := $(art_run_tests_install_dir)/art-run-tests/$(1)/touch
Sebastien Hertz19ac0272015-02-24 17:39:50 +010055 run_test_options = --build-only
Alex Light91de25f2015-10-28 17:00:06 -070056 ifeq ($(ART_TEST_QUIET),true)
57 run_test_options += --quiet
58 endif
Sebastien Hertz19ac0272015-02-24 17:39:50 +010059$$(dmart_target): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options)
Yohann Roussel05b91252015-12-09 12:02:46 +010060$$(dmart_target): $(TEST_ART_RUN_TEST_DEPENDENCIES) $(TARGET_JACK_CLASSPATH_DEPENDENCIES) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
Ian Rogersafd9acc2014-06-17 08:21:54 -070061 $(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@)
62 $(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
Andreas Gampe8fda9f22014-10-03 16:15:37 -070063 SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
64 DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
Yohann Rousselcc6bb932016-01-19 23:29:29 +010065 JACK_VERSION=$(JACK_DEFAULT_VERSION) \
Sebastien Hertz19ac0272015-02-24 17:39:50 +010066 JACK=$(abspath $(JACK)) \
Yohann Rousselaaa779a2016-01-19 17:07:18 +010067 JACK_VERSION=$(JACK_DEFAULT_VERSION) \
Sebastien Hertz19ac0272015-02-24 17:39:50 +010068 JACK_CLASSPATH=$(TARGET_JACK_CLASSPATH) \
Sebastien Hertz19ac0272015-02-24 17:39:50 +010069 $(LOCAL_PATH)/run-test $$(PRIVATE_RUN_TEST_OPTIONS) --output-path $$(abspath $$(dir $$@)) $(1)
Ian Rogersafd9acc2014-06-17 08:21:54 -070070 $(hide) touch $$@
71
Dan Willemsen7fb2c2c2016-08-01 22:58:31 -070072$$(dmart_install_target): $$(dmart_target)
73 $(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@)
74 $(hide) cp $$(dir $$<)/* $$(dir $$@)/
75
76 TEST_ART_RUN_TEST_BUILD_RULES += $$(dmart_install_target)
Ian Rogersafd9acc2014-06-17 08:21:54 -070077 dmart_target :=
Dan Willemsen7fb2c2c2016-08-01 22:58:31 -070078 dmart_install_target :=
Sebastien Hertz19ac0272015-02-24 17:39:50 +010079 run_test_options :=
Ian Rogersafd9acc2014-06-17 08:21:54 -070080endef
Ian Rogersbf66bce2014-06-24 23:15:34 -070081$(foreach test, $(TEST_ART_RUN_TESTS), $(eval $(call define-build-art-run-test,$(test))))
Ian Rogersafd9acc2014-06-17 08:21:54 -070082
83include $(CLEAR_VARS)
84LOCAL_MODULE_TAGS := tests
85LOCAL_MODULE := art-run-tests
Ian Rogersabbf2422014-10-15 11:57:01 -070086LOCAL_ADDITIONAL_DEPENDENCIES := $(TEST_ART_RUN_TEST_BUILD_RULES)
Ian Rogersafd9acc2014-06-17 08:21:54 -070087# The build system use this flag to pick up files generated by declare-make-art-run-test.
Dan Willemsen7fb2c2c2016-08-01 22:58:31 -070088LOCAL_PICKUP_FILES := $(art_run_tests_install_dir)
Ian Rogersafd9acc2014-06-17 08:21:54 -070089
90include $(BUILD_PHONY_PACKAGE)
91
92# Clear temp vars.
Dan Willemsen7fb2c2c2016-08-01 22:58:31 -070093art_run_tests_build_dir :=
94art_run_tests_install_dir :=
Ian Rogersafd9acc2014-06-17 08:21:54 -070095define-build-art-run-test :=
Ian Rogers8a14b752014-07-18 15:06:53 -070096TEST_ART_RUN_TEST_BUILD_RULES :=
Ian Rogersafd9acc2014-06-17 08:21:54 -070097
98########################################################################
Ian Rogersf5c44b32014-08-19 16:52:36 -070099# General rules to build and run a run-test.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700100
Ian Rogersf5c44b32014-08-19 16:52:36 -0700101TARGET_TYPES := host target
Nicolas Geoffray41bb3312014-10-24 13:49:08 +0100102PREBUILD_TYPES :=
103ifeq ($(ART_TEST_RUN_TEST_PREBUILD),true)
104 PREBUILD_TYPES += prebuild
105endif
Ian Rogers86df3ac2014-08-27 10:54:11 -0700106ifeq ($(ART_TEST_RUN_TEST_NO_PREBUILD),true)
107 PREBUILD_TYPES += no-prebuild
108endif
109ifeq ($(ART_TEST_RUN_TEST_NO_DEX2OAT),true)
110 PREBUILD_TYPES += no-dex2oat
111endif
112COMPILER_TYPES :=
Igor Murashkin7617abd2015-07-10 18:27:47 -0700113ifeq ($(ART_TEST_INTERPRETER_ACCESS_CHECKS),true)
Andreas Gampe825570c2015-07-26 10:26:03 -0700114 COMPILER_TYPES += interp-ac
Igor Murashkin7617abd2015-07-10 18:27:47 -0700115endif
Ian Rogers86df3ac2014-08-27 10:54:11 -0700116ifeq ($(ART_TEST_INTERPRETER),true)
117 COMPILER_TYPES += interpreter
118endif
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800119ifeq ($(ART_TEST_JIT),true)
120 COMPILER_TYPES += jit
121endif
Matthew Gharrity71572de2016-08-08 18:03:46 -0700122OPTIMIZING_COMPILER_TYPES :=
Ian Rogers86df3ac2014-08-27 10:54:11 -0700123ifeq ($(ART_TEST_OPTIMIZING),true)
124 COMPILER_TYPES += optimizing
Matthew Gharrity71572de2016-08-08 18:03:46 -0700125 OPTIMIZING_COMPILER_TYPES += optimizing
126endif
127ifeq ($(ART_TEST_OPTIMIZING_GRAPH_COLOR),true)
128 COMPILER_TYPES += regalloc_gc
129 OPTIMIZING_COMPILER_TYPES += regalloc_gc
Ian Rogers86df3ac2014-08-27 10:54:11 -0700130endif
131RELOCATE_TYPES := relocate
132ifeq ($(ART_TEST_RUN_TEST_NO_RELOCATE),true)
133 RELOCATE_TYPES += no-relocate
134endif
135ifeq ($(ART_TEST_RUN_TEST_RELOCATE_NO_PATCHOAT),true)
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700136 RELOCATE_TYPES += relocate-npatchoat
Ian Rogers86df3ac2014-08-27 10:54:11 -0700137endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700138TRACE_TYPES := ntrace
Ian Rogers86df3ac2014-08-27 10:54:11 -0700139ifeq ($(ART_TEST_TRACE),true)
140 TRACE_TYPES += trace
141endif
Andreas Gampe7526d782015-06-22 22:53:45 -0700142ifeq ($(ART_TEST_TRACE_STREAM),true)
143 TRACE_TYPES += stream
144endif
Ian Rogers86df3ac2014-08-27 10:54:11 -0700145GC_TYPES := cms
Alex Light992f1e72014-08-27 16:08:57 -0700146ifeq ($(ART_TEST_GC_STRESS),true)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700147 GC_TYPES += gcstress
148endif
Alex Light992f1e72014-08-27 16:08:57 -0700149ifeq ($(ART_TEST_GC_VERIFY),true)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700150 GC_TYPES += gcverify
151endif
152JNI_TYPES := checkjni
153ifeq ($(ART_TEST_JNI_FORCECOPY),true)
154 JNI_TYPES += forcecopy
155endif
156IMAGE_TYPES := image
157ifeq ($(ART_TEST_RUN_TEST_NO_IMAGE),true)
158 IMAGE_TYPES += no-image
159endif
Jeff Haodcdc85b2015-12-04 14:06:18 -0800160ifeq ($(ART_TEST_RUN_TEST_MULTI_IMAGE),true)
161 IMAGE_TYPES := multiimage
162endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700163ifeq ($(ART_TEST_PIC_IMAGE),true)
164 IMAGE_TYPES += picimage
Jeff Haodcdc85b2015-12-04 14:06:18 -0800165 ifeq ($(ART_TEST_RUN_TEST_MULTI_IMAGE),true)
166 IMAGE_TYPES := multipicimage
167 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700168endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700169PICTEST_TYPES := npictest
Andreas Gampec23c9c92014-10-28 14:47:25 -0700170ifeq ($(ART_TEST_PIC_TEST),true)
171 PICTEST_TYPES += pictest
172endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100173RUN_TYPES :=
174ifeq ($(ART_TEST_RUN_TEST_DEBUG),true)
175 RUN_TYPES += debug
176endif
177ifeq ($(ART_TEST_RUN_TEST_NDEBUG),true)
178 RUN_TYPES += ndebug
179endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700180DEBUGGABLE_TYPES := ndebuggable
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000181ifeq ($(ART_TEST_RUN_TEST_DEBUGGABLE),true)
182DEBUGGABLE_TYPES += debuggable
183endif
Nicolas Geoffray41bb3312014-10-24 13:49:08 +0100184ADDRESS_SIZES_TARGET := $(ART_PHONY_TEST_TARGET_SUFFIX)
185ADDRESS_SIZES_HOST := $(ART_PHONY_TEST_HOST_SUFFIX)
186ifeq ($(ART_TEST_RUN_TEST_2ND_ARCH),true)
187 ADDRESS_SIZES_TARGET += $(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
188 ADDRESS_SIZES_HOST += $(2ND_ART_PHONY_TEST_HOST_SUFFIX)
189endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700190ALL_ADDRESS_SIZES := 64 32
Ian Rogers86df3ac2014-08-27 10:54:11 -0700191
Ian Rogersf5c44b32014-08-19 16:52:36 -0700192# List all run test names with number arguments agreeing with the comment above.
193define all-run-test-names
194 $(foreach target, $(1), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100195 $(foreach run-type, $(2), \
196 $(foreach prebuild, $(3), \
197 $(foreach compiler, $(4), \
198 $(foreach relocate, $(5), \
199 $(foreach trace, $(6), \
200 $(foreach gc, $(7), \
201 $(foreach jni, $(8), \
202 $(foreach image, $(9), \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700203 $(foreach pictest, $(10), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000204 $(foreach debuggable, $(11), \
205 $(foreach test, $(12), \
206 $(foreach address_size, $(13), \
207 test-art-$(target)-run-test-$(run-type)-$(prebuild)-$(compiler)-$(relocate)-$(trace)-$(gc)-$(jni)-$(image)-$(pictest)-$(debuggable)-$(test)$(address_size) \
208 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700209endef # all-run-test-names
210
211# To generate a full list or tests:
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100212# $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -0700213# $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Roland Levillaind139bb72015-07-15 14:09:20 +0100214# $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700215
216# Convert's a rule name to the form used in variables, e.g. no-relocate to NO_RELOCATE
217define name-to-var
218$(shell echo $(1) | tr '[:lower:]' '[:upper:]' | tr '-' '_')
219endef # name-to-var
220
Alex Lightc07d66d2015-11-13 10:51:10 -0800221ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
222 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
223 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(ART_TEST_RUN_TEST_SKIP), $(ALL_ADDRESS_SIZES))
224
Sebastien Hertzfc075552016-02-25 18:50:23 +0100225
Nicolas Geoffray76ec73a2016-06-22 13:13:59 +0000226# Disable 149-suspend-all-stress, its output is flaky (b/28988206).
Hiroshi Yamauchi6cba74b2016-03-02 12:12:54 -0800227# Disable 577-profile-foreign-dex (b/27454772).
Sebastien Hertzfc075552016-02-25 18:50:23 +0100228TEST_ART_BROKEN_ALL_TARGET_TESTS := \
Nicolas Geoffray76ec73a2016-06-22 13:13:59 +0000229 149-suspend-all-stress \
Hiroshi Yamauchi6cba74b2016-03-02 12:12:54 -0800230 577-profile-foreign-dex \
Sebastien Hertzfc075552016-02-25 18:50:23 +0100231
232ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
233 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
234 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_ALL_TARGET_TESTS), \
235 $(ALL_ADDRESS_SIZES))
236
237TEST_ART_BROKEN_ALL_TARGET_TESTS :=
238
Ian Rogersf5c44b32014-08-19 16:52:36 -0700239# Tests that are timing sensitive and flaky on heavily loaded systems.
240TEST_ART_TIMING_SENSITIVE_RUN_TESTS := \
Nicolas Geoffray0b9112d2016-01-04 15:22:00 +0000241 002-sleep \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700242 053-wait-some \
Mathieu Chartiere4a91bb2015-01-28 13:11:44 -0800243 055-enum-performance \
244 133-static-invoke-super
Ian Rogersf5c44b32014-08-19 16:52:36 -0700245
Alex Lightdedcba22015-10-14 10:43:01 -0700246# disable timing sensitive tests on "dist" builds.
247ifdef dist_goal
248 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
249 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
250 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_TIMING_SENSITIVE_RUN_TESTS), $(ALL_ADDRESS_SIZES))
251endif
252
Richard Uhlerd7864d82016-04-14 13:31:30 -0700253# 147-stripped-dex-fallback isn't supported on device because --strip-dex
254# requires the zip command.
Vladimir Marko354efa62016-02-04 19:46:56 +0000255# 569-checker-pattern-replacement tests behaviour present only on host.
256TEST_ART_BROKEN_TARGET_TESTS := \
Richard Uhlerd7864d82016-04-14 13:31:30 -0700257 147-stripped-dex-fallback \
Vladimir Marko354efa62016-02-04 19:46:56 +0000258 569-checker-pattern-replacement
259
260ifneq (,$(filter target,$(TARGET_TYPES)))
261 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
262 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
263 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_TARGET_TESTS), $(ALL_ADDRESS_SIZES))
264endif
265
266TEST_ART_BROKEN_TARGET_TESTS :=
267
Nicolas Geoffrayec00b7e2015-10-14 09:27:09 +0100268# Tests that require python3.
269TEST_ART_PYTHON3_DEPENDENCY_RUN_TESTS := \
270 960-default-smali \
271 961-default-iface-resolution-generated \
272 964-default-iface-init-generated \
Alex Light705ad492015-09-21 11:36:30 -0700273 968-default-partial-compile-generated \
Nicolas Geoffray812dd362016-01-14 22:21:14 +0000274 969-iface-super \
Alex Light705ad492015-09-21 11:36:30 -0700275 970-iface-super-resolution-generated \
Nicolas Geoffraya866ccf2016-01-19 09:17:25 +0000276 971-iface-super
Nicolas Geoffrayec00b7e2015-10-14 09:27:09 +0100277
Alex Lightdedcba22015-10-14 10:43:01 -0700278# Check if we have python3 to run our tests.
279ifeq ($(wildcard /usr/bin/python3),)
280 $(warning "No python3 found. Disabling tests: $(TEST_ART_PYTHON3_DEPENDENCY_RUN_TESTS)")
Nicolas Geoffrayec00b7e2015-10-14 09:27:09 +0100281
Alex Lightdedcba22015-10-14 10:43:01 -0700282 # Currently disable tests requiring python3 when it is not installed.
Nicolas Geoffrayec00b7e2015-10-14 09:27:09 +0100283 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
284 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
285 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_PYTHON3_DEPENDENCY_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700286endif
287
Ian Rogers86df3ac2014-08-27 10:54:11 -0700288TEST_ART_TIMING_SENSITIVE_RUN_TESTS :=
289
Ian Rogers40e19122014-09-02 15:59:28 -0700290# 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 -0700291TEST_ART_BROKEN_PREBUILD_RUN_TESTS := \
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -0800292 116-nodex2oat \
Jean Christophe Beyler24e04aa2014-09-12 12:03:25 -0700293 118-noimage-dex2oat \
294 134-nodex2oat-nofallback
Ian Rogersf5c44b32014-08-19 16:52:36 -0700295
Ian Rogers40e19122014-09-02 15:59:28 -0700296ifneq (,$(filter prebuild,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100297 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),prebuild, \
Ian Rogers40e19122014-09-02 15:59:28 -0700298 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000299 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_PREBUILD_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700300endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700301
Ian Rogers86df3ac2014-08-27 10:54:11 -0700302TEST_ART_BROKEN_PREBUILD_RUN_TESTS :=
303
Andreas Gampe216848a2015-12-02 11:49:01 -0800304# 554-jit-profile-file is disabled because it needs a primary oat file to know what it should save.
Nicolas Geoffraycfa72392016-03-22 12:55:30 +0000305# 529 and 555: b/27784033
Ian Rogersf5c44b32014-08-19 16:52:36 -0700306TEST_ART_BROKEN_NO_PREBUILD_TESTS := \
Andreas Gampe216848a2015-12-02 11:49:01 -0800307 117-nopatchoat \
Richard Uhler76f5cb62016-04-04 13:30:16 -0700308 147-stripped-dex-fallback \
Nicolas Geoffraycfa72392016-03-22 12:55:30 +0000309 554-jit-profile-file \
310 529-checker-unresolved \
Andreas Gampe06b7c4d2016-06-27 14:55:02 -0700311 555-checker-regression-x86const \
312 608-checker-unresolved-lse
Ian Rogersf5c44b32014-08-19 16:52:36 -0700313
Ian Rogers40e19122014-09-02 15:59:28 -0700314ifneq (,$(filter no-prebuild,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100315 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-prebuild, \
Ian Rogers40e19122014-09-02 15:59:28 -0700316 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000317 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_PREBUILD_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700318endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700319
Ian Rogers86df3ac2014-08-27 10:54:11 -0700320TEST_ART_BROKEN_NO_PREBUILD_TESTS :=
321
Ian Rogers40e19122014-09-02 15:59:28 -0700322# Note 117-nopatchoat is not broken per-se it just doesn't work (and isn't meant to) without
323# --prebuild --relocate
324TEST_ART_BROKEN_NO_RELOCATE_TESTS := \
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -0800325 117-nopatchoat \
326 118-noimage-dex2oat \
Calin Juravle226501b2015-12-11 14:41:31 +0000327 119-noimage-patchoat \
328 554-jit-profile-file
Ian Rogers40e19122014-09-02 15:59:28 -0700329
330ifneq (,$(filter no-relocate,$(RELOCATE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100331 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700332 $(COMPILER_TYPES), no-relocate,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000333 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_RELOCATE_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700334endif
335
336TEST_ART_BROKEN_NO_RELOCATE_TESTS :=
337
Igor Murashkin7617abd2015-07-10 18:27:47 -0700338# Temporarily disable some broken tests when forcing access checks in interpreter b/22414682
339TEST_ART_BROKEN_INTERPRETER_ACCESS_CHECK_TESTS := \
Igor Murashkindf707e42016-02-02 16:56:50 -0800340 137-cfi
Igor Murashkin7617abd2015-07-10 18:27:47 -0700341
Andreas Gampe825570c2015-07-26 10:26:03 -0700342ifneq (,$(filter interp-ac,$(COMPILER_TYPES)))
Igor Murashkin7617abd2015-07-10 18:27:47 -0700343 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Andreas Gampe825570c2015-07-26 10:26:03 -0700344 interp-ac,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Igor Murashkin7617abd2015-07-10 18:27:47 -0700345 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_INTERPRETER_ACCESS_CHECK_TESTS), $(ALL_ADDRESS_SIZES))
346endif
347
348TEST_ART_BROKEN_INTERPRETER_ACCESS_CHECK_TESTS :=
349
Man Cao1ed11b92015-06-11 22:47:35 -0700350# Tests that are broken with GC stress.
Alex Light8d148c92015-10-20 10:23:32 -0700351# * 137-cfi needs to unwind a second forked process. We're using a primitive sleep to wait till we
352# hope the second process got into the expected state. The slowness of gcstress makes this bad.
Alex Light9b0f5162015-11-13 10:39:34 -0800353# * 961-default-iface-resolution-generated and 964-default-iface-init-generated are very long tests
354# that often will take more than the timeout to run when gcstress is enabled. This is because
355# gcstress slows down allocations significantly which these tests do a lot.
Mathieu Chartiereb193622015-06-27 15:42:27 -0700356TEST_ART_BROKEN_GCSTRESS_RUN_TESTS := \
Alex Light8d148c92015-10-20 10:23:32 -0700357 137-cfi \
Alex Light9b0f5162015-11-13 10:39:34 -0800358 961-default-iface-resolution-generated \
359 964-default-iface-init-generated
Man Cao1ed11b92015-06-11 22:47:35 -0700360
361ifneq (,$(filter gcstress,$(GC_TYPES)))
362 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
363 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),gcstress,$(JNI_TYPES), \
364 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_GCSTRESS_RUN_TESTS), $(ALL_ADDRESS_SIZES))
365endif
366
367TEST_ART_BROKEN_GCSTRESS_RUN_TESTS :=
Ian Rogers40e19122014-09-02 15:59:28 -0700368
Ian Rogersf5c44b32014-08-19 16:52:36 -0700369# 115-native-bridge setup is complicated. Need to implement it correctly for the target.
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100370ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000371 $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), 115-native-bridge, \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700372 $(ALL_ADDRESS_SIZES))
373
Andreas Gampe3a913092015-01-10 00:26:17 -0800374# 130-hprof dumps the heap and runs hprof-conv to check whether the file is somewhat readable. This
375# is only possible on the host.
376# TODO: Turn off all the other combinations, this is more about testing actual ART code. A gtest is
377# very hard to write here, as (for a complete test) JDWP must be set up.
378ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
379 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000380 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),130-hprof,$(ALL_ADDRESS_SIZES))
Andreas Gampe3a913092015-01-10 00:26:17 -0800381
Andreas Gampe94329d32015-04-24 20:22:06 -0700382# 131 is an old test. The functionality has been implemented at an earlier stage and is checked
Mathieu Chartier80b37b72015-10-12 18:13:39 -0700383# in tests 138. Blacklisted for debug builds since these builds have duplicate classes checks which
384# punt to interpreter.
385ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),debug,$(PREBUILD_TYPES), \
Andreas Gampe94329d32015-04-24 20:22:06 -0700386 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
387 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),131-structural-change,$(ALL_ADDRESS_SIZES))
388
Mathieu Chartier80b37b72015-10-12 18:13:39 -0700389# 138-duplicate-classes-check. Turned on for debug builds since debug builds have duplicate classes
390# checks enabled, b/2133391.
391ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),ndebug,$(PREBUILD_TYPES), \
Andreas Gampe69b5d8f2015-06-03 15:43:16 -0700392 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
393 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),138-duplicate-classes-check,$(ALL_ADDRESS_SIZES))
394
Alex Light03a112d2014-08-25 13:25:56 -0700395# All these tests check that we have sane behavior if we don't have a patchoat or dex2oat.
396# Therefore we shouldn't run them in situations where we actually don't have these since they
397# explicitly test for them. These all also assume we have an image.
Richard Uhler1b853542016-04-15 12:16:45 -0700398# 147-stripped-dex-fallback is disabled because it requires --prebuild.
Calin Juravle226501b2015-12-11 14:41:31 +0000399# 554-jit-profile-file is disabled because it needs a primary oat file to know what it should save.
Alex Light03a112d2014-08-25 13:25:56 -0700400TEST_ART_BROKEN_FALLBACK_RUN_TESTS := \
401 116-nodex2oat \
402 117-nopatchoat \
403 118-noimage-dex2oat \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700404 119-noimage-patchoat \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700405 137-cfi \
Calin Juravle226501b2015-12-11 14:41:31 +0000406 138-duplicate-classes-check2 \
Richard Uhler1b853542016-04-15 12:16:45 -0700407 147-stripped-dex-fallback \
Calin Juravle226501b2015-12-11 14:41:31 +0000408 554-jit-profile-file
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700409
410# This test fails without an image.
411TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS := \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700412 137-cfi \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700413 138-duplicate-classes-check
Alex Light03a112d2014-08-25 13:25:56 -0700414
Ian Rogers40e19122014-09-02 15:59:28 -0700415ifneq (,$(filter no-dex2oat,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100416 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-dex2oat, \
Ian Rogers40e19122014-09-02 15:59:28 -0700417 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000418 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700419endif
Alex Light03a112d2014-08-25 13:25:56 -0700420
Alex Light03a112d2014-08-25 13:25:56 -0700421
Ian Rogers40e19122014-09-02 15:59:28 -0700422ifneq (,$(filter no-image,$(IMAGE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100423 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700424 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000425 $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700426 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
427 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
428 $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700429endif
430
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700431ifneq (,$(filter relocate-npatchoat,$(RELOCATE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100432 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700433 $(COMPILER_TYPES), relocate-npatchoat,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000434 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700435endif
Alex Light03a112d2014-08-25 13:25:56 -0700436
Ian Rogers86df3ac2014-08-27 10:54:11 -0700437TEST_ART_BROKEN_FALLBACK_RUN_TESTS :=
438
Andreas Gampee1bbed22015-05-20 13:55:00 -0700439# 137:
440# This test unrolls and expects managed frames, but tracing means we run the interpreter.
Nicolas Geoffrayd9bc4332016-02-05 23:32:25 +0000441# 802 and 570-checker-osr:
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800442# This test dynamically enables tracing to force a deoptimization. This makes the test meaningless
443# when already tracing, and writes an error message that we do not want to check for.
444TEST_ART_BROKEN_TRACING_RUN_TESTS := \
Mathieu Chartier7778b882015-10-05 16:41:10 -0700445 087-gc-after-link \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700446 137-cfi \
Mathieu Chartier42fbf492015-09-25 17:12:48 -0700447 141-class-unload \
Nicolas Geoffrayd9bc4332016-02-05 23:32:25 +0000448 570-checker-osr \
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800449 802-deoptimization
450
Andreas Gampe7526d782015-06-22 22:53:45 -0700451ifneq (,$(filter trace stream,$(TRACE_TYPES)))
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800452 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Andreas Gampe7526d782015-06-22 22:53:45 -0700453 $(COMPILER_TYPES),$(RELOCATE_TYPES),trace stream,$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000454 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_TRACING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800455endif
456
Andreas Gampee1bbed22015-05-20 13:55:00 -0700457# Known broken tests for the interpreter.
458# CFI unwinding expects managed frames.
459TEST_ART_BROKEN_INTERPRETER_RUN_TESTS := \
Calin Juravle226501b2015-12-11 14:41:31 +0000460 137-cfi \
461 554-jit-profile-file
Andreas Gampee1bbed22015-05-20 13:55:00 -0700462
463ifneq (,$(filter interpreter,$(COMPILER_TYPES)))
464 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
465 interpreter,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
466 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_INTERPRETER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
467endif
468
469TEST_ART_BROKEN_INTERPRETER_RUN_TESTS :=
470
Andreas Gampeaab9f732015-05-20 14:50:06 -0700471# Known broken tests for the JIT.
472# CFI unwinding expects managed frames, and the test does not iterate enough to even compile. JIT
473# also uses Generic JNI instead of the JNI compiler.
474TEST_ART_BROKEN_JIT_RUN_TESTS := \
475 137-cfi
476
477ifneq (,$(filter jit,$(COMPILER_TYPES)))
478 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
479 jit,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
480 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_JIT_RUN_TESTS),$(ALL_ADDRESS_SIZES))
481endif
482
483TEST_ART_BROKEN_JIT_RUN_TESTS :=
484
Matthew Gharrity71572de2016-08-08 18:03:46 -0700485# Known broken tests for the graph coloring register allocator.
486# These tests were based on the linear scan allocator, which makes different decisions than
487# the graph coloring allocator. (These attempt to test for code quality, not correctness.)
488TEST_ART_BROKEN_OPTIMIZING_GRAPH_COLOR := \
489 570-checker-select \
490 484-checker-register-hints
491
492ifneq (,$(filter regalloc_gc,$(COMPILER_TYPES)))
493 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
494 regalloc_gc,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
495 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
496 $(TEST_ART_BROKEN_OPTIMIZING_GRAPH_COLOR),$(ALL_ADDRESS_SIZES))
497endif
498
David Brazdil73b6cdf2015-09-30 11:47:35 +0100499# Known broken tests for the mips32 optimizing compiler backend.
500TEST_ART_BROKEN_OPTIMIZING_MIPS_RUN_TESTS := \
David Brazdil73b6cdf2015-09-30 11:47:35 +0100501 510-checker-try-catch \
Alexandre Rames5319def2014-10-23 10:03:10 +0100502
David Brazdil73b6cdf2015-09-30 11:47:35 +0100503ifeq (mips,$(TARGET_ARCH))
Matthew Gharrity71572de2016-08-08 18:03:46 -0700504 ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
David Brazdil73b6cdf2015-09-30 11:47:35 +0100505 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
Matthew Gharrity71572de2016-08-08 18:03:46 -0700506 $(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
David Brazdil73b6cdf2015-09-30 11:47:35 +0100507 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
508 $(TEST_ART_BROKEN_OPTIMIZING_MIPS_RUN_TESTS),$(ALL_ADDRESS_SIZES))
509 endif
Alexandre Rames5319def2014-10-23 10:03:10 +0100510endif
511
David Brazdil73b6cdf2015-09-30 11:47:35 +0100512TEST_ART_BROKEN_OPTIMIZING_MIPS_RUN_TESTS :=
Alexandre Rames5319def2014-10-23 10:03:10 +0100513
Scott Wakeling40a04bf2015-12-11 09:50:36 +0000514# Known broken tests for the mips64 optimizing compiler backend.
515TEST_ART_BROKEN_OPTIMIZING_MIPS64_RUN_TESTS := \
Scott Wakeling40a04bf2015-12-11 09:50:36 +0000516
517ifeq (mips64,$(TARGET_ARCH))
Matthew Gharrity71572de2016-08-08 18:03:46 -0700518 ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
Scott Wakeling40a04bf2015-12-11 09:50:36 +0000519 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
Matthew Gharrity71572de2016-08-08 18:03:46 -0700520 $(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Scott Wakeling40a04bf2015-12-11 09:50:36 +0000521 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
522 $(TEST_ART_BROKEN_OPTIMIZING_MIPS64_RUN_TESTS),$(ALL_ADDRESS_SIZES))
523 endif
524endif
525
526TEST_ART_BROKEN_OPTIMIZING_MIPS64_RUN_TESTS :=
527
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000528# Tests that should fail when the optimizing compiler compiles them non-debuggable.
529TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS := \
Nicolas Geoffray915b9d02015-03-11 15:11:19 +0000530 454-get-vreg \
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000531 457-regs \
532
Matthew Gharrity71572de2016-08-08 18:03:46 -0700533ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000534 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Matthew Gharrity71572de2016-08-08 18:03:46 -0700535 $(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700536 $(IMAGE_TYPES),$(PICTEST_TYPES),ndebuggable,$(TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000537endif
538
539TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS :=
540
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000541# Tests that should fail when the optimizing compiler compiles them debuggable.
542TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS := \
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000543
Matthew Gharrity71572de2016-08-08 18:03:46 -0700544ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000545 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Matthew Gharrity71572de2016-08-08 18:03:46 -0700546 $(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000547 $(IMAGE_TYPES),$(PICTEST_TYPES),debuggable,$(TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
548endif
549
550TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS :=
551
Roland Levillainb0659e62016-01-26 14:05:42 +0000552# Tests that should fail in the read barrier configuration with the interpreter.
Hiroshi Yamauchi6c738362016-03-17 14:57:58 -0700553TEST_ART_BROKEN_INTERPRETER_READ_BARRIER_RUN_TESTS :=
Hiroshi Yamauchi1d858232015-05-05 13:36:39 -0700554
Roland Levillain78ebe4a2016-01-26 10:47:42 +0000555# Tests that should fail in the read barrier configuration with the Optimizing compiler (AOT).
Roland Levillaine217fee2015-12-16 14:21:33 +0000556# 484: Baker's fast path based read barrier compiler instrumentation generates code containing
557# more parallel moves on x86, thus some Checker assertions may fail.
558# 537: Expects an array copy to be intrinsified on x86-64, but calling-on-slowpath intrinsics are
559# not yet handled in the read barrier configuration.
560TEST_ART_BROKEN_OPTIMIZING_READ_BARRIER_RUN_TESTS := \
561 484-checker-register-hints \
562 537-checker-arraycopy
563
Roland Levillain560297f2016-01-29 11:37:48 +0000564# Tests that should fail in the read barrier configuration with JIT (Optimizing compiler).
Hiroshi Yamauchi5c0a4af2016-03-17 14:57:25 -0700565TEST_ART_BROKEN_JIT_READ_BARRIER_RUN_TESTS :=
Roland Levillain3c36f662016-01-14 12:40:41 +0000566
Roland Levillaine217fee2015-12-16 14:21:33 +0000567ifeq ($(ART_USE_READ_BARRIER),true)
Roland Levillainb0659e62016-01-26 14:05:42 +0000568 ifneq (,$(filter interpreter,$(COMPILER_TYPES)))
569 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
570 $(PREBUILD_TYPES),interpreter,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES), \
571 $(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
572 $(TEST_ART_BROKEN_INTERPRETER_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
573 endif
574
Matthew Gharrity71572de2016-08-08 18:03:46 -0700575 ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
Roland Levillaine217fee2015-12-16 14:21:33 +0000576 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
Matthew Gharrity71572de2016-08-08 18:03:46 -0700577 $(PREBUILD_TYPES),$(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES), \
Roland Levillaine217fee2015-12-16 14:21:33 +0000578 $(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
579 $(TEST_ART_BROKEN_OPTIMIZING_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
580 endif
Roland Levillain3c36f662016-01-14 12:40:41 +0000581
582 ifneq (,$(filter jit,$(COMPILER_TYPES)))
583 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
584 $(PREBUILD_TYPES),jit,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES), \
585 $(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
586 $(TEST_ART_BROKEN_JIT_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
587 endif
Roland Levillaine217fee2015-12-16 14:21:33 +0000588endif
589
Roland Levillaine217fee2015-12-16 14:21:33 +0000590TEST_ART_BROKEN_OPTIMIZING_READ_BARRIER_RUN_TESTS :=
Roland Levillain3c36f662016-01-14 12:40:41 +0000591TEST_ART_BROKEN_JIT_READ_BARRIER_RUN_TESTS :=
Roland Levillaine217fee2015-12-16 14:21:33 +0000592
Alex Light2e960a02016-05-03 15:01:06 -0700593TEST_ART_BROKEN_NPIC_RUN_TESTS := 596-app-images
594ifneq (,$(filter npictest,$(PICTEST_TYPES)))
595 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
596 ${COMPILER_TYPES},$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
597 $(IMAGE_TYPES),npictest,$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_NPIC_RUN_TESTS),$(ALL_ADDRESS_SIZES))
598endif
599
Roland Levillaine217fee2015-12-16 14:21:33 +0000600# Tests that should fail in the heap poisoning configuration with the Optimizing compiler.
601# 055: Exceeds run time limits due to heap poisoning instrumentation (on ARM and ARM64 devices).
602TEST_ART_BROKEN_OPTIMIZING_HEAP_POISONING_RUN_TESTS := \
603 055-enum-performance
604
Andreas Gampe44372192015-05-21 10:01:42 -0700605ifeq ($(ART_HEAP_POISONING),true)
Matthew Gharrity71572de2016-08-08 18:03:46 -0700606 ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
Roland Levillain4d027112015-07-01 15:41:14 +0100607 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
Matthew Gharrity71572de2016-08-08 18:03:46 -0700608 $(PREBUILD_TYPES),$(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Roland Levillain4d027112015-07-01 15:41:14 +0100609 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
610 $(TEST_ART_BROKEN_OPTIMIZING_HEAP_POISONING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
611 endif
Andreas Gampe44372192015-05-21 10:01:42 -0700612endif
613
Roland Levillaine217fee2015-12-16 14:21:33 +0000614TEST_ART_BROKEN_OPTIMIZING_HEAP_POISONING_RUN_TESTS :=
Andreas Gampe44372192015-05-21 10:01:42 -0700615
Ian Rogersf5c44b32014-08-19 16:52:36 -0700616# Clear variables ahead of appending to them when defining tests.
617$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
618$(foreach target, $(TARGET_TYPES), \
619 $(foreach prebuild, $(PREBUILD_TYPES), \
620 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
621$(foreach target, $(TARGET_TYPES), \
622 $(foreach compiler, $(COMPILER_TYPES), \
623 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
624$(foreach target, $(TARGET_TYPES), \
625 $(foreach relocate, $(RELOCATE_TYPES), \
626 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
627$(foreach target, $(TARGET_TYPES), \
628 $(foreach trace, $(TRACE_TYPES), \
629 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
630$(foreach target, $(TARGET_TYPES), \
631 $(foreach gc, $(GC_TYPES), \
632 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
633$(foreach target, $(TARGET_TYPES), \
634 $(foreach jni, $(JNI_TYPES), \
635 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
636$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700637 $(foreach image, $(IMAGE_TYPES), \
638 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
639$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700640 $(foreach test, $(TEST_ART_RUN_TESTS), \
641 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
642$(foreach target, $(TARGET_TYPES), \
643 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
644 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100645$(foreach target, $(TARGET_TYPES), \
646 $(foreach run_type, $(RUN_TYPES), \
647 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000648$(foreach target, $(TARGET_TYPES), \
649 $(foreach debuggable_type, $(DEBUGGABLE_TYPES), \
650 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700651
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700652# We need dex2oat and dalvikvm on the target as well as the core images (all images as we sync
653# only once).
654TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_EXECUTABLES) $(TARGET_CORE_IMG_OUTS)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700655
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700656# Also need libarttest.
657TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so
Mathieu Chartier031768a2015-08-27 10:25:02 -0700658TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttestd.so
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700659ifdef TARGET_2ND_ARCH
660TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so
Mathieu Chartier031768a2015-08-27 10:25:02 -0700661TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttestd.so
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700662endif
663
Andreas Gampe855564b2014-07-25 02:32:19 -0700664# Also need libnativebridgetest.
665TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so
666ifdef TARGET_2ND_ARCH
667TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so
668endif
669
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700670# All tests require the host executables. The tests also depend on the core images, but on
671# specific version depending on the compiler.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700672ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \
673 $(ART_HOST_EXECUTABLES) \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700674 $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Mathieu Chartier031768a2015-08-27 10:25:02 -0700675 $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttestd$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700676 $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Narayan Kamath67ef2c92015-11-16 10:17:35 +0000677 $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe10edbb12016-01-06 17:59:49 -0800678 $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \
679 $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700680
681ifneq ($(HOST_PREFER_32_BIT),true)
682ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700683 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Mathieu Chartier031768a2015-08-27 10:25:02 -0700684 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttestd$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700685 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Narayan Kamath67ef2c92015-11-16 10:17:35 +0000686 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe10edbb12016-01-06 17:59:49 -0800687 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \
688 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700689endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700690
Ian Rogersf5c44b32014-08-19 16:52:36 -0700691# Create a rule to build and run a tests following the form:
Calin Juravle9228b2a2014-10-22 15:54:34 +0100692# test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}-
Nicolas Geoffray7db00cd2016-03-22 10:43:01 +0000693# {4: interpreter optimizing jit interp-ac}-
Igor Murashkin7617abd2015-07-10 18:27:47 -0700694# {5: relocate nrelocate relocate-npatchoat}-
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700695# {6: trace or ntrace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}-
696# {9: no-image image picimage}-{10: pictest npictest}-
697# {11: ndebuggable debuggable}-{12: test name}{13: 32 or 64}
Ian Rogersafd9acc2014-06-17 08:21:54 -0700698define define-test-art-run-test
Nicolas Geoffray611e1db2014-10-09 17:34:45 +0100699 run_test_options :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700700 prereq_rule :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700701 test_groups :=
702 uc_host_or_target :=
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100703 jack_classpath :=
Hiroshi Yamauchi1d4184d2015-07-13 17:11:22 -0700704 ifeq ($(ART_TEST_WITH_STRACE),true)
705 run_test_options += --strace
706 endif
Alex Lightbfac14a2014-07-30 09:41:21 -0700707 ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true)
708 run_test_options += --always-clean
709 endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700710 ifeq ($(1),host)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700711 uc_host_or_target := HOST
Ian Rogersf5c44b32014-08-19 16:52:36 -0700712 test_groups := ART_RUN_TEST_HOST_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700713 run_test_options += --host
Yohann Roussel30486982015-07-21 16:25:44 +0200714 prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(HOST_JACK_CLASSPATH_DEPENDENCIES)
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100715 jack_classpath := $(HOST_JACK_CLASSPATH)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700716 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700717 ifeq ($(1),target)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700718 uc_host_or_target := TARGET
Ian Rogersf5c44b32014-08-19 16:52:36 -0700719 test_groups := ART_RUN_TEST_TARGET_RULES
Yohann Roussel30486982015-07-21 16:25:44 +0200720 prereq_rule := test-art-target-sync $(TARGET_JACK_CLASSPATH_DEPENDENCIES)
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100721 jack_classpath := $(TARGET_JACK_CLASSPATH)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700722 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700723 $$(error found $(1) expected $(TARGET_TYPES))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700724 endif
725 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100726 ifeq ($(2),debug)
727 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUG_RULES
728 else
729 ifeq ($(2),ndebug)
730 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELEASE_RULES
731 run_test_options += -O
732 else
733 $$(error found $(2) expected $(RUN_TYPES))
734 endif
735 endif
736 ifeq ($(3),prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700737 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES
738 run_test_options += --prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700739 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100740 ifeq ($(3),no-prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700741 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES
742 run_test_options += --no-prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700743 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100744 ifeq ($(3),no-dex2oat)
Alex Light03a112d2014-08-25 13:25:56 -0700745 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES
746 run_test_options += --no-prebuild --no-dex2oat
747 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100748 $$(error found $(3) expected $(PREBUILD_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700749 endif
Alex Lighta59dd802014-07-02 16:28:08 -0700750 endif
751 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100752 ifeq ($(4),optimizing)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700753 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700754 run_test_options += --optimizing
Matthew Gharrity71572de2016-08-08 18:03:46 -0700755 else ifeq ($(4),regalloc_gc)
756 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_GRAPH_COLOR_RULES
757 run_test_options += --optimizing -Xcompiler-option --register-allocation-strategy=graph-color
Ian Rogersafd9acc2014-06-17 08:21:54 -0700758 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100759 ifeq ($(4),interpreter)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700760 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700761 run_test_options += --interpreter
Andreas Gampe825570c2015-07-26 10:26:03 -0700762 else ifeq ($(4),interp-ac)
Igor Murashkin7617abd2015-07-10 18:27:47 -0700763 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_ACCESS_CHECKS_RULES
764 run_test_options += --interpreter --verify-soft-fail
Ian Rogersafd9acc2014-06-17 08:21:54 -0700765 else
Nicolas Geoffray7db00cd2016-03-22 10:43:01 +0000766 ifeq ($(4),jit)
767 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JIT_RULES
768 run_test_options += --jit
Ian Rogersafd9acc2014-06-17 08:21:54 -0700769 else
Nicolas Geoffray7db00cd2016-03-22 10:43:01 +0000770 $$(error found $(4) expected $(COMPILER_TYPES))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700771 endif
772 endif
773 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700774
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100775 ifeq ($(5),relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700776 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES
777 run_test_options += --relocate
Ian Rogersafd9acc2014-06-17 08:21:54 -0700778 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100779 ifeq ($(5),no-relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700780 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES
781 run_test_options += --no-relocate
782 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700783 ifeq ($(5),relocate-npatchoat)
Alex Light03a112d2014-08-25 13:25:56 -0700784 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES
785 run_test_options += --relocate --no-patchoat
786 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100787 $$(error found $(5) expected $(RELOCATE_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700788 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700789 endif
790 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100791 ifeq ($(6),trace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700792 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
Ian Rogers716e4f82014-07-16 11:18:03 -0700793 run_test_options += --trace
Ian Rogers716e4f82014-07-16 11:18:03 -0700794 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700795 ifeq ($(6),ntrace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700796 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES
Ian Rogers701aa642014-07-18 11:38:13 -0700797 else
Andreas Gampe7526d782015-06-22 22:53:45 -0700798 ifeq ($(6),stream)
799 # Group streaming under normal tracing rules.
800 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
801 run_test_options += --trace --stream
802 else
803 $$(error found $(6) expected $(TRACE_TYPES))
804 endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700805 endif
806 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100807 ifeq ($(7),gcverify)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700808 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700809 run_test_options += --gcverify
810 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100811 ifeq ($(7),gcstress)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700812 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700813 run_test_options += --gcstress
814 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100815 ifeq ($(7),cms)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700816 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES
Ian Rogers8a14b752014-07-18 15:06:53 -0700817 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100818 $$(error found $(7) expected $(GC_TYPES))
Ian Rogers701aa642014-07-18 11:38:13 -0700819 endif
Ian Rogers716e4f82014-07-16 11:18:03 -0700820 endif
821 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100822 ifeq ($(8),forcecopy)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700823 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700824 run_test_options += --runtime-option -Xjniopts:forcecopy
825 ifneq ($$(ART_TEST_JNI_FORCECOPY),true)
826 skip_test := true
827 endif
828 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100829 ifeq ($(8),checkjni)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700830 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700831 run_test_options += --runtime-option -Xcheck:jni
832 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100833 ifeq ($(8),jni)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700834 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES
835 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100836 $$(error found $(8) expected $(JNI_TYPES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700837 endif
838 endif
839 endif
Andreas Gampe8a159fd2015-09-21 15:14:38 -0700840 image_suffix := $(4)
Matthew Gharrity71572de2016-08-08 18:03:46 -0700841 ifeq ($(4),regalloc_gc)
842 # Graph coloring tests share the image_suffix with optimizing tests.
843 image_suffix := optimizing
844 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100845 ifeq ($(9),no-image)
Alex Light03a112d2014-08-25 13:25:56 -0700846 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES
847 run_test_options += --no-image
Andreas Gampebf03e842014-10-29 20:46:17 -0700848 # Add the core dependency. This is required for pre-building.
849 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000850 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700851 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000852 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700853 endif
Alex Light03a112d2014-08-25 13:25:56 -0700854 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100855 ifeq ($(9),image)
Alex Light03a112d2014-08-25 13:25:56 -0700856 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
Andreas Gampec23c9c92014-10-28 14:47:25 -0700857 # Add the core dependency.
858 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000859 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700860 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000861 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700862 endif
Alex Light03a112d2014-08-25 13:25:56 -0700863 else
Andreas Gampec23c9c92014-10-28 14:47:25 -0700864 ifeq ($(9),picimage)
865 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
866 run_test_options += --pic-image
867 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000868 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700869 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000870 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700871 endif
872 else
Jeff Haodcdc85b2015-12-04 14:06:18 -0800873 ifeq ($(9),multiimage)
874 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
875 run_test_options += --multi-image
Roland Levillain3c36f662016-01-14 12:40:41 +0000876 ifeq ($(1),host)
877 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_multi_$(13))
878 else
879 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_multi_$(13))
880 endif
Jeff Haodcdc85b2015-12-04 14:06:18 -0800881 else
882 ifeq ($(9),multipicimage)
883 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
Roland Levillain3c36f662016-01-14 12:40:41 +0000884 run_test_options += --pic-image --multi-image
885 ifeq ($(1),host)
886 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_multi_$(13))
887 else
888 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_multi_$(13))
889 endif
Jeff Haodcdc85b2015-12-04 14:06:18 -0800890 else
891 $$(error found $(9) expected $(IMAGE_TYPES))
892 endif
893 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700894 endif
Alex Light03a112d2014-08-25 13:25:56 -0700895 endif
896 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700897 ifeq ($(10),pictest)
898 run_test_options += --pic-test
899 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700900 ifeq ($(10),npictest)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700901 # Nothing to be done.
902 else
903 $$(error found $(10) expected $(PICTEST_TYPES))
904 endif
905 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000906 ifeq ($(11),debuggable)
907 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUGGABLE_RULES
908 run_test_options += --debuggable
909 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700910 ifeq ($(11),ndebuggable)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000911 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NONDEBUGGABLE_RULES
912 # Nothing to be done.
913 else
914 $$(error found $(11) expected $(DEBUGGABLE_TYPES))
915 endif
916 endif
917 # $(12) is the test name.
918 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(12))_RULES
919 ifeq ($(13),64)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700920 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES
921 run_test_options += --64
922 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000923 ifeq ($(13),32)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700924 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES
925 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000926 $$(error found $(13) expected $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700927 endif
928 endif
Andreas Gampe4d2ef332015-08-05 09:24:45 -0700929 # Override of host instruction-set-features. Required to test advanced x86 intrinsics. The
930 # conditionals aren't really correct, they will fail to do the right thing on a 32-bit only
931 # host. However, this isn't common enough to worry here and make the conditions complicated.
932 ifneq ($(DEX2OAT_HOST_INSTRUCTION_SET_FEATURES),)
933 ifeq ($(13),64)
934 run_test_options += --instruction-set-features $(DEX2OAT_HOST_INSTRUCTION_SET_FEATURES)
935 endif
936 endif
937 ifneq ($($(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES),)
938 ifeq ($(13),32)
939 run_test_options += --instruction-set-features $($(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES)
940 endif
941 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000942 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 -0700943 run_test_options := --output-path $(ART_HOST_TEST_DIR)/run-test-output/$$(run_test_rule_name) \
Ian Rogers5242c0a2014-07-18 11:02:19 -0700944 $$(run_test_options)
Nicolas Geoffrayc8f23fc2014-10-28 17:59:47 +0000945 ifneq ($(ART_TEST_ANDROID_ROOT),)
946 run_test_options := --android-root $(ART_TEST_ANDROID_ROOT) $$(run_test_options)
947 endif
Alex Light91de25f2015-10-28 17:00:06 -0700948 ifeq ($(ART_TEST_QUIET),true)
949 run_test_options += --quiet
950 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700951$$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options)
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100952$$(run_test_rule_name): PRIVATE_JACK_CLASSPATH := $$(jack_classpath)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700953.PHONY: $$(run_test_rule_name)
Yohann Roussel05b91252015-12-09 12:02:46 +0100954$$(run_test_rule_name): $(TEST_ART_RUN_TEST_DEPENDENCIES) $(HOST_OUT_EXECUTABLES)/hprof-conv $$(prereq_rule) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700955 $(hide) $$(call ART_TEST_SKIP,$$@) && \
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100956 DX=$(abspath $(DX)) \
957 JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
Andreas Gampe8fda9f22014-10-03 16:15:37 -0700958 SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
959 DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
Yohann Rousselcc6bb932016-01-19 23:29:29 +0100960 JACK_VERSION=$(JACK_DEFAULT_VERSION) \
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100961 JACK=$(abspath $(JACK)) \
Yohann Rousselaaa779a2016-01-19 17:07:18 +0100962 JACK_VERSION=$(JACK_DEFAULT_VERSION) \
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100963 JACK_CLASSPATH=$$(PRIVATE_JACK_CLASSPATH) \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000964 art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(12) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700965 && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
966 $$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \
967 echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \
968 rm -r $(ART_HOST_TEST_DIR)) || true
969
Ian Rogersf5c44b32014-08-19 16:52:36 -0700970 $$(foreach test_group,$$(test_groups), $$(eval $$(value test_group) += $$(run_test_rule_name)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700971
972 # Clear locally defined variables.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700973 uc_host_or_target :=
974 test_groups :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700975 run_test_options :=
976 run_test_rule_name :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700977 prereq_rule :=
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100978 jack_classpath :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700979endef # define-test-art-run-test
980
Ian Rogersf5c44b32014-08-19 16:52:36 -0700981$(foreach target, $(TARGET_TYPES), \
982 $(foreach test, $(TEST_ART_RUN_TESTS), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100983 $(foreach run_type, $(RUN_TYPES), \
984 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \
985 $(foreach prebuild, $(PREBUILD_TYPES), \
986 $(foreach compiler, $(COMPILER_TYPES), \
987 $(foreach relocate, $(RELOCATE_TYPES), \
988 $(foreach trace, $(TRACE_TYPES), \
989 $(foreach gc, $(GC_TYPES), \
990 $(foreach jni, $(JNI_TYPES), \
991 $(foreach image, $(IMAGE_TYPES), \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700992 $(foreach pictest, $(PICTEST_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000993 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
994 $(eval $(call define-test-art-run-test,$(target),$(run_type),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(pictest),$(debuggable),$(test),$(address_size))) \
995 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700996define-test-art-run-test :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700997
Ian Rogersafd9acc2014-06-17 08:21:54 -0700998# Define a phony rule whose purpose is to test its prerequisites.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700999# $(1): host or target
Ian Rogersafd9acc2014-06-17 08:21:54 -07001000# $(2): list of prerequisites
Ian Rogersf5c44b32014-08-19 16:52:36 -07001001define define-test-art-run-test-group
Ian Rogersafd9acc2014-06-17 08:21:54 -07001002.PHONY: $(1)
1003$(1): $(2)
1004 $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
1005
Ian Rogersafd9acc2014-06-17 08:21:54 -07001006endef # define-test-art-run-test-group
1007
Ian Rogersafd9acc2014-06-17 08:21:54 -07001008
Ian Rogersf5c44b32014-08-19 16:52:36 -07001009$(foreach target, $(TARGET_TYPES), $(eval \
1010 $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES))))
1011$(foreach target, $(TARGET_TYPES), \
1012 $(foreach prebuild, $(PREBUILD_TYPES), $(eval \
1013 $(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)))))
1014$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +01001015 $(foreach run-type, $(RUN_TYPES), $(eval \
1016 $(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)))))
1017$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -07001018 $(foreach compiler, $(COMPILER_TYPES), $(eval \
1019 $(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)))))
1020$(foreach target, $(TARGET_TYPES), \
1021 $(foreach relocate, $(RELOCATE_TYPES), $(eval \
1022 $(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)))))
1023$(foreach target, $(TARGET_TYPES), \
1024 $(foreach trace, $(TRACE_TYPES), $(eval \
1025 $(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)))))
1026$(foreach target, $(TARGET_TYPES), \
1027 $(foreach gc, $(GC_TYPES), $(eval \
1028 $(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)))))
1029$(foreach target, $(TARGET_TYPES), \
1030 $(foreach jni, $(JNI_TYPES), $(eval \
1031 $(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)))))
1032$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +00001033 $(foreach debuggable, $(DEBUGGABLE_TYPES), $(eval \
1034 $(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)))))
1035$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -07001036 $(foreach image, $(IMAGE_TYPES), $(eval \
1037 $(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)))))
1038$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -07001039 $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \
1040 $(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)))))
1041$(foreach target, $(TARGET_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -07001042 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \
Ian Rogersa3cf6ce2014-10-02 16:35:52 -07001043 $(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 -07001044
Ian Rogersf5c44b32014-08-19 16:52:36 -07001045# Clear variables now we're finished with them.
1046$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
1047$(foreach target, $(TARGET_TYPES), \
1048 $(foreach prebuild, $(PREBUILD_TYPES), \
1049 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
1050$(foreach target, $(TARGET_TYPES), \
1051 $(foreach compiler, $(COMPILER_TYPES), \
1052 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
1053$(foreach target, $(TARGET_TYPES), \
1054 $(foreach relocate, $(RELOCATE_TYPES), \
1055 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
1056$(foreach target, $(TARGET_TYPES), \
1057 $(foreach trace, $(TRACE_TYPES), \
1058 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
1059$(foreach target, $(TARGET_TYPES), \
1060 $(foreach gc, $(GC_TYPES), \
1061 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
1062$(foreach target, $(TARGET_TYPES), \
1063 $(foreach jni, $(JNI_TYPES), \
1064 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
1065$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +00001066 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
1067 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable))_RULES :=)))
1068$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -07001069 $(foreach image, $(IMAGE_TYPES), \
1070 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
1071$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -07001072 $(foreach test, $(TEST_ART_RUN_TESTS), \
1073 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
1074$(foreach target, $(TARGET_TYPES), \
1075 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
1076 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +01001077$(foreach target, $(TARGET_TYPES), \
1078 $(foreach run_type, $(RUN_TYPES), \
1079 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -07001080define-test-art-run-test-group :=
Ian Rogersf5c44b32014-08-19 16:52:36 -07001081TARGET_TYPES :=
1082PREBUILD_TYPES :=
1083COMPILER_TYPES :=
1084RELOCATE_TYPES :=
1085TRACE_TYPES :=
1086GC_TYPES :=
1087JNI_TYPES :=
Alex Light03a112d2014-08-25 13:25:56 -07001088IMAGE_TYPES :=
Ian Rogers86df3ac2014-08-27 10:54:11 -07001089ADDRESS_SIZES_TARGET :=
1090ADDRESS_SIZES_HOST :=
Ian Rogersf5c44b32014-08-19 16:52:36 -07001091ALL_ADDRESS_SIZES :=
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +01001092RUN_TYPES :=
Nicolas Geoffray43c162f2015-03-09 12:21:26 +00001093DEBUGGABLE_TYPES :=
Ian Rogers9fcaa4b2014-08-26 19:59:52 -07001094
1095include $(LOCAL_PATH)/Android.libarttest.mk
1096include art/test/Android.libnativebridgetest.mk