blob: ead80304bbaa82de173f170855352944bcf119a9 [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.
Roland Levillain4a3aa572016-08-15 13:17:06 +0000558# 527: On ARM64 and ARM, the read barrier instrumentation does not support the HIntermediateAddress
559# instruction yet (b/26601270).
Roland Levillaine217fee2015-12-16 14:21:33 +0000560TEST_ART_BROKEN_OPTIMIZING_READ_BARRIER_RUN_TESTS := \
561 484-checker-register-hints \
Roland Levillain0b671c02016-08-19 12:02:34 +0100562 527-checker-array-access-split
Roland Levillaine217fee2015-12-16 14:21:33 +0000563
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
Alex Light7233c7e2016-07-28 10:07:45 -0700656# Also need libartagent.
657TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libartagent.so
658TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libartagentd.so
659ifdef TARGET_2ND_ARCH
660TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libartagent.so
661TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libartagentd.so
662endif
663
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700664# Also need libarttest.
665TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so
Mathieu Chartier031768a2015-08-27 10:25:02 -0700666TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttestd.so
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700667ifdef TARGET_2ND_ARCH
668TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so
Mathieu Chartier031768a2015-08-27 10:25:02 -0700669TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttestd.so
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700670endif
671
Andreas Gampe855564b2014-07-25 02:32:19 -0700672# Also need libnativebridgetest.
673TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so
674ifdef TARGET_2ND_ARCH
675TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so
676endif
677
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700678# All tests require the host executables. The tests also depend on the core images, but on
679# specific version depending on the compiler.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700680ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \
681 $(ART_HOST_EXECUTABLES) \
Alex Light7233c7e2016-07-28 10:07:45 -0700682 $(ART_HOST_OUT_SHARED_LIBRARIES)/libartagent$(ART_HOST_SHLIB_EXTENSION) \
683 $(ART_HOST_OUT_SHARED_LIBRARIES)/libartagentd$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700684 $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Mathieu Chartier031768a2015-08-27 10:25:02 -0700685 $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttestd$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700686 $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Narayan Kamath67ef2c92015-11-16 10:17:35 +0000687 $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe10edbb12016-01-06 17:59:49 -0800688 $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \
689 $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700690
691ifneq ($(HOST_PREFER_32_BIT),true)
692ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \
Alex Light7233c7e2016-07-28 10:07:45 -0700693 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libartagent$(ART_HOST_SHLIB_EXTENSION) \
694 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libartagentd$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700695 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Mathieu Chartier031768a2015-08-27 10:25:02 -0700696 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttestd$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700697 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Narayan Kamath67ef2c92015-11-16 10:17:35 +0000698 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe10edbb12016-01-06 17:59:49 -0800699 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \
700 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700701endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700702
Ian Rogersf5c44b32014-08-19 16:52:36 -0700703# Create a rule to build and run a tests following the form:
Calin Juravle9228b2a2014-10-22 15:54:34 +0100704# test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}-
Nicolas Geoffray7db00cd2016-03-22 10:43:01 +0000705# {4: interpreter optimizing jit interp-ac}-
Igor Murashkin7617abd2015-07-10 18:27:47 -0700706# {5: relocate nrelocate relocate-npatchoat}-
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700707# {6: trace or ntrace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}-
708# {9: no-image image picimage}-{10: pictest npictest}-
709# {11: ndebuggable debuggable}-{12: test name}{13: 32 or 64}
Ian Rogersafd9acc2014-06-17 08:21:54 -0700710define define-test-art-run-test
Nicolas Geoffray611e1db2014-10-09 17:34:45 +0100711 run_test_options :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700712 prereq_rule :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700713 test_groups :=
714 uc_host_or_target :=
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100715 jack_classpath :=
Hiroshi Yamauchi1d4184d2015-07-13 17:11:22 -0700716 ifeq ($(ART_TEST_WITH_STRACE),true)
717 run_test_options += --strace
718 endif
Alex Lightbfac14a2014-07-30 09:41:21 -0700719 ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true)
720 run_test_options += --always-clean
721 endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700722 ifeq ($(1),host)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700723 uc_host_or_target := HOST
Ian Rogersf5c44b32014-08-19 16:52:36 -0700724 test_groups := ART_RUN_TEST_HOST_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700725 run_test_options += --host
Yohann Roussel30486982015-07-21 16:25:44 +0200726 prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(HOST_JACK_CLASSPATH_DEPENDENCIES)
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100727 jack_classpath := $(HOST_JACK_CLASSPATH)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700728 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700729 ifeq ($(1),target)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700730 uc_host_or_target := TARGET
Ian Rogersf5c44b32014-08-19 16:52:36 -0700731 test_groups := ART_RUN_TEST_TARGET_RULES
Yohann Roussel30486982015-07-21 16:25:44 +0200732 prereq_rule := test-art-target-sync $(TARGET_JACK_CLASSPATH_DEPENDENCIES)
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100733 jack_classpath := $(TARGET_JACK_CLASSPATH)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700734 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700735 $$(error found $(1) expected $(TARGET_TYPES))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700736 endif
737 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100738 ifeq ($(2),debug)
739 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUG_RULES
740 else
741 ifeq ($(2),ndebug)
742 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELEASE_RULES
743 run_test_options += -O
744 else
745 $$(error found $(2) expected $(RUN_TYPES))
746 endif
747 endif
748 ifeq ($(3),prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700749 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES
750 run_test_options += --prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700751 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100752 ifeq ($(3),no-prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700753 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES
754 run_test_options += --no-prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700755 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100756 ifeq ($(3),no-dex2oat)
Alex Light03a112d2014-08-25 13:25:56 -0700757 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES
758 run_test_options += --no-prebuild --no-dex2oat
759 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100760 $$(error found $(3) expected $(PREBUILD_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700761 endif
Alex Lighta59dd802014-07-02 16:28:08 -0700762 endif
763 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100764 ifeq ($(4),optimizing)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700765 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700766 run_test_options += --optimizing
Matthew Gharrity71572de2016-08-08 18:03:46 -0700767 else ifeq ($(4),regalloc_gc)
768 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_GRAPH_COLOR_RULES
769 run_test_options += --optimizing -Xcompiler-option --register-allocation-strategy=graph-color
Ian Rogersafd9acc2014-06-17 08:21:54 -0700770 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100771 ifeq ($(4),interpreter)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700772 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700773 run_test_options += --interpreter
Andreas Gampe825570c2015-07-26 10:26:03 -0700774 else ifeq ($(4),interp-ac)
Igor Murashkin7617abd2015-07-10 18:27:47 -0700775 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_ACCESS_CHECKS_RULES
776 run_test_options += --interpreter --verify-soft-fail
Ian Rogersafd9acc2014-06-17 08:21:54 -0700777 else
Nicolas Geoffray7db00cd2016-03-22 10:43:01 +0000778 ifeq ($(4),jit)
779 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JIT_RULES
780 run_test_options += --jit
Ian Rogersafd9acc2014-06-17 08:21:54 -0700781 else
Nicolas Geoffray7db00cd2016-03-22 10:43:01 +0000782 $$(error found $(4) expected $(COMPILER_TYPES))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700783 endif
784 endif
785 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700786
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100787 ifeq ($(5),relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700788 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES
789 run_test_options += --relocate
Ian Rogersafd9acc2014-06-17 08:21:54 -0700790 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100791 ifeq ($(5),no-relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700792 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES
793 run_test_options += --no-relocate
794 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700795 ifeq ($(5),relocate-npatchoat)
Alex Light03a112d2014-08-25 13:25:56 -0700796 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES
797 run_test_options += --relocate --no-patchoat
798 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100799 $$(error found $(5) expected $(RELOCATE_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700800 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700801 endif
802 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100803 ifeq ($(6),trace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700804 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
Ian Rogers716e4f82014-07-16 11:18:03 -0700805 run_test_options += --trace
Ian Rogers716e4f82014-07-16 11:18:03 -0700806 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700807 ifeq ($(6),ntrace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700808 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES
Ian Rogers701aa642014-07-18 11:38:13 -0700809 else
Andreas Gampe7526d782015-06-22 22:53:45 -0700810 ifeq ($(6),stream)
811 # Group streaming under normal tracing rules.
812 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
813 run_test_options += --trace --stream
814 else
815 $$(error found $(6) expected $(TRACE_TYPES))
816 endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700817 endif
818 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100819 ifeq ($(7),gcverify)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700820 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700821 run_test_options += --gcverify
822 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100823 ifeq ($(7),gcstress)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700824 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700825 run_test_options += --gcstress
826 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100827 ifeq ($(7),cms)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700828 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES
Ian Rogers8a14b752014-07-18 15:06:53 -0700829 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100830 $$(error found $(7) expected $(GC_TYPES))
Ian Rogers701aa642014-07-18 11:38:13 -0700831 endif
Ian Rogers716e4f82014-07-16 11:18:03 -0700832 endif
833 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100834 ifeq ($(8),forcecopy)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700835 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700836 run_test_options += --runtime-option -Xjniopts:forcecopy
837 ifneq ($$(ART_TEST_JNI_FORCECOPY),true)
838 skip_test := true
839 endif
840 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100841 ifeq ($(8),checkjni)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700842 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700843 run_test_options += --runtime-option -Xcheck:jni
844 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100845 ifeq ($(8),jni)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700846 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES
847 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100848 $$(error found $(8) expected $(JNI_TYPES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700849 endif
850 endif
851 endif
Andreas Gampe8a159fd2015-09-21 15:14:38 -0700852 image_suffix := $(4)
Matthew Gharrity71572de2016-08-08 18:03:46 -0700853 ifeq ($(4),regalloc_gc)
854 # Graph coloring tests share the image_suffix with optimizing tests.
855 image_suffix := optimizing
856 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100857 ifeq ($(9),no-image)
Alex Light03a112d2014-08-25 13:25:56 -0700858 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES
859 run_test_options += --no-image
Andreas Gampebf03e842014-10-29 20:46:17 -0700860 # Add the core dependency. This is required for pre-building.
861 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000862 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700863 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000864 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700865 endif
Alex Light03a112d2014-08-25 13:25:56 -0700866 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100867 ifeq ($(9),image)
Alex Light03a112d2014-08-25 13:25:56 -0700868 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
Andreas Gampec23c9c92014-10-28 14:47:25 -0700869 # Add the core dependency.
870 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000871 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700872 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000873 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700874 endif
Alex Light03a112d2014-08-25 13:25:56 -0700875 else
Andreas Gampec23c9c92014-10-28 14:47:25 -0700876 ifeq ($(9),picimage)
877 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
878 run_test_options += --pic-image
879 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000880 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700881 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000882 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700883 endif
884 else
Jeff Haodcdc85b2015-12-04 14:06:18 -0800885 ifeq ($(9),multiimage)
886 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
887 run_test_options += --multi-image
Roland Levillain3c36f662016-01-14 12:40:41 +0000888 ifeq ($(1),host)
889 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_multi_$(13))
890 else
891 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_multi_$(13))
892 endif
Jeff Haodcdc85b2015-12-04 14:06:18 -0800893 else
894 ifeq ($(9),multipicimage)
895 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
Roland Levillain3c36f662016-01-14 12:40:41 +0000896 run_test_options += --pic-image --multi-image
897 ifeq ($(1),host)
898 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_multi_$(13))
899 else
900 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_multi_$(13))
901 endif
Jeff Haodcdc85b2015-12-04 14:06:18 -0800902 else
903 $$(error found $(9) expected $(IMAGE_TYPES))
904 endif
905 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700906 endif
Alex Light03a112d2014-08-25 13:25:56 -0700907 endif
908 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700909 ifeq ($(10),pictest)
910 run_test_options += --pic-test
911 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700912 ifeq ($(10),npictest)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700913 # Nothing to be done.
914 else
915 $$(error found $(10) expected $(PICTEST_TYPES))
916 endif
917 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000918 ifeq ($(11),debuggable)
919 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUGGABLE_RULES
920 run_test_options += --debuggable
921 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700922 ifeq ($(11),ndebuggable)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000923 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NONDEBUGGABLE_RULES
924 # Nothing to be done.
925 else
926 $$(error found $(11) expected $(DEBUGGABLE_TYPES))
927 endif
928 endif
929 # $(12) is the test name.
930 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(12))_RULES
931 ifeq ($(13),64)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700932 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES
933 run_test_options += --64
934 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000935 ifeq ($(13),32)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700936 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES
937 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000938 $$(error found $(13) expected $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700939 endif
940 endif
Andreas Gampe4d2ef332015-08-05 09:24:45 -0700941 # Override of host instruction-set-features. Required to test advanced x86 intrinsics. The
942 # conditionals aren't really correct, they will fail to do the right thing on a 32-bit only
943 # host. However, this isn't common enough to worry here and make the conditions complicated.
944 ifneq ($(DEX2OAT_HOST_INSTRUCTION_SET_FEATURES),)
945 ifeq ($(13),64)
946 run_test_options += --instruction-set-features $(DEX2OAT_HOST_INSTRUCTION_SET_FEATURES)
947 endif
948 endif
949 ifneq ($($(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES),)
950 ifeq ($(13),32)
951 run_test_options += --instruction-set-features $($(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES)
952 endif
953 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000954 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 -0700955 run_test_options := --output-path $(ART_HOST_TEST_DIR)/run-test-output/$$(run_test_rule_name) \
Ian Rogers5242c0a2014-07-18 11:02:19 -0700956 $$(run_test_options)
Nicolas Geoffrayc8f23fc2014-10-28 17:59:47 +0000957 ifneq ($(ART_TEST_ANDROID_ROOT),)
958 run_test_options := --android-root $(ART_TEST_ANDROID_ROOT) $$(run_test_options)
959 endif
Alex Light91de25f2015-10-28 17:00:06 -0700960 ifeq ($(ART_TEST_QUIET),true)
961 run_test_options += --quiet
962 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700963$$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options)
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100964$$(run_test_rule_name): PRIVATE_JACK_CLASSPATH := $$(jack_classpath)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700965.PHONY: $$(run_test_rule_name)
Yohann Roussel05b91252015-12-09 12:02:46 +0100966$$(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 -0700967 $(hide) $$(call ART_TEST_SKIP,$$@) && \
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100968 DX=$(abspath $(DX)) \
969 JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
Andreas Gampe8fda9f22014-10-03 16:15:37 -0700970 SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
971 DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
Yohann Rousselcc6bb932016-01-19 23:29:29 +0100972 JACK_VERSION=$(JACK_DEFAULT_VERSION) \
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100973 JACK=$(abspath $(JACK)) \
Yohann Rousselaaa779a2016-01-19 17:07:18 +0100974 JACK_VERSION=$(JACK_DEFAULT_VERSION) \
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100975 JACK_CLASSPATH=$$(PRIVATE_JACK_CLASSPATH) \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000976 art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(12) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700977 && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
978 $$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \
979 echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \
980 rm -r $(ART_HOST_TEST_DIR)) || true
981
Ian Rogersf5c44b32014-08-19 16:52:36 -0700982 $$(foreach test_group,$$(test_groups), $$(eval $$(value test_group) += $$(run_test_rule_name)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700983
984 # Clear locally defined variables.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700985 uc_host_or_target :=
986 test_groups :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700987 run_test_options :=
988 run_test_rule_name :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700989 prereq_rule :=
Sebastien Hertz19ac0272015-02-24 17:39:50 +0100990 jack_classpath :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700991endef # define-test-art-run-test
992
Ian Rogersf5c44b32014-08-19 16:52:36 -0700993$(foreach target, $(TARGET_TYPES), \
994 $(foreach test, $(TEST_ART_RUN_TESTS), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100995 $(foreach run_type, $(RUN_TYPES), \
996 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \
997 $(foreach prebuild, $(PREBUILD_TYPES), \
998 $(foreach compiler, $(COMPILER_TYPES), \
999 $(foreach relocate, $(RELOCATE_TYPES), \
1000 $(foreach trace, $(TRACE_TYPES), \
1001 $(foreach gc, $(GC_TYPES), \
1002 $(foreach jni, $(JNI_TYPES), \
1003 $(foreach image, $(IMAGE_TYPES), \
Andreas Gampec23c9c92014-10-28 14:47:25 -07001004 $(foreach pictest, $(PICTEST_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +00001005 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
1006 $(eval $(call define-test-art-run-test,$(target),$(run_type),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(pictest),$(debuggable),$(test),$(address_size))) \
1007 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -07001008define-test-art-run-test :=
Ian Rogersf5c44b32014-08-19 16:52:36 -07001009
Ian Rogersafd9acc2014-06-17 08:21:54 -07001010# Define a phony rule whose purpose is to test its prerequisites.
Ian Rogersf5c44b32014-08-19 16:52:36 -07001011# $(1): host or target
Ian Rogersafd9acc2014-06-17 08:21:54 -07001012# $(2): list of prerequisites
Ian Rogersf5c44b32014-08-19 16:52:36 -07001013define define-test-art-run-test-group
Ian Rogersafd9acc2014-06-17 08:21:54 -07001014.PHONY: $(1)
1015$(1): $(2)
1016 $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
1017
Ian Rogersafd9acc2014-06-17 08:21:54 -07001018endef # define-test-art-run-test-group
1019
Ian Rogersafd9acc2014-06-17 08:21:54 -07001020
Ian Rogersf5c44b32014-08-19 16:52:36 -07001021$(foreach target, $(TARGET_TYPES), $(eval \
1022 $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES))))
1023$(foreach target, $(TARGET_TYPES), \
1024 $(foreach prebuild, $(PREBUILD_TYPES), $(eval \
1025 $(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)))))
1026$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +01001027 $(foreach run-type, $(RUN_TYPES), $(eval \
1028 $(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)))))
1029$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -07001030 $(foreach compiler, $(COMPILER_TYPES), $(eval \
1031 $(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)))))
1032$(foreach target, $(TARGET_TYPES), \
1033 $(foreach relocate, $(RELOCATE_TYPES), $(eval \
1034 $(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)))))
1035$(foreach target, $(TARGET_TYPES), \
1036 $(foreach trace, $(TRACE_TYPES), $(eval \
1037 $(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)))))
1038$(foreach target, $(TARGET_TYPES), \
1039 $(foreach gc, $(GC_TYPES), $(eval \
1040 $(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)))))
1041$(foreach target, $(TARGET_TYPES), \
1042 $(foreach jni, $(JNI_TYPES), $(eval \
1043 $(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)))))
1044$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +00001045 $(foreach debuggable, $(DEBUGGABLE_TYPES), $(eval \
1046 $(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)))))
1047$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -07001048 $(foreach image, $(IMAGE_TYPES), $(eval \
1049 $(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)))))
1050$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -07001051 $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \
1052 $(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)))))
1053$(foreach target, $(TARGET_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -07001054 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \
Ian Rogersa3cf6ce2014-10-02 16:35:52 -07001055 $(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 -07001056
Ian Rogersf5c44b32014-08-19 16:52:36 -07001057# Clear variables now we're finished with them.
1058$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
1059$(foreach target, $(TARGET_TYPES), \
1060 $(foreach prebuild, $(PREBUILD_TYPES), \
1061 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
1062$(foreach target, $(TARGET_TYPES), \
1063 $(foreach compiler, $(COMPILER_TYPES), \
1064 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
1065$(foreach target, $(TARGET_TYPES), \
1066 $(foreach relocate, $(RELOCATE_TYPES), \
1067 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
1068$(foreach target, $(TARGET_TYPES), \
1069 $(foreach trace, $(TRACE_TYPES), \
1070 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
1071$(foreach target, $(TARGET_TYPES), \
1072 $(foreach gc, $(GC_TYPES), \
1073 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
1074$(foreach target, $(TARGET_TYPES), \
1075 $(foreach jni, $(JNI_TYPES), \
1076 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
1077$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +00001078 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
1079 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable))_RULES :=)))
1080$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -07001081 $(foreach image, $(IMAGE_TYPES), \
1082 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
1083$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -07001084 $(foreach test, $(TEST_ART_RUN_TESTS), \
1085 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
1086$(foreach target, $(TARGET_TYPES), \
1087 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
1088 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +01001089$(foreach target, $(TARGET_TYPES), \
1090 $(foreach run_type, $(RUN_TYPES), \
1091 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -07001092define-test-art-run-test-group :=
Ian Rogersf5c44b32014-08-19 16:52:36 -07001093TARGET_TYPES :=
1094PREBUILD_TYPES :=
1095COMPILER_TYPES :=
1096RELOCATE_TYPES :=
1097TRACE_TYPES :=
1098GC_TYPES :=
1099JNI_TYPES :=
Alex Light03a112d2014-08-25 13:25:56 -07001100IMAGE_TYPES :=
Ian Rogers86df3ac2014-08-27 10:54:11 -07001101ADDRESS_SIZES_TARGET :=
1102ADDRESS_SIZES_HOST :=
Ian Rogersf5c44b32014-08-19 16:52:36 -07001103ALL_ADDRESS_SIZES :=
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +01001104RUN_TYPES :=
Nicolas Geoffray43c162f2015-03-09 12:21:26 +00001105DEBUGGABLE_TYPES :=
Ian Rogers9fcaa4b2014-08-26 19:59:52 -07001106
Alex Light7233c7e2016-07-28 10:07:45 -07001107MY_LOCAL_PATH := $(LOCAL_PATH)
1108include $(MY_LOCAL_PATH)/Android.libartagent.mk
1109include $(MY_LOCAL_PATH)/Android.libarttest.mk
1110include $(MY_LOCAL_PATH)/Android.libnativebridgetest.mk
1111MY_LOCAL_PATH :=
1112LOCAL_PATH :=