blob: 8c62ed75233fefe22671d1aa74688aa3877284c9 [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
Andreas Gampeb91205e2015-06-22 22:53:45 -0700104ifeq ($(ART_TEST_TRACE_STREAM),true)
105 TRACE_TYPES += stream
106endif
Ian Rogers86df3ac2014-08-27 10:54:11 -0700107GC_TYPES := cms
Alex Light992f1e72014-08-27 16:08:57 -0700108ifeq ($(ART_TEST_GC_STRESS),true)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700109 GC_TYPES += gcstress
110endif
Alex Light992f1e72014-08-27 16:08:57 -0700111ifeq ($(ART_TEST_GC_VERIFY),true)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700112 GC_TYPES += gcverify
113endif
114JNI_TYPES := checkjni
115ifeq ($(ART_TEST_JNI_FORCECOPY),true)
116 JNI_TYPES += forcecopy
117endif
118IMAGE_TYPES := image
119ifeq ($(ART_TEST_RUN_TEST_NO_IMAGE),true)
120 IMAGE_TYPES += no-image
121endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700122ifeq ($(ART_TEST_PIC_IMAGE),true)
123 IMAGE_TYPES += picimage
124endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700125PICTEST_TYPES := npictest
Andreas Gampec23c9c92014-10-28 14:47:25 -0700126ifeq ($(ART_TEST_PIC_TEST),true)
127 PICTEST_TYPES += pictest
128endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100129RUN_TYPES :=
130ifeq ($(ART_TEST_RUN_TEST_DEBUG),true)
131 RUN_TYPES += debug
132endif
133ifeq ($(ART_TEST_RUN_TEST_NDEBUG),true)
134 RUN_TYPES += ndebug
135endif
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700136DEBUGGABLE_TYPES := ndebuggable
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000137ifeq ($(ART_TEST_RUN_TEST_DEBUGGABLE),true)
138DEBUGGABLE_TYPES += debuggable
139endif
Nicolas Geoffray41bb3312014-10-24 13:49:08 +0100140ADDRESS_SIZES_TARGET := $(ART_PHONY_TEST_TARGET_SUFFIX)
141ADDRESS_SIZES_HOST := $(ART_PHONY_TEST_HOST_SUFFIX)
142ifeq ($(ART_TEST_RUN_TEST_2ND_ARCH),true)
143 ADDRESS_SIZES_TARGET += $(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
144 ADDRESS_SIZES_HOST += $(2ND_ART_PHONY_TEST_HOST_SUFFIX)
145endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700146ALL_ADDRESS_SIZES := 64 32
Ian Rogers86df3ac2014-08-27 10:54:11 -0700147
Ian Rogersf5c44b32014-08-19 16:52:36 -0700148# List all run test names with number arguments agreeing with the comment above.
149define all-run-test-names
150 $(foreach target, $(1), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100151 $(foreach run-type, $(2), \
152 $(foreach prebuild, $(3), \
153 $(foreach compiler, $(4), \
154 $(foreach relocate, $(5), \
155 $(foreach trace, $(6), \
156 $(foreach gc, $(7), \
157 $(foreach jni, $(8), \
158 $(foreach image, $(9), \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700159 $(foreach pictest, $(10), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000160 $(foreach debuggable, $(11), \
161 $(foreach test, $(12), \
162 $(foreach address_size, $(13), \
163 test-art-$(target)-run-test-$(run-type)-$(prebuild)-$(compiler)-$(relocate)-$(trace)-$(gc)-$(jni)-$(image)-$(pictest)-$(debuggable)-$(test)$(address_size) \
164 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700165endef # all-run-test-names
166
167# To generate a full list or tests:
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100168# $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -0700169# $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000170# $(DEBUGGABLE_TYPES) $(TEST_ART_RUN_TESTS), $(ALL_ADDRESS_SIZES)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700171
172# Convert's a rule name to the form used in variables, e.g. no-relocate to NO_RELOCATE
173define name-to-var
174$(shell echo $(1) | tr '[:lower:]' '[:upper:]' | tr '-' '_')
175endef # name-to-var
176
177# Tests that are timing sensitive and flaky on heavily loaded systems.
178TEST_ART_TIMING_SENSITIVE_RUN_TESTS := \
179 053-wait-some \
Mathieu Chartiere4a91bb2015-01-28 13:11:44 -0800180 055-enum-performance \
181 133-static-invoke-super
Ian Rogersf5c44b32014-08-19 16:52:36 -0700182
183 # disable timing sensitive tests on "dist" builds.
184ifdef dist_goal
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100185 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700186 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000187 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_TIMING_SENSITIVE_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700188endif
189
Ian Rogers86df3ac2014-08-27 10:54:11 -0700190TEST_ART_TIMING_SENSITIVE_RUN_TESTS :=
191
Ian Rogers40e19122014-09-02 15:59:28 -0700192# Note 116-nodex2oat is not broken per-se it just doesn't (and isn't meant to) work with --prebuild.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700193TEST_ART_BROKEN_PREBUILD_RUN_TESTS := \
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -0800194 116-nodex2oat \
Jean Christophe Beyler24e04aa2014-09-12 12:03:25 -0700195 118-noimage-dex2oat \
196 134-nodex2oat-nofallback
Ian Rogersf5c44b32014-08-19 16:52:36 -0700197
Ian Rogers40e19122014-09-02 15:59:28 -0700198ifneq (,$(filter prebuild,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100199 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),prebuild, \
Ian Rogers40e19122014-09-02 15:59:28 -0700200 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000201 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_PREBUILD_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700202endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700203
Ian Rogers86df3ac2014-08-27 10:54:11 -0700204TEST_ART_BROKEN_PREBUILD_RUN_TESTS :=
205
Ian Rogersf5c44b32014-08-19 16:52:36 -0700206TEST_ART_BROKEN_NO_PREBUILD_TESTS := \
207 117-nopatchoat
208
Ian Rogers40e19122014-09-02 15:59:28 -0700209ifneq (,$(filter no-prebuild,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100210 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-prebuild, \
Ian Rogers40e19122014-09-02 15:59:28 -0700211 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000212 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_PREBUILD_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700213endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700214
Ian Rogers86df3ac2014-08-27 10:54:11 -0700215TEST_ART_BROKEN_NO_PREBUILD_TESTS :=
216
Ian Rogers40e19122014-09-02 15:59:28 -0700217# Note 117-nopatchoat is not broken per-se it just doesn't work (and isn't meant to) without
218# --prebuild --relocate
219TEST_ART_BROKEN_NO_RELOCATE_TESTS := \
Andreas Gampe3ad5d5e2015-02-03 18:26:55 -0800220 117-nopatchoat \
221 118-noimage-dex2oat \
222 119-noimage-patchoat
Ian Rogers40e19122014-09-02 15:59:28 -0700223
224ifneq (,$(filter no-relocate,$(RELOCATE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100225 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700226 $(COMPILER_TYPES), no-relocate,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000227 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_RELOCATE_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700228endif
229
230TEST_ART_BROKEN_NO_RELOCATE_TESTS :=
231
Ian Rogers40e19122014-09-02 15:59:28 -0700232# Tests that are broken with GC stress.
Mathieu Chartierbdeb9b72015-01-07 17:42:07 -0800233TEST_ART_BROKEN_GCSTRESS_RUN_TESTS :=
Ian Rogers40e19122014-09-02 15:59:28 -0700234
235ifneq (,$(filter gcstress,$(GC_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100236 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700237 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),gcstress,$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000238 $(IMAGE_TYPES), $(PICTEST_TYPES), $(DBEUGGABLE_TYPES), $(TEST_ART_BROKEN_GCSTRESS_RUN_TESTS), $(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700239endif
240
241TEST_ART_BROKEN_GCSTRESS_RUN_TESTS :=
242
Ian Rogersf5c44b32014-08-19 16:52:36 -0700243# 115-native-bridge setup is complicated. Need to implement it correctly for the target.
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100244ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000245 $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), 115-native-bridge, \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700246 $(ALL_ADDRESS_SIZES))
247
Andreas Gampe3a913092015-01-10 00:26:17 -0800248# 130-hprof dumps the heap and runs hprof-conv to check whether the file is somewhat readable. This
249# is only possible on the host.
250# TODO: Turn off all the other combinations, this is more about testing actual ART code. A gtest is
251# very hard to write here, as (for a complete test) JDWP must be set up.
252ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
253 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000254 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),130-hprof,$(ALL_ADDRESS_SIZES))
Andreas Gampe3a913092015-01-10 00:26:17 -0800255
Andreas Gampe94329d32015-04-24 20:22:06 -0700256# 131 is an old test. The functionality has been implemented at an earlier stage and is checked
257# in tests 138.
258ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
259 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
260 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),131-structural-change,$(ALL_ADDRESS_SIZES))
261
Andreas Gampe0fc16a02015-06-03 15:43:16 -0700262# 138-duplicate-classes-check. Turned off temporarily, b/21333911.
263ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
264 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
265 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),138-duplicate-classes-check,$(ALL_ADDRESS_SIZES))
266
Alex Light03a112d2014-08-25 13:25:56 -0700267# All these tests check that we have sane behavior if we don't have a patchoat or dex2oat.
268# Therefore we shouldn't run them in situations where we actually don't have these since they
269# explicitly test for them. These all also assume we have an image.
270TEST_ART_BROKEN_FALLBACK_RUN_TESTS := \
271 116-nodex2oat \
272 117-nopatchoat \
273 118-noimage-dex2oat \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700274 119-noimage-patchoat \
David Srbeckya26cb572015-04-22 18:57:06 -0700275 137-cfi \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700276 138-duplicate-classes-check2
277
278# This test fails without an image.
279TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS := \
David Srbeckya26cb572015-04-22 18:57:06 -0700280 137-cfi \
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700281 138-duplicate-classes-check
Alex Light03a112d2014-08-25 13:25:56 -0700282
Ian Rogers40e19122014-09-02 15:59:28 -0700283ifneq (,$(filter no-dex2oat,$(PREBUILD_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100284 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-dex2oat, \
Ian Rogers40e19122014-09-02 15:59:28 -0700285 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000286 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700287endif
Alex Light03a112d2014-08-25 13:25:56 -0700288
Alex Light03a112d2014-08-25 13:25:56 -0700289
Ian Rogers40e19122014-09-02 15:59:28 -0700290ifneq (,$(filter no-image,$(IMAGE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100291 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Ian Rogers40e19122014-09-02 15:59:28 -0700292 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000293 $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Andreas Gampeb9aec2c2015-04-23 22:23:47 -0700294 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
295 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
296 $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700297endif
298
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700299ifneq (,$(filter relocate-npatchoat,$(RELOCATE_TYPES)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100300 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700301 $(COMPILER_TYPES), relocate-npatchoat,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000302 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Ian Rogers40e19122014-09-02 15:59:28 -0700303endif
Alex Light03a112d2014-08-25 13:25:56 -0700304
Ian Rogers86df3ac2014-08-27 10:54:11 -0700305TEST_ART_BROKEN_FALLBACK_RUN_TESTS :=
306
David Srbeckya26cb572015-04-22 18:57:06 -0700307# 137:
308# This test unrolls and expects managed frames, but tracing means we run the interpreter.
309# 802:
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800310# This test dynamically enables tracing to force a deoptimization. This makes the test meaningless
311# when already tracing, and writes an error message that we do not want to check for.
312TEST_ART_BROKEN_TRACING_RUN_TESTS := \
David Srbeckya26cb572015-04-22 18:57:06 -0700313 137-cfi \
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800314 802-deoptimization
315
Andreas Gampeb91205e2015-06-22 22:53:45 -0700316ifneq (,$(filter trace stream,$(TRACE_TYPES)))
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800317 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Andreas Gampeb91205e2015-06-22 22:53:45 -0700318 $(COMPILER_TYPES),$(RELOCATE_TYPES),trace stream,$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000319 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_TRACING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Andreas Gampe9cb65bc2015-02-18 17:08:27 -0800320endif
321
322TEST_ART_BROKEN_TRACING_RUN_TESTS :=
323
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100324# The following tests use libarttest.so, which is linked against libartd.so, so will
325# not work when libart.so is the one loaded.
326# TODO: Find a way to run these tests in ndebug mode.
327TEST_ART_BROKEN_NDEBUG_TESTS := \
328 004-JniTest \
329 004-ReferenceMap \
330 004-SignalTest \
331 004-StackWalk \
332 004-UnsafeTest \
Nicolas Geoffray64dea7e2014-11-07 14:32:42 +0000333 051-thread \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100334 115-native-bridge \
335 116-nodex2oat \
336 117-nopatchoat \
337 118-noimage-dex2oat \
338 119-noimage-patchoat \
Nicolas Geoffray8c9200a2015-01-15 08:42:47 +0000339 131-structural-change \
David Srbeckya26cb572015-04-22 18:57:06 -0700340 137-cfi \
Andreas Gampe82566092015-05-18 15:52:22 -0700341 139-register-natives \
Nicolas Geoffrayd845fd02015-03-03 12:43:45 +0000342 454-get-vreg \
343 455-set-vreg \
Nicolas Geoffray64d69ab2015-03-10 19:26:24 +0000344 457-regs \
Nicolas Geoffray915b9d02015-03-11 15:11:19 +0000345 461-get-reference-vreg \
Nicolas Geoffrayd8126be2015-03-27 10:22:41 +0000346 466-get-live-vreg \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100347
348ifneq (,$(filter ndebug,$(RUN_TYPES)))
349 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),ndebug,$(PREBUILD_TYPES), \
350 $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000351 $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_NDEBUG_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100352endif
353
354TEST_ART_BROKEN_NDEBUG_TESTS :=
355
David Srbeckya26cb572015-04-22 18:57:06 -0700356# Known broken tests for the interpreter.
357# CFI unwinding expects managed frames.
358TEST_ART_BROKEN_INTERPRETER_RUN_TESTS := \
359 137-cfi
360
361ifneq (,$(filter interpreter,$(COMPILER_TYPES)))
362 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
363 interpreter,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
364 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_INTERPRETER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
365endif
366
367TEST_ART_BROKEN_INTERPRETER_RUN_TESTS :=
368
369# Known broken tests for the JIT.
370# CFI unwinding expects managed frames, and the test does not iterate enough to even compile. JIT
371# also uses Generic JNI instead of the JNI compiler.
372TEST_ART_BROKEN_JIT_RUN_TESTS := \
373 137-cfi
374
375ifneq (,$(filter jit,$(COMPILER_TYPES)))
376 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
377 jit,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
378 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_JIT_RUN_TESTS),$(ALL_ADDRESS_SIZES))
379endif
380
381TEST_ART_BROKEN_JIT_RUN_TESTS :=
382
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100383# Known broken tests for the default compiler (Quick).
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000384TEST_ART_BROKEN_DEFAULT_RUN_TESTS := \
385 457-regs
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100386
387ifneq (,$(filter default,$(COMPILER_TYPES)))
388 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
Nicolas Geoffray83cae422014-10-22 15:08:03 +0100389 default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000390 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_DEFAULT_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraya3d05a42014-10-20 17:41:32 +0100391endif
392
393TEST_ART_BROKEN_DEFAULT_RUN_TESTS :=
394
Roland Levillain232ade02015-04-20 15:14:36 +0100395# Known broken tests for Quick's and Optimizing's ARM back ends.
396TEST_ART_BROKEN_ARM_RUN_TESTS := 477-long-to-float-conversion-precision # b/20413424
397
398ifeq ($(TARGET_ARCH),arm)
399 ifneq (,$(filter 32,$(ALL_ADDRESS_SIZES)))
400 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
401 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
402 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_ARM_RUN_TESTS),32)
403 endif
404endif
405
Roland Levillain0a025d22015-04-23 15:02:51 +0100406ifdef TARGET_2ND_ARCH
407 ifeq ($(TARGET_2ND_ARCH),arm)
408 ifneq (,$(filter 32,$(ALL_ADDRESS_SIZES)))
409 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
410 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
411 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_ARM_RUN_TESTS),32)
412 endif
413 endif
414endif
415
Roland Levillain232ade02015-04-20 15:14:36 +0100416TEST_ART_BROKEN_ARM_RUN_TESTS :=
417
Alexandre Rames5319def2014-10-23 10:03:10 +0100418# Known broken tests for the arm64 optimizing compiler backend.
Serban Constantinescu02d81cc2015-01-05 16:08:49 +0000419TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS :=
Alexandre Rames5319def2014-10-23 10:03:10 +0100420
421ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
422 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
423 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000424 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS),64)
Alexandre Rames5319def2014-10-23 10:03:10 +0100425endif
426
427TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS :=
428
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100429# Known broken tests for the optimizing compiler.
Nicolas Geoffrayaa8dd2f2015-01-23 17:48:28 +0000430TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS :=
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100431
432ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
433 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
434 optimizing,$(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 Geoffray19a19cf2014-10-22 16:07:05 +0100436endif
437
Nicolas Geoffray5d672a62014-12-04 14:39:31 +0000438# If ART_USE_OPTIMIZING_COMPILER is set to true, then the default core.art has been
439# compiled with the optimizing compiler.
440ifeq ($(ART_USE_OPTIMIZING_COMPILER),true)
441 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
442 default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000443 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffray5d672a62014-12-04 14:39:31 +0000444endif
445
Nicolas Geoffray19a19cf2014-10-22 16:07:05 +0100446TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS :=
447
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000448# Tests that should fail when the optimizing compiler compiles them non-debuggable.
449TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS := \
Nicolas Geoffray915b9d02015-03-11 15:11:19 +0000450 454-get-vreg \
451 455-set-vreg \
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000452 457-regs \
453
454ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
455 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
456 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700457 $(IMAGE_TYPES),$(PICTEST_TYPES),ndebuggable,$(TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
Nicolas Geoffraye0fe7ae2015-03-09 10:02:49 +0000458endif
459
460TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS :=
461
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000462# Tests that should fail when the optimizing compiler compiles them debuggable.
463TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS := \
Nicolas Geoffraye50b8d22015-03-13 08:57:42 +0000464
465ifneq (,$(filter optimizing,$(COMPILER_TYPES)))
466 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
467 optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
468 $(IMAGE_TYPES),$(PICTEST_TYPES),debuggable,$(TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
469endif
470
471TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS :=
472
Hiroshi Yamauchi1d858232015-05-05 13:36:39 -0700473# Tests that should fail in the read barrier configuration.
David Srbeckya26cb572015-04-22 18:57:06 -0700474# 098: b/20720510
475# 137: Read barrier forces interpreter. Cannot run this with the interpreter.
Hiroshi Yamauchi1d858232015-05-05 13:36:39 -0700476TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS := \
David Srbeckya26cb572015-04-22 18:57:06 -0700477 098-ddmc \
478 137-cfi \
Hiroshi Yamauchi1d858232015-05-05 13:36:39 -0700479
480ifeq ($(ART_USE_READ_BARRIER),true)
481 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
482 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
483 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
484endif
485
486TEST_ART_BROKEN_READ_BARRIER_RUN_TESTS :=
Alexandre Rames5319def2014-10-23 10:03:10 +0100487
David Srbeckya26cb572015-04-22 18:57:06 -0700488# Tests that should fail in the heap poisoning configuration.
489# 137: Heap poisoning forces interpreter. Cannot run this with the interpreter.
490TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS := \
491 137-cfi
492
493ifeq ($(ART_HEAP_POISONING),true)
494 ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
495 $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
496 $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
497endif
498
499TEST_ART_BROKEN_HEAP_POISONING_RUN_TESTS :=
500
Ian Rogersf5c44b32014-08-19 16:52:36 -0700501# Clear variables ahead of appending to them when defining tests.
502$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
503$(foreach target, $(TARGET_TYPES), \
504 $(foreach prebuild, $(PREBUILD_TYPES), \
505 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
506$(foreach target, $(TARGET_TYPES), \
507 $(foreach compiler, $(COMPILER_TYPES), \
508 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
509$(foreach target, $(TARGET_TYPES), \
510 $(foreach relocate, $(RELOCATE_TYPES), \
511 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
512$(foreach target, $(TARGET_TYPES), \
513 $(foreach trace, $(TRACE_TYPES), \
514 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
515$(foreach target, $(TARGET_TYPES), \
516 $(foreach gc, $(GC_TYPES), \
517 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
518$(foreach target, $(TARGET_TYPES), \
519 $(foreach jni, $(JNI_TYPES), \
520 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
521$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700522 $(foreach image, $(IMAGE_TYPES), \
523 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
524$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700525 $(foreach test, $(TEST_ART_RUN_TESTS), \
526 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
527$(foreach target, $(TARGET_TYPES), \
528 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
529 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100530$(foreach target, $(TARGET_TYPES), \
531 $(foreach run_type, $(RUN_TYPES), \
532 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000533$(foreach target, $(TARGET_TYPES), \
534 $(foreach debuggable_type, $(DEBUGGABLE_TYPES), \
535 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700536
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700537# We need dex2oat and dalvikvm on the target as well as the core images (all images as we sync
538# only once).
539TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_EXECUTABLES) $(TARGET_CORE_IMG_OUTS)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700540
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700541# Also need libarttest.
542TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so
543ifdef TARGET_2ND_ARCH
544TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so
545endif
546
Andreas Gampe855564b2014-07-25 02:32:19 -0700547# Also need libnativebridgetest.
548TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so
549ifdef TARGET_2ND_ARCH
550TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so
551endif
552
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700553# All tests require the host executables. The tests also depend on the core images, but on
554# specific version depending on the compiler.
Ian Rogersafd9acc2014-06-17 08:21:54 -0700555ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \
556 $(ART_HOST_EXECUTABLES) \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700557 $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700558 $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700559 $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700560
561ifneq ($(HOST_PREFER_32_BIT),true)
562ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \
Andreas Gampe1c83cbc2014-07-22 18:52:29 -0700563 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe855564b2014-07-25 02:32:19 -0700564 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700565 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION)
Ian Rogers665de8a2014-06-24 21:34:09 -0700566endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700567
Ian Rogersf5c44b32014-08-19 16:52:36 -0700568# Create a rule to build and run a tests following the form:
Calin Juravle9228b2a2014-10-22 15:54:34 +0100569# test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}-
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700570# {4: interpreter default optimizing jit}-{5: relocate nrelocate relocate-npatchoat}-
571# {6: trace or ntrace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}-
572# {9: no-image image picimage}-{10: pictest npictest}-
573# {11: ndebuggable debuggable}-{12: test name}{13: 32 or 64}
Ian Rogersafd9acc2014-06-17 08:21:54 -0700574define define-test-art-run-test
Nicolas Geoffray611e1db2014-10-09 17:34:45 +0100575 run_test_options :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700576 prereq_rule :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700577 test_groups :=
578 uc_host_or_target :=
Alex Lightbfac14a2014-07-30 09:41:21 -0700579 ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true)
580 run_test_options += --always-clean
581 endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700582 ifeq ($(1),host)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700583 uc_host_or_target := HOST
Ian Rogersf5c44b32014-08-19 16:52:36 -0700584 test_groups := ART_RUN_TEST_HOST_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700585 run_test_options += --host
586 prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES)
587 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700588 ifeq ($(1),target)
Ian Rogersafd9acc2014-06-17 08:21:54 -0700589 uc_host_or_target := TARGET
Ian Rogersf5c44b32014-08-19 16:52:36 -0700590 test_groups := ART_RUN_TEST_TARGET_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700591 prereq_rule := test-art-target-sync
592 else
Ian Rogersf5c44b32014-08-19 16:52:36 -0700593 $$(error found $(1) expected $(TARGET_TYPES))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700594 endif
595 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100596 ifeq ($(2),debug)
597 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUG_RULES
598 else
599 ifeq ($(2),ndebug)
600 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELEASE_RULES
601 run_test_options += -O
602 else
603 $$(error found $(2) expected $(RUN_TYPES))
604 endif
605 endif
606 ifeq ($(3),prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700607 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES
608 run_test_options += --prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700609 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100610 ifeq ($(3),no-prebuild)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700611 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES
612 run_test_options += --no-prebuild
Alex Lighta59dd802014-07-02 16:28:08 -0700613 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100614 ifeq ($(3),no-dex2oat)
Alex Light03a112d2014-08-25 13:25:56 -0700615 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES
616 run_test_options += --no-prebuild --no-dex2oat
617 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100618 $$(error found $(3) expected $(PREBUILD_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700619 endif
Alex Lighta59dd802014-07-02 16:28:08 -0700620 endif
621 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100622 ifeq ($(4),optimizing)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700623 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700624 run_test_options += --optimizing
Ian Rogersafd9acc2014-06-17 08:21:54 -0700625 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100626 ifeq ($(4),interpreter)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700627 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES
Ian Rogersafd9acc2014-06-17 08:21:54 -0700628 run_test_options += --interpreter
629 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100630 ifeq ($(4),default)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700631 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEFAULT_RULES
Nicolas Geoffrayc9338b92014-12-03 13:36:10 +0000632 run_test_options += --quick
Ian Rogersafd9acc2014-06-17 08:21:54 -0700633 else
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800634 ifeq ($(4),jit)
Mathieu Chartier3fc1b122015-02-26 10:58:08 -0800635 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JIT_RULES
Mathieu Chartiere5f13e52015-02-24 09:37:21 -0800636 run_test_options += --jit
637 else
638 $$(error found $(4) expected $(COMPILER_TYPES))
639 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700640 endif
641 endif
642 endif
Andreas Gampe63fc30e2014-10-24 21:58:16 -0700643
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100644 ifeq ($(5),relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700645 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES
646 run_test_options += --relocate
Ian Rogersafd9acc2014-06-17 08:21:54 -0700647 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100648 ifeq ($(5),no-relocate)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700649 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES
650 run_test_options += --no-relocate
651 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700652 ifeq ($(5),relocate-npatchoat)
Alex Light03a112d2014-08-25 13:25:56 -0700653 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES
654 run_test_options += --relocate --no-patchoat
655 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100656 $$(error found $(5) expected $(RELOCATE_TYPES))
Alex Light03a112d2014-08-25 13:25:56 -0700657 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700658 endif
659 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100660 ifeq ($(6),trace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700661 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
Ian Rogers716e4f82014-07-16 11:18:03 -0700662 run_test_options += --trace
Ian Rogers716e4f82014-07-16 11:18:03 -0700663 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700664 ifeq ($(6),ntrace)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700665 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES
Ian Rogers701aa642014-07-18 11:38:13 -0700666 else
Andreas Gampeb91205e2015-06-22 22:53:45 -0700667 ifeq ($(6),stream)
668 # Group streaming under normal tracing rules.
669 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
670 run_test_options += --trace --stream
671 else
672 $$(error found $(6) expected $(TRACE_TYPES))
673 endif
Ian Rogersf5c44b32014-08-19 16:52:36 -0700674 endif
675 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100676 ifeq ($(7),gcverify)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700677 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700678 run_test_options += --gcverify
679 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100680 ifeq ($(7),gcstress)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700681 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700682 run_test_options += --gcstress
683 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100684 ifeq ($(7),cms)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700685 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES
Ian Rogers8a14b752014-07-18 15:06:53 -0700686 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100687 $$(error found $(7) expected $(GC_TYPES))
Ian Rogers701aa642014-07-18 11:38:13 -0700688 endif
Ian Rogers716e4f82014-07-16 11:18:03 -0700689 endif
690 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100691 ifeq ($(8),forcecopy)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700692 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700693 run_test_options += --runtime-option -Xjniopts:forcecopy
694 ifneq ($$(ART_TEST_JNI_FORCECOPY),true)
695 skip_test := true
696 endif
697 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100698 ifeq ($(8),checkjni)
Ian Rogers86df3ac2014-08-27 10:54:11 -0700699 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES
Ian Rogersf5c44b32014-08-19 16:52:36 -0700700 run_test_options += --runtime-option -Xcheck:jni
701 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100702 ifeq ($(8),jni)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700703 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES
704 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100705 $$(error found $(8) expected $(JNI_TYPES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700706 endif
707 endif
708 endif
Mathieu Chartiere2a12c02015-02-27 13:21:15 -0800709 ifeq ($(4),jit)
710 # Use interpreter image for JIT.
711 image_suffix := interpreter
712 else
713 image_suffix := $(4)
714 endif
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100715 ifeq ($(9),no-image)
Alex Light03a112d2014-08-25 13:25:56 -0700716 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES
717 run_test_options += --no-image
Andreas Gampebf03e842014-10-29 20:46:17 -0700718 # Add the core dependency. This is required for pre-building.
719 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000720 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700721 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000722 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampebf03e842014-10-29 20:46:17 -0700723 endif
Alex Light03a112d2014-08-25 13:25:56 -0700724 else
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100725 ifeq ($(9),image)
Alex Light03a112d2014-08-25 13:25:56 -0700726 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
Andreas Gampec23c9c92014-10-28 14:47:25 -0700727 # Add the core dependency.
728 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000729 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700730 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000731 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700732 endif
Alex Light03a112d2014-08-25 13:25:56 -0700733 else
Andreas Gampec23c9c92014-10-28 14:47:25 -0700734 ifeq ($(9),picimage)
735 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
736 run_test_options += --pic-image
737 ifeq ($(1),host)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000738 prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700739 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000740 prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_$(13))
Andreas Gampec23c9c92014-10-28 14:47:25 -0700741 endif
742 else
743 $$(error found $(9) expected $(IMAGE_TYPES))
744 endif
Alex Light03a112d2014-08-25 13:25:56 -0700745 endif
746 endif
Andreas Gampec23c9c92014-10-28 14:47:25 -0700747 ifeq ($(10),pictest)
748 run_test_options += --pic-test
749 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700750 ifeq ($(10),npictest)
Andreas Gampec23c9c92014-10-28 14:47:25 -0700751 # Nothing to be done.
752 else
753 $$(error found $(10) expected $(PICTEST_TYPES))
754 endif
755 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000756 ifeq ($(11),debuggable)
757 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUGGABLE_RULES
758 run_test_options += --debuggable
759 else
Mathieu Chartier1445dd32015-03-20 14:29:51 -0700760 ifeq ($(11),ndebuggable)
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000761 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NONDEBUGGABLE_RULES
762 # Nothing to be done.
763 else
764 $$(error found $(11) expected $(DEBUGGABLE_TYPES))
765 endif
766 endif
767 # $(12) is the test name.
768 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(12))_RULES
769 ifeq ($(13),64)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700770 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES
771 run_test_options += --64
772 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000773 ifeq ($(13),32)
Ian Rogersf5c44b32014-08-19 16:52:36 -0700774 test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES
775 else
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000776 $$(error found $(13) expected $(ALL_ADDRESS_SIZES))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700777 endif
778 endif
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000779 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 -0700780 run_test_options := --output-path $(ART_HOST_TEST_DIR)/run-test-output/$$(run_test_rule_name) \
Ian Rogers5242c0a2014-07-18 11:02:19 -0700781 $$(run_test_options)
Nicolas Geoffrayc8f23fc2014-10-28 17:59:47 +0000782 ifneq ($(ART_TEST_ANDROID_ROOT),)
783 run_test_options := --android-root $(ART_TEST_ANDROID_ROOT) $$(run_test_options)
784 endif
Ian Rogersafd9acc2014-06-17 08:21:54 -0700785$$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options)
786.PHONY: $$(run_test_rule_name)
Andreas Gampe3a913092015-01-10 00:26:17 -0800787$$(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 -0700788 $(hide) $$(call ART_TEST_SKIP,$$@) && \
789 DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
Andreas Gampe8fda9f22014-10-03 16:15:37 -0700790 SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
791 DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000792 art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(12) \
Ian Rogersafd9acc2014-06-17 08:21:54 -0700793 && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
794 $$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \
795 echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \
796 rm -r $(ART_HOST_TEST_DIR)) || true
797
Ian Rogersf5c44b32014-08-19 16:52:36 -0700798 $$(foreach test_group,$$(test_groups), $$(eval $$(value test_group) += $$(run_test_rule_name)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700799
800 # Clear locally defined variables.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700801 uc_host_or_target :=
802 test_groups :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700803 run_test_options :=
804 run_test_rule_name :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700805 prereq_rule :=
Ian Rogersafd9acc2014-06-17 08:21:54 -0700806endef # define-test-art-run-test
807
Ian Rogersf5c44b32014-08-19 16:52:36 -0700808$(foreach target, $(TARGET_TYPES), \
809 $(foreach test, $(TEST_ART_RUN_TESTS), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100810 $(foreach run_type, $(RUN_TYPES), \
811 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \
812 $(foreach prebuild, $(PREBUILD_TYPES), \
813 $(foreach compiler, $(COMPILER_TYPES), \
814 $(foreach relocate, $(RELOCATE_TYPES), \
815 $(foreach trace, $(TRACE_TYPES), \
816 $(foreach gc, $(GC_TYPES), \
817 $(foreach jni, $(JNI_TYPES), \
818 $(foreach image, $(IMAGE_TYPES), \
Andreas Gampec23c9c92014-10-28 14:47:25 -0700819 $(foreach pictest, $(PICTEST_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000820 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
821 $(eval $(call define-test-art-run-test,$(target),$(run_type),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(pictest),$(debuggable),$(test),$(address_size))) \
822 )))))))))))))
Ian Rogersf5c44b32014-08-19 16:52:36 -0700823define-test-art-run-test :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700824
Ian Rogersafd9acc2014-06-17 08:21:54 -0700825# Define a phony rule whose purpose is to test its prerequisites.
Ian Rogersf5c44b32014-08-19 16:52:36 -0700826# $(1): host or target
Ian Rogersafd9acc2014-06-17 08:21:54 -0700827# $(2): list of prerequisites
Ian Rogersf5c44b32014-08-19 16:52:36 -0700828define define-test-art-run-test-group
Ian Rogersafd9acc2014-06-17 08:21:54 -0700829.PHONY: $(1)
830$(1): $(2)
831 $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
832
Ian Rogersafd9acc2014-06-17 08:21:54 -0700833endef # define-test-art-run-test-group
834
Ian Rogersafd9acc2014-06-17 08:21:54 -0700835
Ian Rogersf5c44b32014-08-19 16:52:36 -0700836$(foreach target, $(TARGET_TYPES), $(eval \
837 $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES))))
838$(foreach target, $(TARGET_TYPES), \
839 $(foreach prebuild, $(PREBUILD_TYPES), $(eval \
840 $(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)))))
841$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100842 $(foreach run-type, $(RUN_TYPES), $(eval \
843 $(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)))))
844$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700845 $(foreach compiler, $(COMPILER_TYPES), $(eval \
846 $(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)))))
847$(foreach target, $(TARGET_TYPES), \
848 $(foreach relocate, $(RELOCATE_TYPES), $(eval \
849 $(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)))))
850$(foreach target, $(TARGET_TYPES), \
851 $(foreach trace, $(TRACE_TYPES), $(eval \
852 $(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)))))
853$(foreach target, $(TARGET_TYPES), \
854 $(foreach gc, $(GC_TYPES), $(eval \
855 $(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)))))
856$(foreach target, $(TARGET_TYPES), \
857 $(foreach jni, $(JNI_TYPES), $(eval \
858 $(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)))))
859$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000860 $(foreach debuggable, $(DEBUGGABLE_TYPES), $(eval \
861 $(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)))))
862$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700863 $(foreach image, $(IMAGE_TYPES), $(eval \
864 $(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)))))
865$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700866 $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \
867 $(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)))))
868$(foreach target, $(TARGET_TYPES), \
Ian Rogers86df3ac2014-08-27 10:54:11 -0700869 $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \
Ian Rogersa3cf6ce2014-10-02 16:35:52 -0700870 $(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 -0700871
Ian Rogersf5c44b32014-08-19 16:52:36 -0700872# Clear variables now we're finished with them.
873$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
874$(foreach target, $(TARGET_TYPES), \
875 $(foreach prebuild, $(PREBUILD_TYPES), \
876 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
877$(foreach target, $(TARGET_TYPES), \
878 $(foreach compiler, $(COMPILER_TYPES), \
879 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
880$(foreach target, $(TARGET_TYPES), \
881 $(foreach relocate, $(RELOCATE_TYPES), \
882 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
883$(foreach target, $(TARGET_TYPES), \
884 $(foreach trace, $(TRACE_TYPES), \
885 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
886$(foreach target, $(TARGET_TYPES), \
887 $(foreach gc, $(GC_TYPES), \
888 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
889$(foreach target, $(TARGET_TYPES), \
890 $(foreach jni, $(JNI_TYPES), \
891 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
892$(foreach target, $(TARGET_TYPES), \
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000893 $(foreach debuggable, $(DEBUGGABLE_TYPES), \
894 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable))_RULES :=)))
895$(foreach target, $(TARGET_TYPES), \
Alex Light03a112d2014-08-25 13:25:56 -0700896 $(foreach image, $(IMAGE_TYPES), \
897 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
898$(foreach target, $(TARGET_TYPES), \
Ian Rogersf5c44b32014-08-19 16:52:36 -0700899 $(foreach test, $(TEST_ART_RUN_TESTS), \
900 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
901$(foreach target, $(TARGET_TYPES), \
902 $(foreach address_size, $(ALL_ADDRESS_SIZES), \
903 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100904$(foreach target, $(TARGET_TYPES), \
905 $(foreach run_type, $(RUN_TYPES), \
906 $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
Ian Rogersafd9acc2014-06-17 08:21:54 -0700907define-test-art-run-test-group :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700908TARGET_TYPES :=
909PREBUILD_TYPES :=
910COMPILER_TYPES :=
911RELOCATE_TYPES :=
912TRACE_TYPES :=
913GC_TYPES :=
914JNI_TYPES :=
Alex Light03a112d2014-08-25 13:25:56 -0700915IMAGE_TYPES :=
Ian Rogers86df3ac2014-08-27 10:54:11 -0700916ADDRESS_SIZES_TARGET :=
917ADDRESS_SIZES_HOST :=
Ian Rogersf5c44b32014-08-19 16:52:36 -0700918ALL_ADDRESS_SIZES :=
Nicolas Geoffraybd2c63c2014-10-16 18:04:12 +0100919RUN_TYPES :=
Nicolas Geoffray43c162f2015-03-09 12:21:26 +0000920DEBUGGABLE_TYPES :=
Ian Rogers9fcaa4b2014-08-26 19:59:52 -0700921
922include $(LOCAL_PATH)/Android.libarttest.mk
923include art/test/Android.libnativebridgetest.mk