Android.run-test.mk revision 8522758c5ef6050e355613630ff81c2b49373b44
1# 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
24########################################################################
25# The art-run-tests module, used to build all run-tests into an image.
26
27# 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_build_dir := $(call intermediates-dir-for,JAVA_LIBRARIES,art-run-tests)/DATA
30art_run_tests_install_dir := $(call intermediates-dir-for,PACKAGING,art-run-tests)/DATA
31
32# A generated list of prerequisites that call 'run-test --build-only', the actual prerequisite is
33# an empty file touched in the intermediate directory.
34TEST_ART_RUN_TEST_BUILD_RULES :=
35
36# Dependencies for actually running a run-test.
37TEST_ART_RUN_TEST_DEPENDENCIES := \
38  $(DX) \
39  $(HOST_OUT_EXECUTABLES)/jasmin \
40  $(HOST_OUT_EXECUTABLES)/smali \
41  $(HOST_OUT_EXECUTABLES)/dexmerger \
42  $(JACK)
43
44TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES := setup-jack-server
45
46ifeq ($(ART_TEST_DEBUG_GC),true)
47  ART_TEST_WITH_STRACE := true
48endif
49
50# Helper to create individual build targets for tests. Must be called with $(eval).
51# $(1): the test number
52define define-build-art-run-test
53  dmart_target := $(art_run_tests_build_dir)/art-run-tests/$(1)/touch
54  dmart_install_target := $(art_run_tests_install_dir)/art-run-tests/$(1)/touch
55  run_test_options = --build-only
56  ifeq ($(ART_TEST_QUIET),true)
57    run_test_options += --quiet
58  endif
59$$(dmart_target): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options)
60$$(dmart_target): $(TEST_ART_RUN_TEST_DEPENDENCIES) $(TARGET_JACK_CLASSPATH_DEPENDENCIES) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
61	$(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@)
62	$(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
63	  SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
64	  DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
65	  JACK_VERSION=$(JACK_DEFAULT_VERSION) \
66	  JACK=$(abspath $(JACK)) \
67	  JACK_VERSION=$(JACK_DEFAULT_VERSION) \
68	  JACK_CLASSPATH=$(TARGET_JACK_CLASSPATH) \
69	  $(LOCAL_PATH)/run-test $$(PRIVATE_RUN_TEST_OPTIONS) --output-path $$(abspath $$(dir $$@)) $(1)
70	$(hide) touch $$@
71
72$$(dmart_install_target): $$(dmart_target)
73	$(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@)
74	$(hide) cp $$(dir $$<)/* $$(dir $$@)/
75
76  TEST_ART_RUN_TEST_BUILD_RULES += $$(dmart_install_target)
77  dmart_target :=
78  dmart_install_target :=
79  run_test_options :=
80endef
81$(foreach test, $(TEST_ART_RUN_TESTS), $(eval $(call define-build-art-run-test,$(test))))
82
83include $(CLEAR_VARS)
84LOCAL_MODULE_TAGS := tests
85LOCAL_MODULE := art-run-tests
86LOCAL_ADDITIONAL_DEPENDENCIES := $(TEST_ART_RUN_TEST_BUILD_RULES)
87# The build system use this flag to pick up files generated by declare-make-art-run-test.
88LOCAL_PICKUP_FILES := $(art_run_tests_install_dir)
89
90include $(BUILD_PHONY_PACKAGE)
91
92# Clear temp vars.
93art_run_tests_build_dir :=
94art_run_tests_install_dir :=
95define-build-art-run-test :=
96TEST_ART_RUN_TEST_BUILD_RULES :=
97
98########################################################################
99# General rules to build and run a run-test.
100
101TARGET_TYPES := host target
102PREBUILD_TYPES :=
103ifeq ($(ART_TEST_RUN_TEST_PREBUILD),true)
104  PREBUILD_TYPES += prebuild
105endif
106ifeq ($(ART_TEST_RUN_TEST_NO_PREBUILD),true)
107  PREBUILD_TYPES += no-prebuild
108endif
109ifeq ($(ART_TEST_RUN_TEST_NO_DEX2OAT),true)
110  PREBUILD_TYPES += no-dex2oat
111endif
112COMPILER_TYPES :=
113ifeq ($(ART_TEST_INTERPRETER_ACCESS_CHECKS),true)
114  COMPILER_TYPES += interp-ac
115endif
116ifeq ($(ART_TEST_INTERPRETER),true)
117  COMPILER_TYPES += interpreter
118endif
119ifeq ($(ART_TEST_JIT),true)
120  COMPILER_TYPES += jit
121endif
122OPTIMIZING_COMPILER_TYPES :=
123ifeq ($(ART_TEST_OPTIMIZING),true)
124  COMPILER_TYPES += optimizing
125  OPTIMIZING_COMPILER_TYPES += optimizing
126endif
127ifeq ($(ART_TEST_OPTIMIZING_GRAPH_COLOR),true)
128  COMPILER_TYPES += regalloc_gc
129  OPTIMIZING_COMPILER_TYPES += regalloc_gc
130endif
131RELOCATE_TYPES := relocate
132ifeq ($(ART_TEST_RUN_TEST_NO_RELOCATE),true)
133  RELOCATE_TYPES += no-relocate
134endif
135ifeq ($(ART_TEST_RUN_TEST_RELOCATE_NO_PATCHOAT),true)
136  RELOCATE_TYPES += relocate-npatchoat
137endif
138TRACE_TYPES := ntrace
139ifeq ($(ART_TEST_TRACE),true)
140  TRACE_TYPES += trace
141endif
142ifeq ($(ART_TEST_TRACE_STREAM),true)
143  TRACE_TYPES += stream
144endif
145GC_TYPES := cms
146ifeq ($(ART_TEST_GC_STRESS),true)
147  GC_TYPES += gcstress
148endif
149ifeq ($(ART_TEST_GC_VERIFY),true)
150  GC_TYPES += gcverify
151endif
152JNI_TYPES := checkjni
153ifeq ($(ART_TEST_JNI_FORCECOPY),true)
154  JNI_TYPES += forcecopy
155endif
156IMAGE_TYPES := image
157ifeq ($(ART_TEST_RUN_TEST_NO_IMAGE),true)
158  IMAGE_TYPES += no-image
159endif
160ifeq ($(ART_TEST_RUN_TEST_MULTI_IMAGE),true)
161  IMAGE_TYPES := multiimage
162endif
163ifeq ($(ART_TEST_PIC_IMAGE),true)
164  IMAGE_TYPES += picimage
165  ifeq ($(ART_TEST_RUN_TEST_MULTI_IMAGE),true)
166    IMAGE_TYPES := multipicimage
167  endif
168endif
169PICTEST_TYPES := npictest
170ifeq ($(ART_TEST_PIC_TEST),true)
171  PICTEST_TYPES += pictest
172endif
173RUN_TYPES :=
174ifeq ($(ART_TEST_RUN_TEST_DEBUG),true)
175  RUN_TYPES += debug
176endif
177ifeq ($(ART_TEST_RUN_TEST_NDEBUG),true)
178  RUN_TYPES += ndebug
179endif
180DEBUGGABLE_TYPES := ndebuggable
181ifeq ($(ART_TEST_RUN_TEST_DEBUGGABLE),true)
182DEBUGGABLE_TYPES += debuggable
183endif
184ADDRESS_SIZES_TARGET := $(ART_PHONY_TEST_TARGET_SUFFIX)
185ADDRESS_SIZES_HOST := $(ART_PHONY_TEST_HOST_SUFFIX)
186ifeq ($(ART_TEST_RUN_TEST_2ND_ARCH),true)
187  ADDRESS_SIZES_TARGET += $(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
188  ADDRESS_SIZES_HOST += $(2ND_ART_PHONY_TEST_HOST_SUFFIX)
189endif
190ALL_ADDRESS_SIZES := 64 32
191
192# List all run test names with number arguments agreeing with the comment above.
193define all-run-test-names
194  $(foreach target, $(1), \
195    $(foreach run-type, $(2), \
196      $(foreach prebuild, $(3), \
197        $(foreach compiler, $(4), \
198          $(foreach relocate, $(5), \
199            $(foreach trace, $(6), \
200              $(foreach gc, $(7), \
201                $(foreach jni, $(8), \
202                  $(foreach image, $(9), \
203                    $(foreach pictest, $(10), \
204                      $(foreach debuggable, $(11), \
205                        $(foreach test, $(12), \
206                          $(foreach address_size, $(13), \
207                            test-art-$(target)-run-test-$(run-type)-$(prebuild)-$(compiler)-$(relocate)-$(trace)-$(gc)-$(jni)-$(image)-$(pictest)-$(debuggable)-$(test)$(address_size) \
208                    )))))))))))))
209endef  # all-run-test-names
210
211# To generate a full list or tests:
212# $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
213#        $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
214#        $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_RUN_TESTS),$(ALL_ADDRESS_SIZES))
215
216# Convert's a rule name to the form used in variables, e.g. no-relocate to NO_RELOCATE
217define name-to-var
218$(shell echo $(1) | tr '[:lower:]' '[:upper:]' | tr '-' '_')
219endef  # name-to-var
220
221ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
222        $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
223        $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(ART_TEST_RUN_TEST_SKIP), $(ALL_ADDRESS_SIZES))
224
225
226# Disable 149-suspend-all-stress, its output is flaky (b/28988206).
227# Disable 577-profile-foreign-dex (b/27454772).
228# Disable 552-checker-sharpening, until compiler component of new string dex cache is added (@cwadsworth, @vmarko)
229TEST_ART_BROKEN_ALL_TARGET_TESTS := \
230  149-suspend-all-stress \
231  577-profile-foreign-dex \
232  552-checker-sharpening \
233
234ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
235    $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
236    $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_ALL_TARGET_TESTS), \
237    $(ALL_ADDRESS_SIZES))
238
239TEST_ART_BROKEN_ALL_TARGET_TESTS :=
240
241# Tests that are timing sensitive and flaky on heavily loaded systems.
242TEST_ART_TIMING_SENSITIVE_RUN_TESTS := \
243  002-sleep \
244  053-wait-some \
245  055-enum-performance \
246  133-static-invoke-super
247
248# disable timing sensitive tests on "dist" builds.
249ifdef dist_goal
250  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
251        $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
252        $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_TIMING_SENSITIVE_RUN_TESTS), $(ALL_ADDRESS_SIZES))
253endif
254
255# 147-stripped-dex-fallback isn't supported on device because --strip-dex
256# requires the zip command.
257# 569-checker-pattern-replacement tests behaviour present only on host.
258TEST_ART_BROKEN_TARGET_TESTS := \
259  147-stripped-dex-fallback \
260  569-checker-pattern-replacement
261
262ifneq (,$(filter target,$(TARGET_TYPES)))
263  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
264      $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
265      $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_TARGET_TESTS), $(ALL_ADDRESS_SIZES))
266endif
267
268TEST_ART_BROKEN_TARGET_TESTS :=
269
270# Tests that require python3.
271TEST_ART_PYTHON3_DEPENDENCY_RUN_TESTS := \
272  960-default-smali \
273  961-default-iface-resolution-generated \
274  964-default-iface-init-generated \
275  968-default-partial-compile-generated \
276  969-iface-super \
277  970-iface-super-resolution-generated \
278  971-iface-super
279
280# Check if we have python3 to run our tests.
281ifeq ($(wildcard /usr/bin/python3),)
282  $(warning "No python3 found. Disabling tests: $(TEST_ART_PYTHON3_DEPENDENCY_RUN_TESTS)")
283
284  # Currently disable tests requiring python3 when it is not installed.
285  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
286        $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
287        $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_PYTHON3_DEPENDENCY_RUN_TESTS), $(ALL_ADDRESS_SIZES))
288endif
289
290TEST_ART_TIMING_SENSITIVE_RUN_TESTS :=
291
292# Note 116-nodex2oat is not broken per-se it just doesn't (and isn't meant to) work with --prebuild.
293TEST_ART_BROKEN_PREBUILD_RUN_TESTS := \
294  116-nodex2oat \
295  118-noimage-dex2oat \
296  134-nodex2oat-nofallback
297
298ifneq (,$(filter prebuild,$(PREBUILD_TYPES)))
299  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),prebuild, \
300      $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
301      $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_PREBUILD_RUN_TESTS), $(ALL_ADDRESS_SIZES))
302endif
303
304TEST_ART_BROKEN_PREBUILD_RUN_TESTS :=
305
306# 554-jit-profile-file is disabled because it needs a primary oat file to know what it should save.
307# 529 and 555: b/27784033
308TEST_ART_BROKEN_NO_PREBUILD_TESTS := \
309  117-nopatchoat \
310  147-stripped-dex-fallback \
311  554-jit-profile-file \
312  529-checker-unresolved \
313  555-checker-regression-x86const \
314  608-checker-unresolved-lse
315
316ifneq (,$(filter no-prebuild,$(PREBUILD_TYPES)))
317  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-prebuild, \
318      $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
319      $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_PREBUILD_TESTS), $(ALL_ADDRESS_SIZES))
320endif
321
322TEST_ART_BROKEN_NO_PREBUILD_TESTS :=
323
324# Note 117-nopatchoat is not broken per-se it just doesn't work (and isn't meant to) without
325# --prebuild --relocate
326TEST_ART_BROKEN_NO_RELOCATE_TESTS := \
327  117-nopatchoat \
328  118-noimage-dex2oat \
329  119-noimage-patchoat \
330  554-jit-profile-file
331
332ifneq (,$(filter no-relocate,$(RELOCATE_TYPES)))
333  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
334      $(COMPILER_TYPES), no-relocate,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
335      $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_RELOCATE_TESTS), $(ALL_ADDRESS_SIZES))
336endif
337
338TEST_ART_BROKEN_NO_RELOCATE_TESTS :=
339
340# Temporarily disable some broken tests when forcing access checks in interpreter b/22414682
341# 004-JniTest is disabled because @CriticalNative is unsupported by generic JNI b/31400248
342TEST_ART_BROKEN_INTERPRETER_ACCESS_CHECK_TESTS := \
343  004-JniTest \
344  137-cfi
345
346ifneq (,$(filter interp-ac,$(COMPILER_TYPES)))
347  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
348      interp-ac,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
349      $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_INTERPRETER_ACCESS_CHECK_TESTS), $(ALL_ADDRESS_SIZES))
350endif
351
352TEST_ART_BROKEN_INTERPRETER_ACCESS_CHECK_TESTS :=
353
354# Tests that are broken with GC stress.
355# * 137-cfi needs to unwind a second forked process. We're using a primitive sleep to wait till we
356#   hope the second process got into the expected state. The slowness of gcstress makes this bad.
357# * 961-default-iface-resolution-generated and 964-default-iface-init-generated are very long tests
358#   that often will take more than the timeout to run when gcstress is enabled. This is because
359#   gcstress slows down allocations significantly which these tests do a lot.
360TEST_ART_BROKEN_GCSTRESS_RUN_TESTS := \
361  137-cfi \
362  961-default-iface-resolution-generated \
363  964-default-iface-init-generated
364
365ifneq (,$(filter gcstress,$(GC_TYPES)))
366  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
367      $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),gcstress,$(JNI_TYPES), \
368      $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_GCSTRESS_RUN_TESTS), $(ALL_ADDRESS_SIZES))
369endif
370
371TEST_ART_BROKEN_GCSTRESS_RUN_TESTS :=
372
373# 115-native-bridge setup is complicated. Need to implement it correctly for the target.
374ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \
375    $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), 115-native-bridge, \
376    $(ALL_ADDRESS_SIZES))
377
378# 130-hprof dumps the heap and runs hprof-conv to check whether the file is somewhat readable. This
379# is only possible on the host.
380# TODO: Turn off all the other combinations, this is more about testing actual ART code. A gtest is
381#       very hard to write here, as (for a complete test) JDWP must be set up.
382ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
383    $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
384    $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),130-hprof,$(ALL_ADDRESS_SIZES))
385
386# 131 is an old test. The functionality has been implemented at an earlier stage and is checked
387# in tests 138. Blacklisted for debug builds since these builds have duplicate classes checks which
388# punt to interpreter.
389ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),debug,$(PREBUILD_TYPES), \
390    $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
391    $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),131-structural-change,$(ALL_ADDRESS_SIZES))
392
393# 138-duplicate-classes-check. Turned on for debug builds since debug builds have duplicate classes
394# checks enabled, b/2133391.
395ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),ndebug,$(PREBUILD_TYPES), \
396    $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
397    $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),138-duplicate-classes-check,$(ALL_ADDRESS_SIZES))
398
399# All these tests check that we have sane behavior if we don't have a patchoat or dex2oat.
400# Therefore we shouldn't run them in situations where we actually don't have these since they
401# explicitly test for them. These all also assume we have an image.
402# 004-JniTest is disabled because @CriticalNative is unsupported by generic JNI b/31400248
403# 147-stripped-dex-fallback is disabled because it requires --prebuild.
404# 554-jit-profile-file is disabled because it needs a primary oat file to know what it should save.
405TEST_ART_BROKEN_FALLBACK_RUN_TESTS := \
406  004-JniTest \
407  116-nodex2oat \
408  117-nopatchoat \
409  118-noimage-dex2oat \
410  119-noimage-patchoat \
411  137-cfi \
412  138-duplicate-classes-check2 \
413  147-stripped-dex-fallback \
414  554-jit-profile-file
415
416# This test fails without an image.
417TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS := \
418  137-cfi \
419  138-duplicate-classes-check
420
421ifneq (,$(filter no-dex2oat,$(PREBUILD_TYPES)))
422  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-dex2oat, \
423      $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
424      $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
425endif
426
427
428ifneq (,$(filter no-image,$(IMAGE_TYPES)))
429  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
430      $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
431      $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
432  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
433      $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \
434      $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
435endif
436
437ifneq (,$(filter relocate-npatchoat,$(RELOCATE_TYPES)))
438  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
439      $(COMPILER_TYPES), relocate-npatchoat,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
440      $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES))
441endif
442
443TEST_ART_BROKEN_FALLBACK_RUN_TESTS :=
444
445# 137:
446# This test unrolls and expects managed frames, but tracing means we run the interpreter.
447# 802 and 570-checker-osr:
448# This test dynamically enables tracing to force a deoptimization. This makes the test meaningless
449# when already tracing, and writes an error message that we do not want to check for.
450TEST_ART_BROKEN_TRACING_RUN_TESTS := \
451  087-gc-after-link \
452  137-cfi \
453  141-class-unload \
454  570-checker-osr \
455  802-deoptimization
456
457ifneq (,$(filter trace stream,$(TRACE_TYPES)))
458  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
459      $(COMPILER_TYPES),$(RELOCATE_TYPES),trace stream,$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \
460      $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_TRACING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
461endif
462
463# Known broken tests for the interpreter.
464# CFI unwinding expects managed frames.
465TEST_ART_BROKEN_INTERPRETER_RUN_TESTS := \
466  137-cfi \
467  554-jit-profile-file
468
469ifneq (,$(filter interpreter,$(COMPILER_TYPES)))
470  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
471      interpreter,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
472      $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_INTERPRETER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
473endif
474
475TEST_ART_BROKEN_INTERPRETER_RUN_TESTS :=
476
477# Known broken tests for the JIT.
478# CFI unwinding expects managed frames, and the test does not iterate enough to even compile. JIT
479# also uses Generic JNI instead of the JNI compiler.
480# 004-JniTest is disabled because @CriticalNative is unsupported by generic JNI b/31400248
481TEST_ART_BROKEN_JIT_RUN_TESTS := \
482  004-JniTest \
483  137-cfi
484
485ifneq (,$(filter jit,$(COMPILER_TYPES)))
486  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
487      jit,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
488      $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_JIT_RUN_TESTS),$(ALL_ADDRESS_SIZES))
489endif
490
491TEST_ART_BROKEN_JIT_RUN_TESTS :=
492
493# Known broken tests for the graph coloring register allocator.
494# These tests were based on the linear scan allocator, which makes different decisions than
495# the graph coloring allocator. (These attempt to test for code quality, not correctness.)
496TEST_ART_BROKEN_OPTIMIZING_GRAPH_COLOR := \
497  570-checker-select \
498  484-checker-register-hints
499
500ifneq (,$(filter regalloc_gc,$(COMPILER_TYPES)))
501  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
502      regalloc_gc,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
503      $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
504      $(TEST_ART_BROKEN_OPTIMIZING_GRAPH_COLOR),$(ALL_ADDRESS_SIZES))
505endif
506
507# Known broken tests for the mips32 optimizing compiler backend.
508TEST_ART_BROKEN_OPTIMIZING_MIPS_RUN_TESTS := \
509
510ifeq (mips,$(TARGET_ARCH))
511  ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
512    ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
513        $(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
514        $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
515        $(TEST_ART_BROKEN_OPTIMIZING_MIPS_RUN_TESTS),$(ALL_ADDRESS_SIZES))
516  endif
517endif
518
519TEST_ART_BROKEN_OPTIMIZING_MIPS_RUN_TESTS :=
520
521# Known broken tests for the mips64 optimizing compiler backend.
522TEST_ART_BROKEN_OPTIMIZING_MIPS64_RUN_TESTS := \
523
524ifeq (mips64,$(TARGET_ARCH))
525  ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
526    ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \
527        $(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
528        $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
529        $(TEST_ART_BROKEN_OPTIMIZING_MIPS64_RUN_TESTS),$(ALL_ADDRESS_SIZES))
530  endif
531endif
532
533TEST_ART_BROKEN_OPTIMIZING_MIPS64_RUN_TESTS :=
534
535# Tests that should fail when the optimizing compiler compiles them non-debuggable.
536TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS := \
537  454-get-vreg \
538  457-regs \
539
540ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
541  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
542      $(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
543      $(IMAGE_TYPES),$(PICTEST_TYPES),ndebuggable,$(TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
544endif
545
546TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS :=
547
548# Tests that should fail when the optimizing compiler compiles them debuggable.
549TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS := \
550
551ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
552  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
553      $(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
554      $(IMAGE_TYPES),$(PICTEST_TYPES),debuggable,$(TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES))
555endif
556
557TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS :=
558
559# Tests that should fail in the read barrier configuration with the interpreter.
560TEST_ART_BROKEN_INTERPRETER_READ_BARRIER_RUN_TESTS :=
561
562# Tests that should fail in the read barrier configuration with the Optimizing compiler (AOT).
563# 484: Baker's fast path based read barrier compiler instrumentation generates code containing
564#      more parallel moves on x86, thus some Checker assertions may fail.
565# 527: On ARM64 and ARM, the read barrier instrumentation does not support the HIntermediateAddress
566#      instruction yet (b/26601270).
567TEST_ART_BROKEN_OPTIMIZING_READ_BARRIER_RUN_TESTS := \
568  484-checker-register-hints \
569  527-checker-array-access-split
570
571# Tests that should fail in the read barrier configuration with JIT (Optimizing compiler).
572TEST_ART_BROKEN_JIT_READ_BARRIER_RUN_TESTS :=
573
574# Tests failing in non-Baker read barrier configurations with the Optimizing compiler (AOT).
575# 537: Expects an array copy to be intrinsified, but calling-on-slowpath intrinsics are not yet
576#      handled in non-Baker read barrier configurations.
577TEST_ART_BROKEN_OPTIMIZING_NON_BAKER_READ_BARRIER_RUN_TESTS := \
578  537-checker-arraycopy
579
580# Tests failing in non-Baker read barrier configurations with JIT (Optimizing compiler).
581# 537: Expects an array copy to be intrinsified, but calling-on-slowpath intrinsics are not yet
582#      handled in non-Baker read barrier configurations.
583TEST_ART_BROKEN_JIT_NON_BAKER_READ_BARRIER_RUN_TESTS := \
584  537-checker-arraycopy
585
586ifeq ($(ART_USE_READ_BARRIER),true)
587  ifneq (,$(filter interpreter,$(COMPILER_TYPES)))
588    ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
589        $(PREBUILD_TYPES),interpreter,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES), \
590        $(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
591        $(TEST_ART_BROKEN_INTERPRETER_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
592  endif
593
594  ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
595    ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
596        $(PREBUILD_TYPES),$(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES), \
597        $(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
598        $(TEST_ART_BROKEN_OPTIMIZING_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
599    ifneq ($(ART_READ_BARRIER_TYPE),BAKER)
600      ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
601          $(PREBUILD_TYPES),$(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES), \
602          $(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
603          $(TEST_ART_BROKEN_OPTIMIZING_NON_BAKER_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
604    endif
605  endif
606
607  ifneq (,$(filter jit,$(COMPILER_TYPES)))
608    ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
609        $(PREBUILD_TYPES),jit,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES), \
610        $(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
611        $(TEST_ART_BROKEN_JIT_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
612    ifneq ($(ART_READ_BARRIER_TYPE),BAKER)
613      ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
614          $(PREBUILD_TYPES),jit,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES), \
615          $(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
616          $(TEST_ART_BROKEN_JIT_NON_BAKER_READ_BARRIER_RUN_TESTS),$(ALL_ADDRESS_SIZES))
617    endif
618  endif
619endif
620
621TEST_ART_BROKEN_OPTIMIZING_READ_BARRIER_RUN_TESTS :=
622TEST_ART_BROKEN_JIT_READ_BARRIER_RUN_TESTS :=
623
624TEST_ART_BROKEN_NPIC_RUN_TESTS := 596-app-images
625ifneq (,$(filter npictest,$(PICTEST_TYPES)))
626  ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \
627      ${COMPILER_TYPES},$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
628      $(IMAGE_TYPES),npictest,$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_NPIC_RUN_TESTS),$(ALL_ADDRESS_SIZES))
629endif
630
631# Tests that should fail in the heap poisoning configuration with the Optimizing compiler.
632# 055: Exceeds run time limits due to heap poisoning instrumentation (on ARM and ARM64 devices).
633TEST_ART_BROKEN_OPTIMIZING_HEAP_POISONING_RUN_TESTS := \
634  055-enum-performance
635
636ifeq ($(ART_HEAP_POISONING),true)
637  ifneq (,$(filter $(OPTIMIZING_COMPILER_TYPES),$(COMPILER_TYPES)))
638    ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES), \
639        $(PREBUILD_TYPES),$(OPTIMIZING_COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \
640        $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), \
641        $(TEST_ART_BROKEN_OPTIMIZING_HEAP_POISONING_RUN_TESTS),$(ALL_ADDRESS_SIZES))
642  endif
643endif
644
645TEST_ART_BROKEN_OPTIMIZING_HEAP_POISONING_RUN_TESTS :=
646
647# Clear variables ahead of appending to them when defining tests.
648$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
649$(foreach target, $(TARGET_TYPES), \
650  $(foreach prebuild, $(PREBUILD_TYPES), \
651    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
652$(foreach target, $(TARGET_TYPES), \
653  $(foreach compiler, $(COMPILER_TYPES), \
654    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
655$(foreach target, $(TARGET_TYPES), \
656  $(foreach relocate, $(RELOCATE_TYPES), \
657    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
658$(foreach target, $(TARGET_TYPES), \
659  $(foreach trace, $(TRACE_TYPES), \
660    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
661$(foreach target, $(TARGET_TYPES), \
662  $(foreach gc, $(GC_TYPES), \
663    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
664$(foreach target, $(TARGET_TYPES), \
665  $(foreach jni, $(JNI_TYPES), \
666    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
667$(foreach target, $(TARGET_TYPES), \
668  $(foreach image, $(IMAGE_TYPES), \
669    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
670$(foreach target, $(TARGET_TYPES), \
671  $(foreach test, $(TEST_ART_RUN_TESTS), \
672    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
673$(foreach target, $(TARGET_TYPES), \
674  $(foreach address_size, $(ALL_ADDRESS_SIZES), \
675    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
676$(foreach target, $(TARGET_TYPES), \
677  $(foreach run_type, $(RUN_TYPES), \
678    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
679$(foreach target, $(TARGET_TYPES), \
680  $(foreach debuggable_type, $(DEBUGGABLE_TYPES), \
681    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable_type))_RULES :=)))
682
683# We need dex2oat and dalvikvm on the target as well as the core images (all images as we sync
684# only once).
685TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_EXECUTABLES) $(TARGET_CORE_IMG_OUTS)
686
687# Also need libartagent.
688TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libartagent.so
689TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libartagentd.so
690ifdef TARGET_2ND_ARCH
691TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libartagent.so
692TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libartagentd.so
693endif
694
695# Also need libtiagent.
696TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libtiagent.so
697TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libtiagentd.so
698ifdef TARGET_2ND_ARCH
699TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libtiagent.so
700TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libtiagentd.so
701endif
702
703# Also need libarttest.
704TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so
705TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttestd.so
706ifdef TARGET_2ND_ARCH
707TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so
708TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttestd.so
709endif
710
711# Also need libnativebridgetest.
712TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so
713ifdef TARGET_2ND_ARCH
714TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so
715endif
716
717# All tests require the host executables. The tests also depend on the core images, but on
718# specific version depending on the compiler.
719ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \
720  $(ART_HOST_EXECUTABLES) \
721  $(ART_HOST_OUT_SHARED_LIBRARIES)/libtiagent$(ART_HOST_SHLIB_EXTENSION) \
722  $(ART_HOST_OUT_SHARED_LIBRARIES)/libtiagentd$(ART_HOST_SHLIB_EXTENSION) \
723  $(ART_HOST_OUT_SHARED_LIBRARIES)/libartagent$(ART_HOST_SHLIB_EXTENSION) \
724  $(ART_HOST_OUT_SHARED_LIBRARIES)/libartagentd$(ART_HOST_SHLIB_EXTENSION) \
725  $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
726  $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttestd$(ART_HOST_SHLIB_EXTENSION) \
727  $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
728  $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \
729  $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \
730  $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$(ART_HOST_SHLIB_EXTENSION)
731
732ifneq ($(HOST_PREFER_32_BIT),true)
733ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \
734  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libtiagent$(ART_HOST_SHLIB_EXTENSION) \
735  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libtiagentd$(ART_HOST_SHLIB_EXTENSION) \
736  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libartagent$(ART_HOST_SHLIB_EXTENSION) \
737  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libartagentd$(ART_HOST_SHLIB_EXTENSION) \
738  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \
739  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttestd$(ART_HOST_SHLIB_EXTENSION) \
740  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \
741  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \
742  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \
743  $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$(ART_HOST_SHLIB_EXTENSION)
744endif
745
746# Create a rule to build and run a tests following the form:
747# test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}-
748#    {4: interpreter optimizing jit interp-ac}-
749#    {5: relocate nrelocate relocate-npatchoat}-
750#    {6: trace or ntrace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}-
751#    {9: no-image image picimage}-{10: pictest npictest}-
752#    {11: ndebuggable debuggable}-{12: test name}{13: 32 or 64}
753define define-test-art-run-test
754  run_test_options :=
755  prereq_rule :=
756  test_groups :=
757  uc_host_or_target :=
758  jack_classpath :=
759  ifeq ($(ART_TEST_WITH_STRACE),true)
760    run_test_options += --strace
761  endif
762  ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true)
763    run_test_options += --always-clean
764  endif
765  ifeq ($(1),host)
766    uc_host_or_target := HOST
767    test_groups := ART_RUN_TEST_HOST_RULES
768    run_test_options += --host
769    prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(HOST_JACK_CLASSPATH_DEPENDENCIES)
770    jack_classpath := $(HOST_JACK_CLASSPATH)
771  else
772    ifeq ($(1),target)
773      uc_host_or_target := TARGET
774      test_groups := ART_RUN_TEST_TARGET_RULES
775      prereq_rule := test-art-target-sync $(TARGET_JACK_CLASSPATH_DEPENDENCIES)
776      jack_classpath := $(TARGET_JACK_CLASSPATH)
777    else
778      $$(error found $(1) expected $(TARGET_TYPES))
779    endif
780  endif
781  ifeq ($(2),debug)
782    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUG_RULES
783  else
784    ifeq ($(2),ndebug)
785      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELEASE_RULES
786      run_test_options += -O
787    else
788      $$(error found $(2) expected $(RUN_TYPES))
789    endif
790  endif
791  ifeq ($(3),prebuild)
792    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES
793    run_test_options += --prebuild
794  else
795    ifeq ($(3),no-prebuild)
796      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES
797      run_test_options += --no-prebuild
798    else
799      ifeq ($(3),no-dex2oat)
800        test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES
801        run_test_options += --no-prebuild --no-dex2oat
802      else
803        $$(error found $(3) expected $(PREBUILD_TYPES))
804      endif
805    endif
806  endif
807  ifeq ($(4),optimizing)
808    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES
809    run_test_options += --optimizing
810  else ifeq ($(4),regalloc_gc)
811    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_GRAPH_COLOR_RULES
812    run_test_options += --optimizing -Xcompiler-option --register-allocation-strategy=graph-color
813  else
814    ifeq ($(4),interpreter)
815      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES
816      run_test_options += --interpreter
817    else ifeq ($(4),interp-ac)
818      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_ACCESS_CHECKS_RULES
819      run_test_options += --interpreter --verify-soft-fail
820    else
821      ifeq ($(4),jit)
822        test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JIT_RULES
823        run_test_options += --jit
824      else
825        $$(error found $(4) expected $(COMPILER_TYPES))
826      endif
827    endif
828  endif
829
830  ifeq ($(5),relocate)
831    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES
832    run_test_options += --relocate
833  else
834    ifeq ($(5),no-relocate)
835      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES
836      run_test_options += --no-relocate
837    else
838      ifeq ($(5),relocate-npatchoat)
839        test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES
840        run_test_options += --relocate --no-patchoat
841      else
842        $$(error found $(5) expected $(RELOCATE_TYPES))
843      endif
844    endif
845  endif
846  ifeq ($(6),trace)
847    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
848    run_test_options += --trace
849  else
850    ifeq ($(6),ntrace)
851      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES
852    else
853      ifeq ($(6),stream)
854        # Group streaming under normal tracing rules.
855        test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES
856        run_test_options += --trace --stream
857      else
858        $$(error found $(6) expected $(TRACE_TYPES))
859      endif
860    endif
861  endif
862  ifeq ($(7),gcverify)
863    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES
864    run_test_options += --gcverify
865  else
866    ifeq ($(7),gcstress)
867      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES
868      run_test_options += --gcstress
869    else
870      ifeq ($(7),cms)
871        test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES
872      else
873        $$(error found $(7) expected $(GC_TYPES))
874      endif
875    endif
876  endif
877  ifeq ($(8),forcecopy)
878    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES
879    run_test_options += --runtime-option -Xjniopts:forcecopy
880    ifneq ($$(ART_TEST_JNI_FORCECOPY),true)
881      skip_test := true
882    endif
883  else
884    ifeq ($(8),checkjni)
885      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES
886      run_test_options += --runtime-option -Xcheck:jni
887    else
888      ifeq ($(8),jni)
889        test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES
890      else
891        $$(error found $(8) expected $(JNI_TYPES))
892      endif
893    endif
894  endif
895  image_suffix := $(4)
896  ifeq ($(4),regalloc_gc)
897    # Graph coloring tests share the image_suffix with optimizing tests.
898    image_suffix := optimizing
899  endif
900  ifeq ($(9),no-image)
901    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES
902    run_test_options += --no-image
903    # Add the core dependency. This is required for pre-building.
904    ifeq ($(1),host)
905      prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
906    else
907      prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
908    endif
909  else
910    ifeq ($(9),image)
911      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
912      # Add the core dependency.
913      ifeq ($(1),host)
914        prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
915      else
916        prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13))
917      endif
918    else
919      ifeq ($(9),picimage)
920        test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
921        run_test_options += --pic-image
922        ifeq ($(1),host)
923          prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_$(13))
924        else
925          prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_$(13))
926        endif
927      else
928        ifeq ($(9),multiimage)
929          test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES
930          run_test_options += --multi-image
931                ifeq ($(1),host)
932                        prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_multi_$(13))
933                else
934                        prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_multi_$(13))
935                endif
936        else
937          ifeq ($(9),multipicimage)
938            test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES
939                        run_test_options += --pic-image --multi-image
940                        ifeq ($(1),host)
941                        prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_multi_$(13))
942                        else
943                        prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_multi_$(13))
944                        endif
945          else
946            $$(error found $(9) expected $(IMAGE_TYPES))
947          endif
948        endif
949      endif
950    endif
951  endif
952  ifeq ($(10),pictest)
953    run_test_options += --pic-test
954  else
955    ifeq ($(10),npictest)
956      # Nothing to be done.
957    else
958      $$(error found $(10) expected $(PICTEST_TYPES))
959    endif
960  endif
961  ifeq ($(11),debuggable)
962    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUGGABLE_RULES
963    run_test_options += --debuggable
964  else
965    ifeq ($(11),ndebuggable)
966    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NONDEBUGGABLE_RULES
967      # Nothing to be done.
968    else
969      $$(error found $(11) expected $(DEBUGGABLE_TYPES))
970    endif
971  endif
972  # $(12) is the test name.
973  test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(12))_RULES
974  ifeq ($(13),64)
975    test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES
976    run_test_options += --64
977  else
978    ifeq ($(13),32)
979      test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES
980    else
981      $$(error found $(13) expected $(ALL_ADDRESS_SIZES))
982    endif
983  endif
984  # Override of host instruction-set-features. Required to test advanced x86 intrinsics. The
985  # conditionals aren't really correct, they will fail to do the right thing on a 32-bit only
986  # host. However, this isn't common enough to worry here and make the conditions complicated.
987  ifneq ($(DEX2OAT_HOST_INSTRUCTION_SET_FEATURES),)
988    ifeq ($(13),64)
989      run_test_options += --instruction-set-features $(DEX2OAT_HOST_INSTRUCTION_SET_FEATURES)
990    endif
991  endif
992  ifneq ($($(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES),)
993    ifeq ($(13),32)
994      run_test_options += --instruction-set-features $($(HOST_2ND_ARCH_VAR_PREFIX)DEX2OAT_HOST_INSTRUCTION_SET_FEATURES)
995    endif
996  endif
997  run_test_rule_name := test-art-$(1)-run-test-$(2)-$(3)-$(4)-$(5)-$(6)-$(7)-$(8)-$(9)-$(10)-$(11)-$(12)$(13)
998  run_test_options := --output-path $(ART_HOST_TEST_DIR)/run-test-output/$$(run_test_rule_name) \
999      $$(run_test_options)
1000  ifneq ($(ART_TEST_ANDROID_ROOT),)
1001    run_test_options := --android-root $(ART_TEST_ANDROID_ROOT) $$(run_test_options)
1002  endif
1003  ifeq ($(ART_TEST_QUIET),true)
1004    run_test_options += --quiet
1005  endif
1006$$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options)
1007$$(run_test_rule_name): PRIVATE_JACK_CLASSPATH := $$(jack_classpath)
1008.PHONY: $$(run_test_rule_name)
1009$$(run_test_rule_name): $(TEST_ART_RUN_TEST_DEPENDENCIES) $(HOST_OUT_EXECUTABLES)/hprof-conv $$(prereq_rule) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
1010	$(hide) $$(call ART_TEST_SKIP,$$@) && \
1011	  DX=$(abspath $(DX)) \
1012	    JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \
1013	    SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \
1014	    DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \
1015	    JACK_VERSION=$(JACK_DEFAULT_VERSION) \
1016	    JACK=$(abspath $(JACK)) \
1017	    JACK_VERSION=$(JACK_DEFAULT_VERSION) \
1018	    JACK_CLASSPATH=$$(PRIVATE_JACK_CLASSPATH) \
1019	    art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(12) \
1020	      && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@)
1021	$$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \
1022	  echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \
1023	  rm -r $(ART_HOST_TEST_DIR)) || true
1024
1025  $$(foreach test_group,$$(test_groups), $$(eval $$(value test_group) += $$(run_test_rule_name)))
1026
1027  # Clear locally defined variables.
1028  uc_host_or_target :=
1029  test_groups :=
1030  run_test_options :=
1031  run_test_rule_name :=
1032  prereq_rule :=
1033  jack_classpath :=
1034endef  # define-test-art-run-test
1035
1036$(foreach target, $(TARGET_TYPES), \
1037  $(foreach test, $(TEST_ART_RUN_TESTS), \
1038    $(foreach run_type, $(RUN_TYPES), \
1039      $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \
1040        $(foreach prebuild, $(PREBUILD_TYPES), \
1041          $(foreach compiler, $(COMPILER_TYPES), \
1042            $(foreach relocate, $(RELOCATE_TYPES), \
1043              $(foreach trace, $(TRACE_TYPES), \
1044                $(foreach gc, $(GC_TYPES), \
1045                  $(foreach jni, $(JNI_TYPES), \
1046                    $(foreach image, $(IMAGE_TYPES), \
1047                      $(foreach pictest, $(PICTEST_TYPES), \
1048                        $(foreach debuggable, $(DEBUGGABLE_TYPES), \
1049                          $(eval $(call define-test-art-run-test,$(target),$(run_type),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(pictest),$(debuggable),$(test),$(address_size))) \
1050                  )))))))))))))
1051define-test-art-run-test :=
1052
1053# Define a phony rule whose purpose is to test its prerequisites.
1054# $(1): host or target
1055# $(2): list of prerequisites
1056define define-test-art-run-test-group
1057.PHONY: $(1)
1058$(1): $(2)
1059	$(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@)
1060
1061endef  # define-test-art-run-test-group
1062
1063
1064$(foreach target, $(TARGET_TYPES), $(eval \
1065  $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES))))
1066$(foreach target, $(TARGET_TYPES), \
1067  $(foreach prebuild, $(PREBUILD_TYPES), $(eval \
1068    $(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)))))
1069$(foreach target, $(TARGET_TYPES), \
1070  $(foreach run-type, $(RUN_TYPES), $(eval \
1071    $(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)))))
1072$(foreach target, $(TARGET_TYPES), \
1073  $(foreach compiler, $(COMPILER_TYPES), $(eval \
1074    $(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)))))
1075$(foreach target, $(TARGET_TYPES), \
1076  $(foreach relocate, $(RELOCATE_TYPES), $(eval \
1077    $(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)))))
1078$(foreach target, $(TARGET_TYPES), \
1079  $(foreach trace, $(TRACE_TYPES), $(eval \
1080    $(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)))))
1081$(foreach target, $(TARGET_TYPES), \
1082  $(foreach gc, $(GC_TYPES), $(eval \
1083    $(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)))))
1084$(foreach target, $(TARGET_TYPES), \
1085  $(foreach jni, $(JNI_TYPES), $(eval \
1086    $(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)))))
1087$(foreach target, $(TARGET_TYPES), \
1088  $(foreach debuggable, $(DEBUGGABLE_TYPES), $(eval \
1089    $(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)))))
1090$(foreach target, $(TARGET_TYPES), \
1091  $(foreach image, $(IMAGE_TYPES), $(eval \
1092    $(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)))))
1093$(foreach target, $(TARGET_TYPES), \
1094  $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \
1095    $(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)))))
1096$(foreach target, $(TARGET_TYPES), \
1097  $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \
1098    $(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)))))
1099
1100# Clear variables now we're finished with them.
1101$(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=))
1102$(foreach target, $(TARGET_TYPES), \
1103  $(foreach prebuild, $(PREBUILD_TYPES), \
1104    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=)))
1105$(foreach target, $(TARGET_TYPES), \
1106  $(foreach compiler, $(COMPILER_TYPES), \
1107    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=)))
1108$(foreach target, $(TARGET_TYPES), \
1109  $(foreach relocate, $(RELOCATE_TYPES), \
1110    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=)))
1111$(foreach target, $(TARGET_TYPES), \
1112  $(foreach trace, $(TRACE_TYPES), \
1113    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=)))
1114$(foreach target, $(TARGET_TYPES), \
1115  $(foreach gc, $(GC_TYPES), \
1116    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=)))
1117$(foreach target, $(TARGET_TYPES), \
1118  $(foreach jni, $(JNI_TYPES), \
1119    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=)))
1120$(foreach target, $(TARGET_TYPES), \
1121  $(foreach debuggable, $(DEBUGGABLE_TYPES), \
1122    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable))_RULES :=)))
1123$(foreach target, $(TARGET_TYPES), \
1124  $(foreach image, $(IMAGE_TYPES), \
1125    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=)))
1126$(foreach target, $(TARGET_TYPES), \
1127  $(foreach test, $(TEST_ART_RUN_TESTS), \
1128    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=)))
1129$(foreach target, $(TARGET_TYPES), \
1130  $(foreach address_size, $(ALL_ADDRESS_SIZES), \
1131    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=)))
1132$(foreach target, $(TARGET_TYPES), \
1133  $(foreach run_type, $(RUN_TYPES), \
1134    $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=)))
1135define-test-art-run-test-group :=
1136TARGET_TYPES :=
1137PREBUILD_TYPES :=
1138COMPILER_TYPES :=
1139RELOCATE_TYPES :=
1140TRACE_TYPES :=
1141GC_TYPES :=
1142JNI_TYPES :=
1143IMAGE_TYPES :=
1144ADDRESS_SIZES_TARGET :=
1145ADDRESS_SIZES_HOST :=
1146ALL_ADDRESS_SIZES :=
1147RUN_TYPES :=
1148DEBUGGABLE_TYPES :=
1149
1150MY_LOCAL_PATH := $(LOCAL_PATH)
1151include $(MY_LOCAL_PATH)/Android.libartagent.mk
1152include $(MY_LOCAL_PATH)/Android.libtiagent.mk
1153include $(MY_LOCAL_PATH)/Android.libarttest.mk
1154include $(MY_LOCAL_PATH)/Android.libnativebridgetest.mk
1155MY_LOCAL_PATH :=
1156LOCAL_PATH :=
1157