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