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