blob: 8b074ae04fa75bbb855791b54e2dafb6d94c5206 [file] [log] [blame]
Ian Rogersafd9acc2014-06-17 08:21:54 -07001# Copyright (C) 2011 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14#
15
16LOCAL_PATH := $(call my-dir)
17
18include art/build/Android.common_test.mk
19
20# List of all tests of the form 003-omnibus-opcodes.
21TEST_ART_RUN_TESTS := $(wildcard $(LOCAL_PATH)/[0-9]*)
22TEST_ART_RUN_TESTS := $(subst $(LOCAL_PATH)/,, $(TEST_ART_RUN_TESTS))
23
Ian Rogersf5c44b32014-08-19 16:52:36 -070024########################################################################
25# The art-run-tests module, used to build all run-tests into an image.
Alex Light9dcc4572014-08-14 14:16:26 -070026
Ian Rogersafd9acc2014-06-17 08:21:54 -070027# The path where build only targets will be output, e.g.
28# out/target/product/generic_x86_64/obj/PACKAGING/art-run-tests_intermediates/DATA
29art_run_tests_dir := $(call intermediates-dir-for,PACKAGING,art-run-tests)/DATA
30
31# A generated list of prerequisites that call 'run-test --build-only', the actual prerequisite is
32# an empty file touched in the intermediate directory.
33TEST_ART_RUN_TEST_BUILD_RULES :=
34
35# Helper to create individual build targets for tests. Must be called with $(eval).
36# $(1): the test number
37define define-build-art-run-test
38 dmart_target := $(art_run_tests_dir)/art-run-tests/$(1)/touch
Andreas Gampe8fda9f22014-10-03 16:15:37 -070039$$(dmart_target): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin $(HOST_OUT_EXECUTABLES)/smali $(HOST_OUT_EXECUTABLES)/dexmerger
Ian Rogersafd9acc2014-06-17 08:21:54 -070040 $(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@)
41 $(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
Andreas Gampe8fda9f22014-10-03 16:15:37 -070042 SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
43 DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
Ian Rogersafd9acc2014-06-17 08:21:54 -070044 $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1)
45 $(hide) touch $$@
46
47 TEST_ART_RUN_TEST_BUILD_RULES += $$(dmart_target)
48 dmart_target :=
49endef
Ian Rogersbf66bce2014-06-24 23:15:34 -070050$(foreach test, $(TEST_ART_RUN_TESTS), $(eval $(call define-build-art-run-test,$(test))))
Ian Rogersafd9acc2014-06-17 08:21:54 -070051
52include $(CLEAR_VARS)
53LOCAL_MODULE_TAGS := tests
54LOCAL_MODULE := art-run-tests
Ian Rogersabbf2422014-10-15 11:57:01 -070055LOCAL_ADDITIONAL_DEPENDENCIES := $(TEST_ART_RUN_TEST_BUILD_RULES)
Ian Rogersafd9acc2014-06-17 08:21:54 -070056# The build system use this flag to pick up files generated by declare-make-art-run-test.
57LOCAL_PICKUP_FILES := $(art_run_tests_dir)
58
59include $(BUILD_PHONY_PACKAGE)
60
61# Clear temp vars.
Ian Rogersafd9acc2014-06-17 08:21:54 -070062art_run_tests_dir :=
63define-build-art-run-test :=
Ian Rogers8a14b752014-07-18 15:06:53 -070064TEST_ART_RUN_TEST_BUILD_RULES :=
Ian Rogersafd9acc2014-06-17 08:21:54 -070065
66########################################################################
Ian Rogersf5c44b32014-08-19 16:52:36 -070067# General rules to build and run a run-test.
Ian Rogersafd9acc2014-06-17 08:21:54 -070068
Ian Rogersf5c44b32014-08-19 16:52:36 -070069TARGET_TYPES := host target
Nicolas Geoffray41bb3312014-10-24 13:49:08 +010070PREBUILD_TYPES :=
71ifeq ($(ART_TEST_RUN_TEST_PREBUILD),true)
72 PREBUILD_TYPES += prebuild
73endif
Ian Rogers86df3ac2014-08-27 10:54:11 -070074ifeq ($(ART_TEST_RUN_TEST_NO_PREBUILD),true)
75 PREBUILD_TYPES += no-prebuild
76endif
77ifeq ($(ART_TEST_RUN_TEST_NO_DEX2OAT),true)
78 PREBUILD_TYPES += no-dex2oat
79endif
80COMPILER_TYPES :=
81ifeq ($(ART_TEST_DEFAULT_COMPILER),true)
82 COMPILER_TYPES += default
83endif
84ifeq ($(ART_TEST_INTERPRETER),true)
85 COMPILER_TYPES += interpreter
86endif
Mathieu Chartiere5f13e52015-02-24 09:37:21 -080087ifeq ($(ART_TEST_JIT),true)
88 COMPILER_TYPES += jit
89endif
Ian Rogers86df3ac2014-08-27 10:54:11 -070090ifeq ($(ART_TEST_OPTIMIZING),true)
91 COMPILER_TYPES += optimizing
92endif
93RELOCATE_TYPES := relocate
94ifeq ($(ART_TEST_RUN_TEST_NO_RELOCATE),true)
95 RELOCATE_TYPES += no-relocate
96endif
97ifeq ($(ART_TEST_RUN_TEST_RELOCATE_NO_PATCHOAT),true)
Andreas Gampeb9aec2c2015-04-23 22:23:47 -070098 RELOCATE_TYPES += relocate-npatchoat
Ian Rogers86df3ac2014-08-27 10:54:11 -070099endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700100TRACE_TYPES := ntrace
Ian Rogers86df3ac2014-08-27 10:54:11 -0700101ifeq ($(ART_TEST_TRACE),true)
102 TRACE_TYPES += trace
103endif
104GC_TYPES := cms
Alex Light992f1e72014-08-27 16:08:57 -0700105ifeq ($(ART_TEST_GC_STRESS),true)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700106 GC_TYPES += gcstress
107endif
Alex Light992f1e72014-08-27 16:08:57 -0700108ifeq ($(ART_TEST_GC_VERIFY),true)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700109 GC_TYPES += gcverify
110endif
111JNI_TYPES := checkjni
112ifeq ($(ART_TEST_JNI_FORCECOPY),true)
113 JNI_TYPES += forcecopy
114endif
115IMAGE_TYPES := image
116ifeq ($(ART_TEST_RUN_TEST_NO_IMAGE),true)
117 IMAGE_TYPES += no-image
118endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700119ifeq ($(ART_TEST_PIC_IMAGE),true)
120 IMAGE_TYPES += picimage
121endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700122PICTEST_TYPES := npictest
Andreas Gampec23c9c92014-10-28 14:47:25 -0700123ifeq ($(ART_TEST_PIC_TEST),true)
124 PICTEST_TYPES += pictest
125endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100126RUN_TYPES :=
127ifeq ($(ART_TEST_RUN_TEST_DEBUG),true)
128 RUN_TYPES += debug
129endif
130ifeq ($(ART_TEST_RUN_TEST_NDEBUG),true)
131 RUN_TYPES += ndebug
132endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700133DEBUGGABLE_TYPES := ndebuggable
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000134ifeq ($(ART_TEST_RUN_TEST_DEBUGGABLE),true)
135DEBUGGABLE_TYPES += debuggable
136endif
Nicolas Geoffray41bb3312014-10-24 13:49:08 +0100137ADDRESS_SIZES_TARGET := $(ART_PHONY_TEST_TARGET_SUFFIX)
138ADDRESS_SIZES_HOST := $(ART_PHONY_TEST_HOST_SUFFIX)
139ifeq ($(ART_TEST_RUN_TEST_2ND_ARCH),true)
140 ADDRESS_SIZES_TARGET += $(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
141 ADDRESS_SIZES_HOST += $(2ND_ART_PHONY_TEST_HOST_SUFFIX)
142endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700143ALL_ADDRESS_SIZES := 64 32
Ian Rogers86df3ac2014-08-27 10:54:11 -0700144
Ian Rogersf5c44b32014-08-19 16:52:36 -0700145# List all run test names with number arguments agreeing with the comment above.
146define all-run-test-names
147 $(foreach target, $(1), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100148 $(foreach run-type, $(2), \
149 $(foreach prebuild, $(3), \
150 $(foreach compiler, $(4), \
151 $(foreach relocate, $(5), \
152 $(foreach trace, $(6), \
153 $(foreach gc, $(7), \
154 $(foreach jni, $(8), \
155 $(foreach image, $(9), \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700156 $(foreach pictest, $(10), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000157 $(foreach debuggable, $(11), \
158 $(foreach test, $(12), \
159 $(foreach address_size, $(13), \
160 test-art-$(target)-run-test-$(run-type)-$(prebuild)-$(compiler)-$(relocate)-$(trace)-$(gc)-$(jni)-$(image)-$(pictest)-$(debuggable)-$(test)$(address_size) \
161 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700162endef # all-run-test-names
163
164# To generate a full list or tests:
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100165# $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -0700166# $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000167# $(DEBUGGABLE_TYPES) $(TEST_ART_RUN_TESTS), $(ALL_ADDRESS_SIZES)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700168
169# Convert's a rule name to the form used in variables, e.g. no-relocate to NO_RELOCATE
170define name-to-var
171$(shell echo $(1) | tr '[:lower:]' '[:upper:]' | tr '-' '_')
172endef # name-to-var
173
174# Tests that are timing sensitive and flaky on heavily loaded systems.
175TEST_ART_TIMING_SENSITIVE_RUN_TESTS := \
176 053-wait-some \
Mathieu Chartiere4a91bb2015-01-28 13:11:44 -0800177 055-enum-performance \
178 133-static-invoke-super
Ian Rogersf5c44b32014-08-19 16:52:36 -0700179
180 # disable timing sensitive tests on "dist" builds.
181ifdef dist_goal
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100182 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700183 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000184 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_TIMING_SENSITIVE_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700185endif
186
Ian Rogers86df3ac2014-08-27 10:54:11 -0700187TEST_ART_TIMING_SENSITIVE_RUN_TESTS :=
188
Ian Rogers40e19122014-09-02 15:59:28 -0700189# 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 -0700190TEST_ART_BROKEN_PREBUILD_RUN_TESTS := \
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -0800191 116-nodex2oat \
Jean Christophe Beyler24e04aa2014-09-12 12:03:25 -0700192 118-noimage-dex2oat \
193 134-nodex2oat-nofallback
Ian Rogersf5c44b32014-08-19 16:52:36 -0700194
Ian Rogers40e19122014-09-02 15:59:28 -0700195ifneq (,$(filter prebuild,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100196 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),prebuild, \
Ian Rogers40e19122014-09-02 15:59:28 -0700197 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000198 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_PREBUILD_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700199endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700200
Ian Rogers86df3ac2014-08-27 10:54:11 -0700201TEST_ART_BROKEN_PREBUILD_RUN_TESTS :=
202
Ian Rogersf5c44b32014-08-19 16:52:36 -0700203TEST_ART_BROKEN_NO_PREBUILD_TESTS := \
204 117-nopatchoat
205
Ian Rogers40e19122014-09-02 15:59:28 -0700206ifneq (,$(filter no-prebuild,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100207 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-prebuild, \
Ian Rogers40e19122014-09-02 15:59:28 -0700208 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000209 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_PREBUILD_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700210endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700211
Ian Rogers86df3ac2014-08-27 10:54:11 -0700212TEST_ART_BROKEN_NO_PREBUILD_TESTS :=
213
Ian Rogers40e19122014-09-02 15:59:28 -0700214# Note 117-nopatchoat is not broken per-se it just doesn't work (and isn't meant to) without
215# --prebuild --relocate
216TEST_ART_BROKEN_NO_RELOCATE_TESTS := \
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -0800217 117-nopatchoat \
218 118-noimage-dex2oat \
219 119-noimage-patchoat
Ian Rogers40e19122014-09-02 15:59:28 -0700220
221ifneq (,$(filter no-relocate,$(RELOCATE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100222 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700223 $(COMPILER_TYPES), no-relocate,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000224 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_RELOCATE_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700225endif
226
227TEST_ART_BROKEN_NO_RELOCATE_TESTS :=
228
Ian Rogers40e19122014-09-02 15:59:28 -0700229# Tests that are broken with GC stress.
Mathieu Chartierbdeb9b72015-01-07 17:42:07 -0800230TEST_ART_BROKEN_GCSTRESS_RUN_TESTS :=
Ian Rogers40e19122014-09-02 15:59:28 -0700231
232ifneq (,$(filter gcstress,$(GC_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100233 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700234 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),gcstress,$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000235 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DBEUGGABLE_TYPES), $(TEST_ART_BROKEN_GCSTRESS_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700236endif
237
238TEST_ART_BROKEN_GCSTRESS_RUN_TESTS :=
239
Ian Rogersf5c44b32014-08-19 16:52:36 -0700240# 115-native-bridge setup is complicated. Need to implement it correctly for the target.
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100241ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000242 $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), 115-native-bridge, \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700243 $(ALL_ADDRESS_SIZES))
244
Andreas Gampe3a913092015-01-10 00:26:17 -0800245# 130-hprof dumps the heap and runs hprof-conv to check whether the file is somewhat readable. This
246# is only possible on the host.
247# TODO: Turn off all the other combinations, this is more about testing actual ART code. A gtest is
248# very hard to write here, as (for a complete test) JDWP must be set up.
249ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
250 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000251 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),130-hprof,$(ALL_ADDRESS_SIZES))
Andreas Gampe3a913092015-01-10 00:26:17 -0800252
Andreas Gampe94329d32015-04-24 20:22:06 -0700253# 131 is an old test. The functionality has been implemented at an earlier stage and is checked
254# in tests 138.
255ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
256 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
257 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),131-structural-change,$(ALL_ADDRESS_SIZES))
258
Alex Light03a112d2014-08-25 13:25:56 -0700259# All these tests check that we have sane behavior if we don't have a patchoat or dex2oat.
260# Therefore we shouldn't run them in situations where we actually don't have these since they
261# explicitly test for them. These all also assume we have an image.
262TEST_ART_BROKEN_FALLBACK_RUN_TESTS := \
263 116-nodex2oat \
264 117-nopatchoat \
265 118-noimage-dex2oat \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700266 119-noimage-patchoat \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700267 137-cfi \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700268 138-duplicate-classes-check2
269
270# This test fails without an image.
271TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS := \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700272 137-cfi \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700273 138-duplicate-classes-check
Alex Light03a112d2014-08-25 13:25:56 -0700274
Ian Rogers40e19122014-09-02 15:59:28 -0700275ifneq (,$(filter no-dex2oat,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100276 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-dex2oat, \
Ian Rogers40e19122014-09-02 15:59:28 -0700277 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000278 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700279endif
Alex Light03a112d2014-08-25 13:25:56 -0700280
Alex Light03a112d2014-08-25 13:25:56 -0700281
Ian Rogers40e19122014-09-02 15:59:28 -0700282ifneq (,$(filter no-image,$(IMAGE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100283 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700284 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000285 $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700286 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
287 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
288 $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700289endif
290
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700291ifneq (,$(filter relocate-npatchoat,$(RELOCATE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100292 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700293 $(COMPILER_TYPES), relocate-npatchoat,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000294 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700295endif
Alex Light03a112d2014-08-25 13:25:56 -0700296
Ian Rogers86df3ac2014-08-27 10:54:11 -0700297TEST_ART_BROKEN_FALLBACK_RUN_TESTS :=
298
Andreas Gampee1bbed22015-05-20 13:55:00 -0700299# 137:
300# This test unrolls and expects managed frames, but tracing means we run the interpreter.
301# 802:
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800302# This test dynamically enables tracing to force a deoptimization. This makes the test meaningless
303# when already tracing, and writes an error message that we do not want to check for.
304TEST_ART_BROKEN_TRACING_RUN_TESTS := \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700305 137-cfi \
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800306 802-deoptimization
307
308ifneq (,$(filter trace,$(TRACE_TYPES)))
309 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
310 $(COMPILER_TYPES),$(RELOCATE_TYPES),trace,$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000311 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_TRACING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800312endif
313
314TEST_ART_BROKEN_TRACING_RUN_TESTS :=
315
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100316# The following tests use libarttest.so, which is linked against libartd.so, so will
317# not work when libart.so is the one loaded.
318# TODO: Find a way to run these tests in ndebug mode.
319TEST_ART_BROKEN_NDEBUG_TESTS := \
320 004-JniTest \
321 004-ReferenceMap \
322 004-SignalTest \
323 004-StackWalk \
324 004-UnsafeTest \
Nicolas Geoffray64dea7e2014-11-07 14:32:42 +0000325 051-thread \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100326 115-native-bridge \
327 116-nodex2oat \
328 117-nopatchoat \
329 118-noimage-dex2oat \
330 119-noimage-patchoat \
Nicolas Geoffray8c9200a2015-01-15 08:42:47 +0000331 131-structural-change \
Andreas Gampe73810102015-04-22 18:57:06 -0700332 137-cfi \
Andreas Gampee1bbed22015-05-20 13:55:00 -0700333 139-register-natives \
Nicolas Geoffrayd845fd02015-03-03 12:43:45 +0000334 454-get-vreg \
335 455-set-vreg \
Nicolas Geoffray64d69ab2015-03-10 19:26:24 +0000336 457-regs \
Nicolas Geoffray915b9d02015-03-11 15:11:19 +0000337 461-get-reference-vreg \
Nicolas Geoffrayd8126be2015-03-27 10:22:41 +0000338 466-get-live-vreg \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100339
340ifneq (,$(filter ndebug,$(RUN_TYPES)))
341 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),ndebug,$(PREBUILD_TYPES), \
342 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000343 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_NDEBUG_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100344endif
345
346TEST_ART_BROKEN_NDEBUG_TESTS :=
347
Andreas Gampee1bbed22015-05-20 13:55:00 -0700348# Known broken tests for the interpreter.
349# CFI unwinding expects managed frames.
350TEST_ART_BROKEN_INTERPRETER_RUN_TESTS := \
351 137-cfi
352
353ifneq (,$(filter interpreter,$(COMPILER_TYPES)))
354 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
355 interpreter,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
356 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_INTERPRETER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
357endif
358
359TEST_ART_BROKEN_INTERPRETER_RUN_TESTS :=
360
Andreas Gampeaab9f732015-05-20 14:50:06 -0700361# Known broken tests for the JIT.
362# CFI unwinding expects managed frames, and the test does not iterate enough to even compile. JIT
363# also uses Generic JNI instead of the JNI compiler.
364TEST_ART_BROKEN_JIT_RUN_TESTS := \
365 137-cfi
366
367ifneq (,$(filter jit,$(COMPILER_TYPES)))
368 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
369 jit,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
370 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_JIT_RUN_TESTS),$(ALL_ADDRESS_SIZES))
371endif
372
373TEST_ART_BROKEN_JIT_RUN_TESTS :=
374
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100375# Known broken tests for the default compiler (Quick).
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000376TEST_ART_BROKEN_DEFAULT_RUN_TESTS := \
377 457-regs
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100378
379ifneq (,$(filter default,$(COMPILER_TYPES)))
380 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Nicolas Geoffray83cae422014-10-22 15:08:03 +0100381 default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000382 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_DEFAULT_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100383endif
384
385TEST_ART_BROKEN_DEFAULT_RUN_TESTS :=
386
Roland Levillain232ade02015-04-20 15:14:36 +0100387# Known broken tests for Quick's and Optimizing's ARM back ends.
388TEST_ART_BROKEN_ARM_RUN_TESTS := 477-long-to-float-conversion-precision # b/20413424
389
390ifeq ($(TARGET_ARCH),arm)
391 ifneq (,$(filter 32,$(ALL_ADDRESS_SIZES)))
392 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
393 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
394 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_ARM_RUN_TESTS),32)
395 endif
396endif
397
Roland Levillain0a025d22015-04-23 15:02:51 +0100398ifdef TARGET_2ND_ARCH
399 ifeq ($(TARGET_2ND_ARCH),arm)
400 ifneq (,$(filter 32,$(ALL_ADDRESS_SIZES)))
401 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
402 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
403 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_ARM_RUN_TESTS),32)
404 endif
405 endif
406endif
407
Roland Levillain232ade02015-04-20 15:14:36 +0100408TEST_ART_BROKEN_ARM_RUN_TESTS :=
409
Alexandre Rames5319def2014-10-23 10:03:10 +0100410# Known broken tests for the arm64 optimizing compiler backend.
Serban Constantinescu02d81cc2015-01-05 16:08:49 +0000411TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS :=
Alexandre Rames5319def2014-10-23 10:03:10 +0100412
413ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
414 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
415 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000416 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS),64)
Alexandre Rames5319def2014-10-23 10:03:10 +0100417endif
418
419TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS :=
420
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100421# Known broken tests for the optimizing compiler.
Nicolas Geoffrayaa8dd2f2015-01-23 17:48:28 +0000422TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS :=
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100423
424ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
425 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
426 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000427 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100428endif
429
Nicolas Geoffray5d672a62014-12-04 14:39:31 +0000430# If ART_USE_OPTIMIZING_COMPILER is set to true, then the default core.art has been
431# compiled with the optimizing compiler.
432ifeq ($(ART_USE_OPTIMIZING_COMPILER),true)
433 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
434 default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000435 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffray5d672a62014-12-04 14:39:31 +0000436endif
437
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100438TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS :=
439
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000440# Tests that should fail when the optimizing compiler compiles them non-debuggable.
441TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS := \
Nicolas Geoffray915b9d02015-03-11 15:11:19 +0000442 454-get-vreg \
443 455-set-vreg \
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000444 457-regs \
445
446ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
447 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
448 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700449 $(IMAGE_TYPES),$(PICTEST_TYPES),ndebuggable,$(TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000450endif
451
452TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS :=
453
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000454# Tests that should fail when the optimizing compiler compiles them debuggable.
455TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS := \
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000456
457ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
458 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
459 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
460 $(IMAGE_TYPES),$(PICTEST_TYPES),debuggable,$(TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
461endif
462
463TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS :=
464
Hiroshi Yamauchi1d858232015-05-05 13:36:39 -0700465# Tests that should fail in the read barrier configuration.
Andreas Gampee1bbed22015-05-20 13:55:00 -0700466# 137: Read barrier forces interpreter. Cannot run this with the interpreter.
467TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS := \
468 137-cfi
Hiroshi Yamauchi1d858232015-05-05 13:36:39 -0700469
470ifeq ($(ART_USE_READ_BARRIER),true)
471 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
472 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
473 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
474endif
475
476TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS :=
Alexandre Rames5319def2014-10-23 10:03:10 +0100477
Andreas Gampe44372192015-05-21 10:01:42 -0700478# Tests that should fail in the heap poisoning configuration.
479# 137: Heap poisoning forces interpreter. Cannot run this with the interpreter.
480TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS := \
481 137-cfi
482
483ifeq ($(ART_HEAP_POISONING),true)
484 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
485 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
486 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
487endif
488
489TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS :=
490
Andreas Gampe73810102015-04-22 18:57:06 -0700491# Test 137-cfi works in 32-bit only until we enable 64-bit ELF files.
492ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
493 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
494 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),137-cfi,64)
495
Ian Rogersf5c44b32014-08-19 16:52:36 -0700496# Clear variables ahead of appending to them when defining tests.
497$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
498$(foreach target, $(TARGET_TYPES), \
499 $(foreach prebuild, $(PREBUILD_TYPES), \
500 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
501$(foreach target, $(TARGET_TYPES), \
502 $(foreach compiler, $(COMPILER_TYPES), \
503 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
504$(foreach target, $(TARGET_TYPES), \
505 $(foreach relocate, $(RELOCATE_TYPES), \
506 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
507$(foreach target, $(TARGET_TYPES), \
508 $(foreach trace, $(TRACE_TYPES), \
509 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
510$(foreach target, $(TARGET_TYPES), \
511 $(foreach gc, $(GC_TYPES), \
512 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
513$(foreach target, $(TARGET_TYPES), \
514 $(foreach jni, $(JNI_TYPES), \
515 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
516$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700517 $(foreach image, $(IMAGE_TYPES), \
518 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
519$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700520 $(foreach test, $(TEST_ART_RUN_TESTS), \
521 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
522$(foreach target, $(TARGET_TYPES), \
523 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
524 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100525$(foreach target, $(TARGET_TYPES), \
526 $(foreach run_type, $(RUN_TYPES), \
527 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000528$(foreach target, $(TARGET_TYPES), \
529 $(foreach debuggable_type, $(DEBUGGABLE_TYPES), \
530 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700531
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700532# We need dex2oat and dalvikvm on the target as well as the core images (all images as we sync
533# only once).
534TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_EXECUTABLES) $(TARGET_CORE_IMG_OUTS)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700535
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700536# Also need libarttest.
537TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so
538ifdef TARGET_2ND_ARCH
539TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so
540endif
541
Andreas Gampe855564b2014-07-25 02:32:19 -0700542# Also need libnativebridgetest.
543TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so
544ifdef TARGET_2ND_ARCH
545TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so
546endif
547
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700548# All tests require the host executables. The tests also depend on the core images, but on
549# specific version depending on the compiler.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700550ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \
551 $(ART_HOST_EXECUTABLES) \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700552 $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700553 $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700554 $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700555
556ifneq ($(HOST_PREFER_32_BIT),true)
557ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700558 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700559 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700560 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700561endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700562
Ian Rogersf5c44b32014-08-19 16:52:36 -0700563# Create a rule to build and run a tests following the form:
Calin Juravle9228b2a2014-10-22 15:54:34 +0100564# test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}-
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700565# {4: interpreter default optimizing jit}-{5: relocate nrelocate relocate-npatchoat}-
566# {6: trace or ntrace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}-
567# {9: no-image image picimage}-{10: pictest npictest}-
568# {11: ndebuggable debuggable}-{12: test name}{13: 32 or 64}
Ian Rogersafd9acc2014-06-17 08:21:54 -0700569define define-test-art-run-test
Nicolas Geoffray611e1db2014-10-09 17:34:45 +0100570 run_test_options :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700571 prereq_rule :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700572 test_groups :=
573 uc_host_or_target :=
Alex Lightbfac14a2014-07-30 09:41:21 -0700574 ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true)
575 run_test_options += --always-clean
576 endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700577 ifeq ($(1),host)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700578 uc_host_or_target := HOST
Ian Rogersf5c44b32014-08-19 16:52:36 -0700579 test_groups := ART_RUN_TEST_HOST_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700580 run_test_options += --host
581 prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES)
582 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700583 ifeq ($(1),target)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700584 uc_host_or_target := TARGET
Ian Rogersf5c44b32014-08-19 16:52:36 -0700585 test_groups := ART_RUN_TEST_TARGET_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700586 prereq_rule := test-art-target-sync
587 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700588 $$(error found $(1) expected $(TARGET_TYPES))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700589 endif
590 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100591 ifeq ($(2),debug)
592 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUG_RULES
593 else
594 ifeq ($(2),ndebug)
595 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELEASE_RULES
596 run_test_options += -O
597 else
598 $$(error found $(2) expected $(RUN_TYPES))
599 endif
600 endif
601 ifeq ($(3),prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700602 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES
603 run_test_options += --prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700604 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100605 ifeq ($(3),no-prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700606 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES
607 run_test_options += --no-prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700608 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100609 ifeq ($(3),no-dex2oat)
Alex Light03a112d2014-08-25 13:25:56 -0700610 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES
611 run_test_options += --no-prebuild --no-dex2oat
612 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100613 $$(error found $(3) expected $(PREBUILD_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700614 endif
Alex Lighta59dd802014-07-02 16:28:08 -0700615 endif
616 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100617 ifeq ($(4),optimizing)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700618 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700619 run_test_options += --optimizing
Ian Rogersafd9acc2014-06-17 08:21:54 -0700620 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100621 ifeq ($(4),interpreter)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700622 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700623 run_test_options += --interpreter
624 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100625 ifeq ($(4),default)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700626 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEFAULT_RULES
Nicolas Geoffrayc9338b92014-12-03 13:36:10 +0000627 run_test_options += --quick
Ian Rogersafd9acc2014-06-17 08:21:54 -0700628 else
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800629 ifeq ($(4),jit)
Mathieu Chartier3fc1b122015-02-26 10:58:08 -0800630 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JIT_RULES
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800631 run_test_options += --jit
632 else
633 $$(error found $(4) expected $(COMPILER_TYPES))
634 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700635 endif
636 endif
637 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700638
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100639 ifeq ($(5),relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700640 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES
641 run_test_options += --relocate
Ian Rogersafd9acc2014-06-17 08:21:54 -0700642 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100643 ifeq ($(5),no-relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700644 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES
645 run_test_options += --no-relocate
646 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700647 ifeq ($(5),relocate-npatchoat)
Alex Light03a112d2014-08-25 13:25:56 -0700648 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES
649 run_test_options += --relocate --no-patchoat
650 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100651 $$(error found $(5) expected $(RELOCATE_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700652 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700653 endif
654 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100655 ifeq ($(6),trace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700656 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
Ian Rogers716e4f82014-07-16 11:18:03 -0700657 run_test_options += --trace
Ian Rogers716e4f82014-07-16 11:18:03 -0700658 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700659 ifeq ($(6),ntrace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700660 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES
Ian Rogers701aa642014-07-18 11:38:13 -0700661 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100662 $$(error found $(6) expected $(TRACE_TYPES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700663 endif
664 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100665 ifeq ($(7),gcverify)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700666 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700667 run_test_options += --gcverify
668 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100669 ifeq ($(7),gcstress)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700670 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700671 run_test_options += --gcstress
672 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100673 ifeq ($(7),cms)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700674 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES
Ian Rogers8a14b752014-07-18 15:06:53 -0700675 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100676 $$(error found $(7) expected $(GC_TYPES))
Ian Rogers701aa642014-07-18 11:38:13 -0700677 endif
Ian Rogers716e4f82014-07-16 11:18:03 -0700678 endif
679 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100680 ifeq ($(8),forcecopy)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700681 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700682 run_test_options += --runtime-option -Xjniopts:forcecopy
683 ifneq ($$(ART_TEST_JNI_FORCECOPY),true)
684 skip_test := true
685 endif
686 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100687 ifeq ($(8),checkjni)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700688 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700689 run_test_options += --runtime-option -Xcheck:jni
690 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100691 ifeq ($(8),jni)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700692 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES
693 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100694 $$(error found $(8) expected $(JNI_TYPES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700695 endif
696 endif
697 endif
Mathieu Chartiere2a12c02015-02-27 13:21:15 -0800698 ifeq ($(4),jit)
699 # Use interpreter image for JIT.
700 image_suffix := interpreter
701 else
702 image_suffix := $(4)
703 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100704 ifeq ($(9),no-image)
Alex Light03a112d2014-08-25 13:25:56 -0700705 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES
706 run_test_options += --no-image
Andreas Gampebf03e842014-10-29 20:46:17 -0700707 # Add the core dependency. This is required for pre-building.
708 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000709 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700710 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000711 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700712 endif
Alex Light03a112d2014-08-25 13:25:56 -0700713 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100714 ifeq ($(9),image)
Alex Light03a112d2014-08-25 13:25:56 -0700715 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
Andreas Gampec23c9c92014-10-28 14:47:25 -0700716 # Add the core dependency.
717 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000718 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700719 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000720 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700721 endif
Alex Light03a112d2014-08-25 13:25:56 -0700722 else
Andreas Gampec23c9c92014-10-28 14:47:25 -0700723 ifeq ($(9),picimage)
724 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
725 run_test_options += --pic-image
726 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000727 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700728 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000729 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700730 endif
731 else
732 $$(error found $(9) expected $(IMAGE_TYPES))
733 endif
Alex Light03a112d2014-08-25 13:25:56 -0700734 endif
735 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700736 ifeq ($(10),pictest)
737 run_test_options += --pic-test
738 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700739 ifeq ($(10),npictest)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700740 # Nothing to be done.
741 else
742 $$(error found $(10) expected $(PICTEST_TYPES))
743 endif
744 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000745 ifeq ($(11),debuggable)
746 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUGGABLE_RULES
747 run_test_options += --debuggable
748 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700749 ifeq ($(11),ndebuggable)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000750 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NONDEBUGGABLE_RULES
751 # Nothing to be done.
752 else
753 $$(error found $(11) expected $(DEBUGGABLE_TYPES))
754 endif
755 endif
756 # $(12) is the test name.
757 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(12))_RULES
758 ifeq ($(13),64)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700759 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES
760 run_test_options += --64
761 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000762 ifeq ($(13),32)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700763 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES
764 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000765 $$(error found $(13) expected $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700766 endif
767 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000768 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 -0700769 run_test_options := --output-path $(ART_HOST_TEST_DIR)/run-test-output/$$(run_test_rule_name) \
Ian Rogers5242c0a2014-07-18 11:02:19 -0700770 $$(run_test_options)
Nicolas Geoffrayc8f23fc2014-10-28 17:59:47 +0000771 ifneq ($(ART_TEST_ANDROID_ROOT),)
772 run_test_options := --android-root $(ART_TEST_ANDROID_ROOT) $$(run_test_options)
773 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700774$$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options)
775.PHONY: $$(run_test_rule_name)
Andreas Gampe3a913092015-01-10 00:26:17 -0800776$$(run_test_rule_name): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin $(HOST_OUT_EXECUTABLES)/smali $(HOST_OUT_EXECUTABLES)/dexmerger $(HOST_OUT_EXECUTABLES)/hprof-conv $$(prereq_rule)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700777 $(hide) $$(call ART_TEST_SKIP,$$@) && \
778 DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
Andreas Gampe8fda9f22014-10-03 16:15:37 -0700779 SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
780 DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000781 art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(12) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700782 && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
783 $$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \
784 echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \
785 rm -r $(ART_HOST_TEST_DIR)) || true
786
Ian Rogersf5c44b32014-08-19 16:52:36 -0700787 $$(foreach test_group,$$(test_groups), $$(eval $$(value test_group) += $$(run_test_rule_name)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700788
789 # Clear locally defined variables.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700790 uc_host_or_target :=
791 test_groups :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700792 run_test_options :=
793 run_test_rule_name :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700794 prereq_rule :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700795endef # define-test-art-run-test
796
Ian Rogersf5c44b32014-08-19 16:52:36 -0700797$(foreach target, $(TARGET_TYPES), \
798 $(foreach test, $(TEST_ART_RUN_TESTS), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100799 $(foreach run_type, $(RUN_TYPES), \
800 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \
801 $(foreach prebuild, $(PREBUILD_TYPES), \
802 $(foreach compiler, $(COMPILER_TYPES), \
803 $(foreach relocate, $(RELOCATE_TYPES), \
804 $(foreach trace, $(TRACE_TYPES), \
805 $(foreach gc, $(GC_TYPES), \
806 $(foreach jni, $(JNI_TYPES), \
807 $(foreach image, $(IMAGE_TYPES), \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700808 $(foreach pictest, $(PICTEST_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000809 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
810 $(eval $(call define-test-art-run-test,$(target),$(run_type),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(pictest),$(debuggable),$(test),$(address_size))) \
811 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700812define-test-art-run-test :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700813
Ian Rogersafd9acc2014-06-17 08:21:54 -0700814# Define a phony rule whose purpose is to test its prerequisites.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700815# $(1): host or target
Ian Rogersafd9acc2014-06-17 08:21:54 -0700816# $(2): list of prerequisites
Ian Rogersf5c44b32014-08-19 16:52:36 -0700817define define-test-art-run-test-group
Ian Rogersafd9acc2014-06-17 08:21:54 -0700818.PHONY: $(1)
819$(1): $(2)
820 $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
821
Ian Rogersafd9acc2014-06-17 08:21:54 -0700822endef # define-test-art-run-test-group
823
Ian Rogersafd9acc2014-06-17 08:21:54 -0700824
Ian Rogersf5c44b32014-08-19 16:52:36 -0700825$(foreach target, $(TARGET_TYPES), $(eval \
826 $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES))))
827$(foreach target, $(TARGET_TYPES), \
828 $(foreach prebuild, $(PREBUILD_TYPES), $(eval \
829 $(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)))))
830$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100831 $(foreach run-type, $(RUN_TYPES), $(eval \
832 $(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)))))
833$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700834 $(foreach compiler, $(COMPILER_TYPES), $(eval \
835 $(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)))))
836$(foreach target, $(TARGET_TYPES), \
837 $(foreach relocate, $(RELOCATE_TYPES), $(eval \
838 $(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)))))
839$(foreach target, $(TARGET_TYPES), \
840 $(foreach trace, $(TRACE_TYPES), $(eval \
841 $(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)))))
842$(foreach target, $(TARGET_TYPES), \
843 $(foreach gc, $(GC_TYPES), $(eval \
844 $(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)))))
845$(foreach target, $(TARGET_TYPES), \
846 $(foreach jni, $(JNI_TYPES), $(eval \
847 $(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)))))
848$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000849 $(foreach debuggable, $(DEBUGGABLE_TYPES), $(eval \
850 $(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)))))
851$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700852 $(foreach image, $(IMAGE_TYPES), $(eval \
853 $(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)))))
854$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700855 $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \
856 $(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)))))
857$(foreach target, $(TARGET_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -0700858 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \
Ian Rogersa3cf6ce2014-10-02 16:35:52 -0700859 $(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 -0700860
Ian Rogersf5c44b32014-08-19 16:52:36 -0700861# Clear variables now we're finished with them.
862$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
863$(foreach target, $(TARGET_TYPES), \
864 $(foreach prebuild, $(PREBUILD_TYPES), \
865 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
866$(foreach target, $(TARGET_TYPES), \
867 $(foreach compiler, $(COMPILER_TYPES), \
868 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
869$(foreach target, $(TARGET_TYPES), \
870 $(foreach relocate, $(RELOCATE_TYPES), \
871 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
872$(foreach target, $(TARGET_TYPES), \
873 $(foreach trace, $(TRACE_TYPES), \
874 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
875$(foreach target, $(TARGET_TYPES), \
876 $(foreach gc, $(GC_TYPES), \
877 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
878$(foreach target, $(TARGET_TYPES), \
879 $(foreach jni, $(JNI_TYPES), \
880 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
881$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000882 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
883 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable))_RULES :=)))
884$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700885 $(foreach image, $(IMAGE_TYPES), \
886 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
887$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700888 $(foreach test, $(TEST_ART_RUN_TESTS), \
889 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
890$(foreach target, $(TARGET_TYPES), \
891 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
892 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100893$(foreach target, $(TARGET_TYPES), \
894 $(foreach run_type, $(RUN_TYPES), \
895 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700896define-test-art-run-test-group :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700897TARGET_TYPES :=
898PREBUILD_TYPES :=
899COMPILER_TYPES :=
900RELOCATE_TYPES :=
901TRACE_TYPES :=
902GC_TYPES :=
903JNI_TYPES :=
Alex Light03a112d2014-08-25 13:25:56 -0700904IMAGE_TYPES :=
Ian Rogers86df3ac2014-08-27 10:54:11 -0700905ADDRESS_SIZES_TARGET :=
906ADDRESS_SIZES_HOST :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700907ALL_ADDRESS_SIZES :=
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100908RUN_TYPES :=
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000909DEBUGGABLE_TYPES :=
Ian Rogers9fcaa4b2014-08-26 19:59:52 -0700910
911include $(LOCAL_PATH)/Android.libarttest.mk
912include art/test/Android.libnativebridgetest.mk