Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 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 | |
| 16 | LOCAL_PATH := $(call my-dir) |
| 17 | |
| 18 | include art/build/Android.common_test.mk |
| 19 | |
| 20 | # List of all tests of the form 003-omnibus-opcodes. |
| 21 | TEST_ART_RUN_TESTS := $(wildcard $(LOCAL_PATH)/[0-9]*) |
| 22 | TEST_ART_RUN_TESTS := $(subst $(LOCAL_PATH)/,, $(TEST_ART_RUN_TESTS)) |
| 23 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 24 | ######################################################################## |
| 25 | # The art-run-tests module, used to build all run-tests into an image. |
Alex Light | 9dcc457 | 2014-08-14 14:16:26 -0700 | [diff] [blame] | 26 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 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 |
| 29 | art_run_tests_dir := $(call intermediates-dir-for,PACKAGING,art-run-tests)/DATA |
| 30 | |
| 31 | # A generated list of prerequisites that call 'run-test --build-only', the actual prerequisite is |
| 32 | # an empty file touched in the intermediate directory. |
| 33 | TEST_ART_RUN_TEST_BUILD_RULES := |
| 34 | |
| 35 | # Helper to create individual build targets for tests. Must be called with $(eval). |
| 36 | # $(1): the test number |
| 37 | define define-build-art-run-test |
| 38 | dmart_target := $(art_run_tests_dir)/art-run-tests/$(1)/touch |
Andreas Gampe | 8fda9f2 | 2014-10-03 16:15:37 -0700 | [diff] [blame] | 39 | $$(dmart_target): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin $(HOST_OUT_EXECUTABLES)/smali $(HOST_OUT_EXECUTABLES)/dexmerger |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 40 | $(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@) |
| 41 | $(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \ |
Andreas Gampe | 8fda9f2 | 2014-10-03 16:15:37 -0700 | [diff] [blame] | 42 | SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \ |
| 43 | DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \ |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 44 | $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1) |
| 45 | $(hide) touch $$@ |
| 46 | |
| 47 | TEST_ART_RUN_TEST_BUILD_RULES += $$(dmart_target) |
| 48 | dmart_target := |
| 49 | endef |
Ian Rogers | bf66bce | 2014-06-24 23:15:34 -0700 | [diff] [blame] | 50 | $(foreach test, $(TEST_ART_RUN_TESTS), $(eval $(call define-build-art-run-test,$(test)))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 51 | |
| 52 | include $(CLEAR_VARS) |
| 53 | LOCAL_MODULE_TAGS := tests |
| 54 | LOCAL_MODULE := art-run-tests |
Ian Rogers | abbf242 | 2014-10-15 11:57:01 -0700 | [diff] [blame] | 55 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TEST_ART_RUN_TEST_BUILD_RULES) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 56 | # The build system use this flag to pick up files generated by declare-make-art-run-test. |
| 57 | LOCAL_PICKUP_FILES := $(art_run_tests_dir) |
| 58 | |
| 59 | include $(BUILD_PHONY_PACKAGE) |
| 60 | |
| 61 | # Clear temp vars. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 62 | art_run_tests_dir := |
| 63 | define-build-art-run-test := |
Ian Rogers | 8a14b75 | 2014-07-18 15:06:53 -0700 | [diff] [blame] | 64 | TEST_ART_RUN_TEST_BUILD_RULES := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 65 | |
| 66 | ######################################################################## |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 67 | # General rules to build and run a run-test. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 68 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 69 | TARGET_TYPES := host target |
Nicolas Geoffray | 41bb331 | 2014-10-24 13:49:08 +0100 | [diff] [blame] | 70 | PREBUILD_TYPES := |
| 71 | ifeq ($(ART_TEST_RUN_TEST_PREBUILD),true) |
| 72 | PREBUILD_TYPES += prebuild |
| 73 | endif |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 74 | ifeq ($(ART_TEST_RUN_TEST_NO_PREBUILD),true) |
| 75 | PREBUILD_TYPES += no-prebuild |
| 76 | endif |
| 77 | ifeq ($(ART_TEST_RUN_TEST_NO_DEX2OAT),true) |
| 78 | PREBUILD_TYPES += no-dex2oat |
| 79 | endif |
| 80 | COMPILER_TYPES := |
| 81 | ifeq ($(ART_TEST_DEFAULT_COMPILER),true) |
| 82 | COMPILER_TYPES += default |
| 83 | endif |
| 84 | ifeq ($(ART_TEST_INTERPRETER),true) |
| 85 | COMPILER_TYPES += interpreter |
| 86 | endif |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 87 | ifeq ($(ART_TEST_JIT),true) |
| 88 | COMPILER_TYPES += jit |
| 89 | endif |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 90 | ifeq ($(ART_TEST_OPTIMIZING),true) |
| 91 | COMPILER_TYPES += optimizing |
| 92 | endif |
| 93 | RELOCATE_TYPES := relocate |
| 94 | ifeq ($(ART_TEST_RUN_TEST_NO_RELOCATE),true) |
| 95 | RELOCATE_TYPES += no-relocate |
| 96 | endif |
| 97 | ifeq ($(ART_TEST_RUN_TEST_RELOCATE_NO_PATCHOAT),true) |
Andreas Gampe | b9aec2c | 2015-04-23 22:23:47 -0700 | [diff] [blame^] | 98 | RELOCATE_TYPES += relocate-npatchoat |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 99 | endif |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 100 | TRACE_TYPES := ntrace |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 101 | ifeq ($(ART_TEST_TRACE),true) |
| 102 | TRACE_TYPES += trace |
| 103 | endif |
| 104 | GC_TYPES := cms |
Alex Light | 992f1e7 | 2014-08-27 16:08:57 -0700 | [diff] [blame] | 105 | ifeq ($(ART_TEST_GC_STRESS),true) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 106 | GC_TYPES += gcstress |
| 107 | endif |
Alex Light | 992f1e7 | 2014-08-27 16:08:57 -0700 | [diff] [blame] | 108 | ifeq ($(ART_TEST_GC_VERIFY),true) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 109 | GC_TYPES += gcverify |
| 110 | endif |
| 111 | JNI_TYPES := checkjni |
| 112 | ifeq ($(ART_TEST_JNI_FORCECOPY),true) |
| 113 | JNI_TYPES += forcecopy |
| 114 | endif |
| 115 | IMAGE_TYPES := image |
| 116 | ifeq ($(ART_TEST_RUN_TEST_NO_IMAGE),true) |
| 117 | IMAGE_TYPES += no-image |
| 118 | endif |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 119 | ifeq ($(ART_TEST_PIC_IMAGE),true) |
| 120 | IMAGE_TYPES += picimage |
| 121 | endif |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 122 | PICTEST_TYPES := npictest |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 123 | ifeq ($(ART_TEST_PIC_TEST),true) |
| 124 | PICTEST_TYPES += pictest |
| 125 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 126 | RUN_TYPES := |
| 127 | ifeq ($(ART_TEST_RUN_TEST_DEBUG),true) |
| 128 | RUN_TYPES += debug |
| 129 | endif |
| 130 | ifeq ($(ART_TEST_RUN_TEST_NDEBUG),true) |
| 131 | RUN_TYPES += ndebug |
| 132 | endif |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 133 | DEBUGGABLE_TYPES := ndebuggable |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 134 | ifeq ($(ART_TEST_RUN_TEST_DEBUGGABLE),true) |
| 135 | DEBUGGABLE_TYPES += debuggable |
| 136 | endif |
Nicolas Geoffray | 41bb331 | 2014-10-24 13:49:08 +0100 | [diff] [blame] | 137 | ADDRESS_SIZES_TARGET := $(ART_PHONY_TEST_TARGET_SUFFIX) |
| 138 | ADDRESS_SIZES_HOST := $(ART_PHONY_TEST_HOST_SUFFIX) |
| 139 | ifeq ($(ART_TEST_RUN_TEST_2ND_ARCH),true) |
| 140 | ADDRESS_SIZES_TARGET += $(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
| 141 | ADDRESS_SIZES_HOST += $(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
| 142 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 143 | ALL_ADDRESS_SIZES := 64 32 |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 144 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 145 | # List all run test names with number arguments agreeing with the comment above. |
| 146 | define all-run-test-names |
| 147 | $(foreach target, $(1), \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 148 | $(foreach run-type, $(2), \ |
| 149 | $(foreach prebuild, $(3), \ |
| 150 | $(foreach compiler, $(4), \ |
| 151 | $(foreach relocate, $(5), \ |
| 152 | $(foreach trace, $(6), \ |
| 153 | $(foreach gc, $(7), \ |
| 154 | $(foreach jni, $(8), \ |
| 155 | $(foreach image, $(9), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 156 | $(foreach pictest, $(10), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 157 | $(foreach debuggable, $(11), \ |
| 158 | $(foreach test, $(12), \ |
| 159 | $(foreach address_size, $(13), \ |
| 160 | test-art-$(target)-run-test-$(run-type)-$(prebuild)-$(compiler)-$(relocate)-$(trace)-$(gc)-$(jni)-$(image)-$(pictest)-$(debuggable)-$(test)$(address_size) \ |
| 161 | ))))))))))))) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 162 | endef # all-run-test-names |
| 163 | |
| 164 | # To generate a full list or tests: |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 165 | # $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \ |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 166 | # $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 167 | # $(DEBUGGABLE_TYPES) $(TEST_ART_RUN_TESTS), $(ALL_ADDRESS_SIZES) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 168 | |
| 169 | # Convert's a rule name to the form used in variables, e.g. no-relocate to NO_RELOCATE |
| 170 | define name-to-var |
| 171 | $(shell echo $(1) | tr '[:lower:]' '[:upper:]' | tr '-' '_') |
| 172 | endef # name-to-var |
| 173 | |
| 174 | # Tests that are timing sensitive and flaky on heavily loaded systems. |
| 175 | TEST_ART_TIMING_SENSITIVE_RUN_TESTS := \ |
| 176 | 053-wait-some \ |
Mathieu Chartier | e4a91bb | 2015-01-28 13:11:44 -0800 | [diff] [blame] | 177 | 055-enum-performance \ |
| 178 | 133-static-invoke-super |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 179 | |
| 180 | # disable timing sensitive tests on "dist" builds. |
| 181 | ifdef dist_goal |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 182 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 183 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 184 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_TIMING_SENSITIVE_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 185 | endif |
| 186 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 187 | TEST_ART_TIMING_SENSITIVE_RUN_TESTS := |
| 188 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 189 | # Note 116-nodex2oat is not broken per-se it just doesn't (and isn't meant to) work with --prebuild. |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 190 | TEST_ART_BROKEN_PREBUILD_RUN_TESTS := \ |
Andreas Gampe | 3ad5d5e | 2015-02-03 18:26:55 -0800 | [diff] [blame] | 191 | 116-nodex2oat \ |
Jean Christophe Beyler | 24e04aa | 2014-09-12 12:03:25 -0700 | [diff] [blame] | 192 | 118-noimage-dex2oat \ |
| 193 | 134-nodex2oat-nofallback |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 194 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 195 | ifneq (,$(filter prebuild,$(PREBUILD_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 196 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),prebuild, \ |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 197 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 198 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_PREBUILD_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 199 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 200 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 201 | TEST_ART_BROKEN_PREBUILD_RUN_TESTS := |
| 202 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 203 | TEST_ART_BROKEN_NO_PREBUILD_TESTS := \ |
| 204 | 117-nopatchoat |
| 205 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 206 | ifneq (,$(filter no-prebuild,$(PREBUILD_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 207 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-prebuild, \ |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 208 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 209 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_PREBUILD_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 210 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 211 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 212 | TEST_ART_BROKEN_NO_PREBUILD_TESTS := |
| 213 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 214 | # Note 117-nopatchoat is not broken per-se it just doesn't work (and isn't meant to) without |
| 215 | # --prebuild --relocate |
| 216 | TEST_ART_BROKEN_NO_RELOCATE_TESTS := \ |
Andreas Gampe | 3ad5d5e | 2015-02-03 18:26:55 -0800 | [diff] [blame] | 217 | 117-nopatchoat \ |
| 218 | 118-noimage-dex2oat \ |
| 219 | 119-noimage-patchoat |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 220 | |
| 221 | ifneq (,$(filter no-relocate,$(RELOCATE_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 222 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 223 | $(COMPILER_TYPES), no-relocate,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 224 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_RELOCATE_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 225 | endif |
| 226 | |
| 227 | TEST_ART_BROKEN_NO_RELOCATE_TESTS := |
| 228 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 229 | # Tests that are broken with GC stress. |
Mathieu Chartier | bdeb9b7 | 2015-01-07 17:42:07 -0800 | [diff] [blame] | 230 | TEST_ART_BROKEN_GCSTRESS_RUN_TESTS := |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 231 | |
| 232 | ifneq (,$(filter gcstress,$(GC_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 233 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 234 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),gcstress,$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 235 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(DBEUGGABLE_TYPES), $(TEST_ART_BROKEN_GCSTRESS_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 236 | endif |
| 237 | |
| 238 | TEST_ART_BROKEN_GCSTRESS_RUN_TESTS := |
| 239 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 240 | # 115-native-bridge setup is complicated. Need to implement it correctly for the target. |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 241 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 242 | $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), 115-native-bridge, \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 243 | $(ALL_ADDRESS_SIZES)) |
| 244 | |
Andreas Gampe | 3a91309 | 2015-01-10 00:26:17 -0800 | [diff] [blame] | 245 | # 130-hprof dumps the heap and runs hprof-conv to check whether the file is somewhat readable. This |
| 246 | # is only possible on the host. |
| 247 | # TODO: Turn off all the other combinations, this is more about testing actual ART code. A gtest is |
| 248 | # very hard to write here, as (for a complete test) JDWP must be set up. |
| 249 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 250 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 251 | $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),130-hprof,$(ALL_ADDRESS_SIZES)) |
Andreas Gampe | 3a91309 | 2015-01-10 00:26:17 -0800 | [diff] [blame] | 252 | |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 253 | # All these tests check that we have sane behavior if we don't have a patchoat or dex2oat. |
| 254 | # Therefore we shouldn't run them in situations where we actually don't have these since they |
| 255 | # explicitly test for them. These all also assume we have an image. |
| 256 | TEST_ART_BROKEN_FALLBACK_RUN_TESTS := \ |
| 257 | 116-nodex2oat \ |
| 258 | 117-nopatchoat \ |
| 259 | 118-noimage-dex2oat \ |
Andreas Gampe | b9aec2c | 2015-04-23 22:23:47 -0700 | [diff] [blame^] | 260 | 119-noimage-patchoat \ |
| 261 | 138-duplicate-classes-check2 |
| 262 | |
| 263 | # This test fails without an image. |
| 264 | TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS := \ |
| 265 | 138-duplicate-classes-check |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 266 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 267 | ifneq (,$(filter no-dex2oat,$(PREBUILD_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 268 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),no-dex2oat, \ |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 269 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 270 | $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 271 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 272 | |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 273 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 274 | ifneq (,$(filter no-image,$(IMAGE_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 275 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 276 | $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 277 | $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Andreas Gampe | b9aec2c | 2015-04-23 22:23:47 -0700 | [diff] [blame^] | 278 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 279 | $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \ |
| 280 | $(PICTEST_TYPES), $(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_NO_IMAGE_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 281 | endif |
| 282 | |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 283 | ifneq (,$(filter relocate-npatchoat,$(RELOCATE_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 284 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 285 | $(COMPILER_TYPES), relocate-npatchoat,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 286 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 287 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 288 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 289 | TEST_ART_BROKEN_FALLBACK_RUN_TESTS := |
| 290 | |
Andreas Gampe | 9cb65bc | 2015-02-18 17:08:27 -0800 | [diff] [blame] | 291 | # This test dynamically enables tracing to force a deoptimization. This makes the test meaningless |
| 292 | # when already tracing, and writes an error message that we do not want to check for. |
| 293 | TEST_ART_BROKEN_TRACING_RUN_TESTS := \ |
| 294 | 802-deoptimization |
| 295 | |
| 296 | ifneq (,$(filter trace,$(TRACE_TYPES))) |
| 297 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 298 | $(COMPILER_TYPES),$(RELOCATE_TYPES),trace,$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 299 | $(PICTEST_TYPES),$(DEBUGGABLE_TYPES), $(TEST_ART_BROKEN_TRACING_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Andreas Gampe | 9cb65bc | 2015-02-18 17:08:27 -0800 | [diff] [blame] | 300 | endif |
| 301 | |
| 302 | TEST_ART_BROKEN_TRACING_RUN_TESTS := |
| 303 | |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 304 | # The following tests use libarttest.so, which is linked against libartd.so, so will |
| 305 | # not work when libart.so is the one loaded. |
| 306 | # TODO: Find a way to run these tests in ndebug mode. |
| 307 | TEST_ART_BROKEN_NDEBUG_TESTS := \ |
| 308 | 004-JniTest \ |
| 309 | 004-ReferenceMap \ |
| 310 | 004-SignalTest \ |
| 311 | 004-StackWalk \ |
| 312 | 004-UnsafeTest \ |
Nicolas Geoffray | 64dea7e | 2014-11-07 14:32:42 +0000 | [diff] [blame] | 313 | 051-thread \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 314 | 115-native-bridge \ |
| 315 | 116-nodex2oat \ |
| 316 | 117-nopatchoat \ |
| 317 | 118-noimage-dex2oat \ |
| 318 | 119-noimage-patchoat \ |
Nicolas Geoffray | 8c9200a | 2015-01-15 08:42:47 +0000 | [diff] [blame] | 319 | 131-structural-change \ |
Nicolas Geoffray | d845fd0 | 2015-03-03 12:43:45 +0000 | [diff] [blame] | 320 | 454-get-vreg \ |
| 321 | 455-set-vreg \ |
Nicolas Geoffray | 64d69ab | 2015-03-10 19:26:24 +0000 | [diff] [blame] | 322 | 457-regs \ |
Nicolas Geoffray | 915b9d0 | 2015-03-11 15:11:19 +0000 | [diff] [blame] | 323 | 461-get-reference-vreg \ |
Nicolas Geoffray | d8126be | 2015-03-27 10:22:41 +0000 | [diff] [blame] | 324 | 466-get-live-vreg \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 325 | |
| 326 | ifneq (,$(filter ndebug,$(RUN_TYPES))) |
| 327 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),ndebug,$(PREBUILD_TYPES), \ |
| 328 | $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 329 | $(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_NDEBUG_TESTS),$(ALL_ADDRESS_SIZES)) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 330 | endif |
| 331 | |
| 332 | TEST_ART_BROKEN_NDEBUG_TESTS := |
| 333 | |
Nicolas Geoffray | a3d05a4 | 2014-10-20 17:41:32 +0100 | [diff] [blame] | 334 | # Known broken tests for the default compiler (Quick). |
Nicolas Geoffray | e0fe7ae | 2015-03-09 10:02:49 +0000 | [diff] [blame] | 335 | TEST_ART_BROKEN_DEFAULT_RUN_TESTS := \ |
| 336 | 457-regs |
Nicolas Geoffray | a3d05a4 | 2014-10-20 17:41:32 +0100 | [diff] [blame] | 337 | |
| 338 | ifneq (,$(filter default,$(COMPILER_TYPES))) |
| 339 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
Nicolas Geoffray | 83cae42 | 2014-10-22 15:08:03 +0100 | [diff] [blame] | 340 | default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 341 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_DEFAULT_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Nicolas Geoffray | a3d05a4 | 2014-10-20 17:41:32 +0100 | [diff] [blame] | 342 | endif |
| 343 | |
| 344 | TEST_ART_BROKEN_DEFAULT_RUN_TESTS := |
| 345 | |
Roland Levillain | 232ade0 | 2015-04-20 15:14:36 +0100 | [diff] [blame] | 346 | # Known broken tests for Quick's and Optimizing's ARM back ends. |
| 347 | TEST_ART_BROKEN_ARM_RUN_TESTS := 477-long-to-float-conversion-precision # b/20413424 |
| 348 | |
| 349 | ifeq ($(TARGET_ARCH),arm) |
| 350 | ifneq (,$(filter 32,$(ALL_ADDRESS_SIZES))) |
| 351 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 352 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
| 353 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_ARM_RUN_TESTS),32) |
| 354 | endif |
| 355 | endif |
| 356 | |
| 357 | TEST_ART_BROKEN_ARM_RUN_TESTS := |
| 358 | |
Alexandre Rames | 5319def | 2014-10-23 10:03:10 +0100 | [diff] [blame] | 359 | # Known broken tests for the arm64 optimizing compiler backend. |
Serban Constantinescu | 02d81cc | 2015-01-05 16:08:49 +0000 | [diff] [blame] | 360 | TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS := |
Alexandre Rames | 5319def | 2014-10-23 10:03:10 +0100 | [diff] [blame] | 361 | |
| 362 | ifneq (,$(filter optimizing,$(COMPILER_TYPES))) |
| 363 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 364 | optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 365 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS),64) |
Alexandre Rames | 5319def | 2014-10-23 10:03:10 +0100 | [diff] [blame] | 366 | endif |
| 367 | |
| 368 | TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS := |
| 369 | |
Nicolas Geoffray | 19a19cf | 2014-10-22 16:07:05 +0100 | [diff] [blame] | 370 | # Known broken tests for the optimizing compiler. |
Nicolas Geoffray | aa8dd2f | 2015-01-23 17:48:28 +0000 | [diff] [blame] | 371 | TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS := |
| 372 | TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS += 099-vmdebug # b/18098594 |
| 373 | TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS += 802-deoptimization # b/18547544 |
Nicolas Geoffray | 19a19cf | 2014-10-22 16:07:05 +0100 | [diff] [blame] | 374 | |
| 375 | ifneq (,$(filter optimizing,$(COMPILER_TYPES))) |
| 376 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 377 | optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 378 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Nicolas Geoffray | 19a19cf | 2014-10-22 16:07:05 +0100 | [diff] [blame] | 379 | endif |
| 380 | |
Nicolas Geoffray | 5d672a6 | 2014-12-04 14:39:31 +0000 | [diff] [blame] | 381 | # If ART_USE_OPTIMIZING_COMPILER is set to true, then the default core.art has been |
| 382 | # compiled with the optimizing compiler. |
| 383 | ifeq ($(ART_USE_OPTIMIZING_COMPILER),true) |
| 384 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 385 | default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 386 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(DEBUGGABLE_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Nicolas Geoffray | 5d672a6 | 2014-12-04 14:39:31 +0000 | [diff] [blame] | 387 | endif |
| 388 | |
Nicolas Geoffray | 19a19cf | 2014-10-22 16:07:05 +0100 | [diff] [blame] | 389 | TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS := |
| 390 | |
Nicolas Geoffray | e0fe7ae | 2015-03-09 10:02:49 +0000 | [diff] [blame] | 391 | # Tests that should fail when the optimizing compiler compiles them non-debuggable. |
| 392 | TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS := \ |
Nicolas Geoffray | 915b9d0 | 2015-03-11 15:11:19 +0000 | [diff] [blame] | 393 | 454-get-vreg \ |
| 394 | 455-set-vreg \ |
Nicolas Geoffray | e0fe7ae | 2015-03-09 10:02:49 +0000 | [diff] [blame] | 395 | 457-regs \ |
| 396 | |
| 397 | ifneq (,$(filter optimizing,$(COMPILER_TYPES))) |
| 398 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 399 | optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 400 | $(IMAGE_TYPES),$(PICTEST_TYPES),ndebuggable,$(TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Nicolas Geoffray | e0fe7ae | 2015-03-09 10:02:49 +0000 | [diff] [blame] | 401 | endif |
| 402 | |
| 403 | TEST_ART_BROKEN_OPTIMIZING_NONDEBUGGABLE_RUN_TESTS := |
| 404 | |
Nicolas Geoffray | e50b8d2 | 2015-03-13 08:57:42 +0000 | [diff] [blame] | 405 | # Tests that should fail when the optimizing compiler compiles them debuggable. |
| 406 | TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS := \ |
Nicolas Geoffray | e50b8d2 | 2015-03-13 08:57:42 +0000 | [diff] [blame] | 407 | |
| 408 | ifneq (,$(filter optimizing,$(COMPILER_TYPES))) |
| 409 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 410 | optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
| 411 | $(IMAGE_TYPES),$(PICTEST_TYPES),debuggable,$(TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
| 412 | endif |
| 413 | |
| 414 | TEST_ART_BROKEN_OPTIMIZING_DEBUGGABLE_RUN_TESTS := |
| 415 | |
Alexandre Rames | 5319def | 2014-10-23 10:03:10 +0100 | [diff] [blame] | 416 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 417 | # Clear variables ahead of appending to them when defining tests. |
| 418 | $(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=)) |
| 419 | $(foreach target, $(TARGET_TYPES), \ |
| 420 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 421 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=))) |
| 422 | $(foreach target, $(TARGET_TYPES), \ |
| 423 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 424 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=))) |
| 425 | $(foreach target, $(TARGET_TYPES), \ |
| 426 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 427 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=))) |
| 428 | $(foreach target, $(TARGET_TYPES), \ |
| 429 | $(foreach trace, $(TRACE_TYPES), \ |
| 430 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=))) |
| 431 | $(foreach target, $(TARGET_TYPES), \ |
| 432 | $(foreach gc, $(GC_TYPES), \ |
| 433 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=))) |
| 434 | $(foreach target, $(TARGET_TYPES), \ |
| 435 | $(foreach jni, $(JNI_TYPES), \ |
| 436 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=))) |
| 437 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 438 | $(foreach image, $(IMAGE_TYPES), \ |
| 439 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=))) |
| 440 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 441 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
| 442 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=))) |
| 443 | $(foreach target, $(TARGET_TYPES), \ |
| 444 | $(foreach address_size, $(ALL_ADDRESS_SIZES), \ |
| 445 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 446 | $(foreach target, $(TARGET_TYPES), \ |
| 447 | $(foreach run_type, $(RUN_TYPES), \ |
| 448 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=))) |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 449 | $(foreach target, $(TARGET_TYPES), \ |
| 450 | $(foreach debuggable_type, $(DEBUGGABLE_TYPES), \ |
| 451 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable_type))_RULES :=))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 452 | |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 453 | # We need dex2oat and dalvikvm on the target as well as the core images (all images as we sync |
| 454 | # only once). |
| 455 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_EXECUTABLES) $(TARGET_CORE_IMG_OUTS) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 456 | |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 457 | # Also need libarttest. |
| 458 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so |
| 459 | ifdef TARGET_2ND_ARCH |
| 460 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so |
| 461 | endif |
| 462 | |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 463 | # Also need libnativebridgetest. |
| 464 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so |
| 465 | ifdef TARGET_2ND_ARCH |
| 466 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so |
| 467 | endif |
| 468 | |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 469 | # All tests require the host executables. The tests also depend on the core images, but on |
| 470 | # specific version depending on the compiler. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 471 | ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \ |
| 472 | $(ART_HOST_EXECUTABLES) \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 473 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 474 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 475 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 476 | |
| 477 | ifneq ($(HOST_PREFER_32_BIT),true) |
| 478 | ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 479 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 480 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 481 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 482 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 483 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 484 | # Create a rule to build and run a tests following the form: |
Calin Juravle | 9228b2a | 2014-10-22 15:54:34 +0100 | [diff] [blame] | 485 | # test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}- |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 486 | # {4: interpreter default optimizing jit}-{5: relocate nrelocate relocate-npatchoat}- |
| 487 | # {6: trace or ntrace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}- |
| 488 | # {9: no-image image picimage}-{10: pictest npictest}- |
| 489 | # {11: ndebuggable debuggable}-{12: test name}{13: 32 or 64} |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 490 | define define-test-art-run-test |
Nicolas Geoffray | 611e1db | 2014-10-09 17:34:45 +0100 | [diff] [blame] | 491 | run_test_options := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 492 | prereq_rule := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 493 | test_groups := |
| 494 | uc_host_or_target := |
Alex Light | bfac14a | 2014-07-30 09:41:21 -0700 | [diff] [blame] | 495 | ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true) |
| 496 | run_test_options += --always-clean |
| 497 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 498 | ifeq ($(1),host) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 499 | uc_host_or_target := HOST |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 500 | test_groups := ART_RUN_TEST_HOST_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 501 | run_test_options += --host |
| 502 | prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) |
| 503 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 504 | ifeq ($(1),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 505 | uc_host_or_target := TARGET |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 506 | test_groups := ART_RUN_TEST_TARGET_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 507 | prereq_rule := test-art-target-sync |
| 508 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 509 | $$(error found $(1) expected $(TARGET_TYPES)) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 510 | endif |
| 511 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 512 | ifeq ($(2),debug) |
| 513 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUG_RULES |
| 514 | else |
| 515 | ifeq ($(2),ndebug) |
| 516 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELEASE_RULES |
| 517 | run_test_options += -O |
| 518 | else |
| 519 | $$(error found $(2) expected $(RUN_TYPES)) |
| 520 | endif |
| 521 | endif |
| 522 | ifeq ($(3),prebuild) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 523 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES |
| 524 | run_test_options += --prebuild |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 525 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 526 | ifeq ($(3),no-prebuild) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 527 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES |
| 528 | run_test_options += --no-prebuild |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 529 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 530 | ifeq ($(3),no-dex2oat) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 531 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES |
| 532 | run_test_options += --no-prebuild --no-dex2oat |
| 533 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 534 | $$(error found $(3) expected $(PREBUILD_TYPES)) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 535 | endif |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 536 | endif |
| 537 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 538 | ifeq ($(4),optimizing) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 539 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 540 | run_test_options += --optimizing |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 541 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 542 | ifeq ($(4),interpreter) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 543 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 544 | run_test_options += --interpreter |
| 545 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 546 | ifeq ($(4),default) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 547 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEFAULT_RULES |
Nicolas Geoffray | c9338b9 | 2014-12-03 13:36:10 +0000 | [diff] [blame] | 548 | run_test_options += --quick |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 549 | else |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 550 | ifeq ($(4),jit) |
Mathieu Chartier | 3fc1b12 | 2015-02-26 10:58:08 -0800 | [diff] [blame] | 551 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JIT_RULES |
Mathieu Chartier | e5f13e5 | 2015-02-24 09:37:21 -0800 | [diff] [blame] | 552 | run_test_options += --jit |
| 553 | else |
| 554 | $$(error found $(4) expected $(COMPILER_TYPES)) |
| 555 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 556 | endif |
| 557 | endif |
| 558 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 559 | |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 560 | ifeq ($(5),relocate) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 561 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES |
| 562 | run_test_options += --relocate |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 563 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 564 | ifeq ($(5),no-relocate) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 565 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES |
| 566 | run_test_options += --no-relocate |
| 567 | else |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 568 | ifeq ($(5),relocate-npatchoat) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 569 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES |
| 570 | run_test_options += --relocate --no-patchoat |
| 571 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 572 | $$(error found $(5) expected $(RELOCATE_TYPES)) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 573 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 574 | endif |
| 575 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 576 | ifeq ($(6),trace) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 577 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 578 | run_test_options += --trace |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 579 | else |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 580 | ifeq ($(6),ntrace) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 581 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES |
Ian Rogers | 701aa64 | 2014-07-18 11:38:13 -0700 | [diff] [blame] | 582 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 583 | $$(error found $(6) expected $(TRACE_TYPES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 584 | endif |
| 585 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 586 | ifeq ($(7),gcverify) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 587 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 588 | run_test_options += --gcverify |
| 589 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 590 | ifeq ($(7),gcstress) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 591 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 592 | run_test_options += --gcstress |
| 593 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 594 | ifeq ($(7),cms) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 595 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES |
Ian Rogers | 8a14b75 | 2014-07-18 15:06:53 -0700 | [diff] [blame] | 596 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 597 | $$(error found $(7) expected $(GC_TYPES)) |
Ian Rogers | 701aa64 | 2014-07-18 11:38:13 -0700 | [diff] [blame] | 598 | endif |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 599 | endif |
| 600 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 601 | ifeq ($(8),forcecopy) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 602 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 603 | run_test_options += --runtime-option -Xjniopts:forcecopy |
| 604 | ifneq ($$(ART_TEST_JNI_FORCECOPY),true) |
| 605 | skip_test := true |
| 606 | endif |
| 607 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 608 | ifeq ($(8),checkjni) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 609 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 610 | run_test_options += --runtime-option -Xcheck:jni |
| 611 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 612 | ifeq ($(8),jni) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 613 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES |
| 614 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 615 | $$(error found $(8) expected $(JNI_TYPES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 616 | endif |
| 617 | endif |
| 618 | endif |
Mathieu Chartier | e2a12c0 | 2015-02-27 13:21:15 -0800 | [diff] [blame] | 619 | ifeq ($(4),jit) |
| 620 | # Use interpreter image for JIT. |
| 621 | image_suffix := interpreter |
| 622 | else |
| 623 | image_suffix := $(4) |
| 624 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 625 | ifeq ($(9),no-image) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 626 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES |
| 627 | run_test_options += --no-image |
Andreas Gampe | bf03e84 | 2014-10-29 20:46:17 -0700 | [diff] [blame] | 628 | # Add the core dependency. This is required for pre-building. |
| 629 | ifeq ($(1),host) |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 630 | prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13)) |
Andreas Gampe | bf03e84 | 2014-10-29 20:46:17 -0700 | [diff] [blame] | 631 | else |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 632 | prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13)) |
Andreas Gampe | bf03e84 | 2014-10-29 20:46:17 -0700 | [diff] [blame] | 633 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 634 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 635 | ifeq ($(9),image) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 636 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 637 | # Add the core dependency. |
| 638 | ifeq ($(1),host) |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 639 | prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_no-pic_$(13)) |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 640 | else |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 641 | prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_no-pic_$(13)) |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 642 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 643 | else |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 644 | ifeq ($(9),picimage) |
| 645 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES |
| 646 | run_test_options += --pic-image |
| 647 | ifeq ($(1),host) |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 648 | prereq_rule += $$(HOST_CORE_IMAGE_$$(image_suffix)_pic_$(13)) |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 649 | else |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 650 | prereq_rule += $$(TARGET_CORE_IMAGE_$$(image_suffix)_pic_$(13)) |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 651 | endif |
| 652 | else |
| 653 | $$(error found $(9) expected $(IMAGE_TYPES)) |
| 654 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 655 | endif |
| 656 | endif |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 657 | ifeq ($(10),pictest) |
| 658 | run_test_options += --pic-test |
| 659 | else |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 660 | ifeq ($(10),npictest) |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 661 | # Nothing to be done. |
| 662 | else |
| 663 | $$(error found $(10) expected $(PICTEST_TYPES)) |
| 664 | endif |
| 665 | endif |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 666 | ifeq ($(11),debuggable) |
| 667 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUGGABLE_RULES |
| 668 | run_test_options += --debuggable |
| 669 | else |
Mathieu Chartier | 1445dd3 | 2015-03-20 14:29:51 -0700 | [diff] [blame] | 670 | ifeq ($(11),ndebuggable) |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 671 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NONDEBUGGABLE_RULES |
| 672 | # Nothing to be done. |
| 673 | else |
| 674 | $$(error found $(11) expected $(DEBUGGABLE_TYPES)) |
| 675 | endif |
| 676 | endif |
| 677 | # $(12) is the test name. |
| 678 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(12))_RULES |
| 679 | ifeq ($(13),64) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 680 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES |
| 681 | run_test_options += --64 |
| 682 | else |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 683 | ifeq ($(13),32) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 684 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES |
| 685 | else |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 686 | $$(error found $(13) expected $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 687 | endif |
| 688 | endif |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 689 | run_test_rule_name := test-art-$(1)-run-test-$(2)-$(3)-$(4)-$(5)-$(6)-$(7)-$(8)-$(9)-$(10)-$(11)-$(12)$(13) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 690 | run_test_options := --output-path $(ART_HOST_TEST_DIR)/run-test-output/$$(run_test_rule_name) \ |
Ian Rogers | 5242c0a | 2014-07-18 11:02:19 -0700 | [diff] [blame] | 691 | $$(run_test_options) |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 692 | ifneq ($(ART_TEST_ANDROID_ROOT),) |
| 693 | run_test_options := --android-root $(ART_TEST_ANDROID_ROOT) $$(run_test_options) |
| 694 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 695 | $$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options) |
| 696 | .PHONY: $$(run_test_rule_name) |
Andreas Gampe | 3a91309 | 2015-01-10 00:26:17 -0800 | [diff] [blame] | 697 | $$(run_test_rule_name): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin $(HOST_OUT_EXECUTABLES)/smali $(HOST_OUT_EXECUTABLES)/dexmerger $(HOST_OUT_EXECUTABLES)/hprof-conv $$(prereq_rule) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 698 | $(hide) $$(call ART_TEST_SKIP,$$@) && \ |
| 699 | DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \ |
Andreas Gampe | 8fda9f2 | 2014-10-03 16:15:37 -0700 | [diff] [blame] | 700 | SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \ |
| 701 | DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 702 | art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(12) \ |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 703 | && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@) |
| 704 | $$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \ |
| 705 | echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \ |
| 706 | rm -r $(ART_HOST_TEST_DIR)) || true |
| 707 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 708 | $$(foreach test_group,$$(test_groups), $$(eval $$(value test_group) += $$(run_test_rule_name))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 709 | |
| 710 | # Clear locally defined variables. |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 711 | uc_host_or_target := |
| 712 | test_groups := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 713 | run_test_options := |
| 714 | run_test_rule_name := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 715 | prereq_rule := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 716 | endef # define-test-art-run-test |
| 717 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 718 | $(foreach target, $(TARGET_TYPES), \ |
| 719 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 720 | $(foreach run_type, $(RUN_TYPES), \ |
| 721 | $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \ |
| 722 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 723 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 724 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 725 | $(foreach trace, $(TRACE_TYPES), \ |
| 726 | $(foreach gc, $(GC_TYPES), \ |
| 727 | $(foreach jni, $(JNI_TYPES), \ |
| 728 | $(foreach image, $(IMAGE_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 729 | $(foreach pictest, $(PICTEST_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 730 | $(foreach debuggable, $(DEBUGGABLE_TYPES), \ |
| 731 | $(eval $(call define-test-art-run-test,$(target),$(run_type),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(pictest),$(debuggable),$(test),$(address_size))) \ |
| 732 | ))))))))))))) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 733 | define-test-art-run-test := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 734 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 735 | # Define a phony rule whose purpose is to test its prerequisites. |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 736 | # $(1): host or target |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 737 | # $(2): list of prerequisites |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 738 | define define-test-art-run-test-group |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 739 | .PHONY: $(1) |
| 740 | $(1): $(2) |
| 741 | $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@) |
| 742 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 743 | endef # define-test-art-run-test-group |
| 744 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 745 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 746 | $(foreach target, $(TARGET_TYPES), $(eval \ |
| 747 | $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES)))) |
| 748 | $(foreach target, $(TARGET_TYPES), \ |
| 749 | $(foreach prebuild, $(PREBUILD_TYPES), $(eval \ |
| 750 | $(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))))) |
| 751 | $(foreach target, $(TARGET_TYPES), \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 752 | $(foreach run-type, $(RUN_TYPES), $(eval \ |
| 753 | $(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))))) |
| 754 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 755 | $(foreach compiler, $(COMPILER_TYPES), $(eval \ |
| 756 | $(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))))) |
| 757 | $(foreach target, $(TARGET_TYPES), \ |
| 758 | $(foreach relocate, $(RELOCATE_TYPES), $(eval \ |
| 759 | $(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))))) |
| 760 | $(foreach target, $(TARGET_TYPES), \ |
| 761 | $(foreach trace, $(TRACE_TYPES), $(eval \ |
| 762 | $(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))))) |
| 763 | $(foreach target, $(TARGET_TYPES), \ |
| 764 | $(foreach gc, $(GC_TYPES), $(eval \ |
| 765 | $(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))))) |
| 766 | $(foreach target, $(TARGET_TYPES), \ |
| 767 | $(foreach jni, $(JNI_TYPES), $(eval \ |
| 768 | $(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))))) |
| 769 | $(foreach target, $(TARGET_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 770 | $(foreach debuggable, $(DEBUGGABLE_TYPES), $(eval \ |
| 771 | $(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))))) |
| 772 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 773 | $(foreach image, $(IMAGE_TYPES), $(eval \ |
| 774 | $(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))))) |
| 775 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 776 | $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \ |
| 777 | $(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))))) |
| 778 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 779 | $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \ |
Ian Rogers | a3cf6ce | 2014-10-02 16:35:52 -0700 | [diff] [blame] | 780 | $(call define-test-art-run-test-group,test-art-$(target)-run-test$(address_size),$(ART_RUN_TEST_$(call name-to-var,$(target))_$(address_size)_RULES))))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 781 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 782 | # Clear variables now we're finished with them. |
| 783 | $(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=)) |
| 784 | $(foreach target, $(TARGET_TYPES), \ |
| 785 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 786 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=))) |
| 787 | $(foreach target, $(TARGET_TYPES), \ |
| 788 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 789 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=))) |
| 790 | $(foreach target, $(TARGET_TYPES), \ |
| 791 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 792 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=))) |
| 793 | $(foreach target, $(TARGET_TYPES), \ |
| 794 | $(foreach trace, $(TRACE_TYPES), \ |
| 795 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=))) |
| 796 | $(foreach target, $(TARGET_TYPES), \ |
| 797 | $(foreach gc, $(GC_TYPES), \ |
| 798 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=))) |
| 799 | $(foreach target, $(TARGET_TYPES), \ |
| 800 | $(foreach jni, $(JNI_TYPES), \ |
| 801 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=))) |
| 802 | $(foreach target, $(TARGET_TYPES), \ |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 803 | $(foreach debuggable, $(DEBUGGABLE_TYPES), \ |
| 804 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(debuggable))_RULES :=))) |
| 805 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 806 | $(foreach image, $(IMAGE_TYPES), \ |
| 807 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=))) |
| 808 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 809 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
| 810 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=))) |
| 811 | $(foreach target, $(TARGET_TYPES), \ |
| 812 | $(foreach address_size, $(ALL_ADDRESS_SIZES), \ |
| 813 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 814 | $(foreach target, $(TARGET_TYPES), \ |
| 815 | $(foreach run_type, $(RUN_TYPES), \ |
| 816 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(run_type))_RULES :=))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 817 | define-test-art-run-test-group := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 818 | TARGET_TYPES := |
| 819 | PREBUILD_TYPES := |
| 820 | COMPILER_TYPES := |
| 821 | RELOCATE_TYPES := |
| 822 | TRACE_TYPES := |
| 823 | GC_TYPES := |
| 824 | JNI_TYPES := |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 825 | IMAGE_TYPES := |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 826 | ADDRESS_SIZES_TARGET := |
| 827 | ADDRESS_SIZES_HOST := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 828 | ALL_ADDRESS_SIZES := |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 829 | RUN_TYPES := |
Nicolas Geoffray | 43c162f | 2015-03-09 12:21:26 +0000 | [diff] [blame] | 830 | DEBUGGABLE_TYPES := |
Ian Rogers | 9fcaa4b | 2014-08-26 19:59:52 -0700 | [diff] [blame] | 831 | |
| 832 | include $(LOCAL_PATH)/Android.libarttest.mk |
| 833 | include art/test/Android.libnativebridgetest.mk |