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 |
| 87 | ifeq ($(ART_TEST_OPTIMIZING),true) |
| 88 | COMPILER_TYPES += optimizing |
| 89 | endif |
| 90 | RELOCATE_TYPES := relocate |
| 91 | ifeq ($(ART_TEST_RUN_TEST_NO_RELOCATE),true) |
| 92 | RELOCATE_TYPES += no-relocate |
| 93 | endif |
| 94 | ifeq ($(ART_TEST_RUN_TEST_RELOCATE_NO_PATCHOAT),true) |
| 95 | RELOCATE_TYPES := relocate-no-patchoat |
| 96 | endif |
| 97 | TRACE_TYPES := no-trace |
| 98 | ifeq ($(ART_TEST_TRACE),true) |
| 99 | TRACE_TYPES += trace |
| 100 | endif |
| 101 | GC_TYPES := cms |
Alex Light | 992f1e7 | 2014-08-27 16:08:57 -0700 | [diff] [blame] | 102 | ifeq ($(ART_TEST_GC_STRESS),true) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 103 | GC_TYPES += gcstress |
| 104 | endif |
Alex Light | 992f1e7 | 2014-08-27 16:08:57 -0700 | [diff] [blame] | 105 | ifeq ($(ART_TEST_GC_VERIFY),true) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 106 | GC_TYPES += gcverify |
| 107 | endif |
| 108 | JNI_TYPES := checkjni |
| 109 | ifeq ($(ART_TEST_JNI_FORCECOPY),true) |
| 110 | JNI_TYPES += forcecopy |
| 111 | endif |
| 112 | IMAGE_TYPES := image |
| 113 | ifeq ($(ART_TEST_RUN_TEST_NO_IMAGE),true) |
| 114 | IMAGE_TYPES += no-image |
| 115 | endif |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 116 | ifeq ($(ART_TEST_PIC_IMAGE),true) |
| 117 | IMAGE_TYPES += picimage |
| 118 | endif |
| 119 | PICTEST_TYPES := nopictest |
| 120 | ifeq ($(ART_TEST_PIC_TEST),true) |
| 121 | PICTEST_TYPES += pictest |
| 122 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 123 | RUN_TYPES := |
| 124 | ifeq ($(ART_TEST_RUN_TEST_DEBUG),true) |
| 125 | RUN_TYPES += debug |
| 126 | endif |
| 127 | ifeq ($(ART_TEST_RUN_TEST_NDEBUG),true) |
| 128 | RUN_TYPES += ndebug |
| 129 | endif |
Nicolas Geoffray | 41bb331 | 2014-10-24 13:49:08 +0100 | [diff] [blame] | 130 | ADDRESS_SIZES_TARGET := $(ART_PHONY_TEST_TARGET_SUFFIX) |
| 131 | ADDRESS_SIZES_HOST := $(ART_PHONY_TEST_HOST_SUFFIX) |
| 132 | ifeq ($(ART_TEST_RUN_TEST_2ND_ARCH),true) |
| 133 | ADDRESS_SIZES_TARGET += $(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
| 134 | ADDRESS_SIZES_HOST += $(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
| 135 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 136 | ALL_ADDRESS_SIZES := 64 32 |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 137 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 138 | # List all run test names with number arguments agreeing with the comment above. |
| 139 | define all-run-test-names |
| 140 | $(foreach target, $(1), \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 141 | $(foreach run-type, $(2), \ |
| 142 | $(foreach prebuild, $(3), \ |
| 143 | $(foreach compiler, $(4), \ |
| 144 | $(foreach relocate, $(5), \ |
| 145 | $(foreach trace, $(6), \ |
| 146 | $(foreach gc, $(7), \ |
| 147 | $(foreach jni, $(8), \ |
| 148 | $(foreach image, $(9), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 149 | $(foreach pictest, $(10), \ |
| 150 | $(foreach test, $(11), \ |
| 151 | $(foreach address_size, $(12), \ |
| 152 | test-art-$(target)-run-test-$(run-type)-$(prebuild)-$(compiler)-$(relocate)-$(trace)-$(gc)-$(jni)-$(image)-$(pictest)-$(test)$(address_size) \ |
| 153 | )))))))))))) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 154 | endef # all-run-test-names |
| 155 | |
| 156 | # To generate a full list or tests: |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 157 | # $(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] | 158 | # $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
| 159 | # $(TEST_ART_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 160 | |
| 161 | # Convert's a rule name to the form used in variables, e.g. no-relocate to NO_RELOCATE |
| 162 | define name-to-var |
| 163 | $(shell echo $(1) | tr '[:lower:]' '[:upper:]' | tr '-' '_') |
| 164 | endef # name-to-var |
| 165 | |
| 166 | # Tests that are timing sensitive and flaky on heavily loaded systems. |
| 167 | TEST_ART_TIMING_SENSITIVE_RUN_TESTS := \ |
| 168 | 053-wait-some \ |
| 169 | 055-enum-performance |
| 170 | |
| 171 | # disable timing sensitive tests on "dist" builds. |
| 172 | ifdef dist_goal |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 173 | 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] | 174 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 175 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(TEST_ART_TIMING_SENSITIVE_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 176 | endif |
| 177 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 178 | TEST_ART_TIMING_SENSITIVE_RUN_TESTS := |
| 179 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 180 | # 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] | 181 | TEST_ART_BROKEN_PREBUILD_RUN_TESTS := \ |
| 182 | 116-nodex2oat |
| 183 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 184 | ifneq (,$(filter prebuild,$(PREBUILD_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 185 | 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] | 186 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 187 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(TEST_ART_BROKEN_PREBUILD_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 188 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 189 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 190 | TEST_ART_BROKEN_PREBUILD_RUN_TESTS := |
| 191 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 192 | TEST_ART_BROKEN_NO_PREBUILD_TESTS := \ |
| 193 | 117-nopatchoat |
| 194 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 195 | ifneq (,$(filter no-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),no-prebuild, \ |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 197 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 198 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(TEST_ART_BROKEN_NO_PREBUILD_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_NO_PREBUILD_TESTS := |
| 202 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 203 | # Note 117-nopatchoat is not broken per-se it just doesn't work (and isn't meant to) without |
| 204 | # --prebuild --relocate |
| 205 | TEST_ART_BROKEN_NO_RELOCATE_TESTS := \ |
| 206 | 117-nopatchoat |
| 207 | |
| 208 | ifneq (,$(filter no-relocate,$(RELOCATE_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 209 | 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] | 210 | $(COMPILER_TYPES), no-relocate,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 211 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(TEST_ART_BROKEN_NO_RELOCATE_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 212 | endif |
| 213 | |
| 214 | TEST_ART_BROKEN_NO_RELOCATE_TESTS := |
| 215 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 216 | # Tests that are broken with GC stress. |
| 217 | TEST_ART_BROKEN_GCSTRESS_RUN_TESTS := \ |
Ian Rogers | 58920cc | 2014-10-10 12:39:31 -0700 | [diff] [blame] | 218 | 004-SignalTest \ |
| 219 | 114-ParallelGC |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 220 | |
| 221 | ifneq (,$(filter gcstress,$(GC_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),$(RELOCATE_TYPES),$(TRACE_TYPES),gcstress,$(JNI_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 224 | $(IMAGE_TYPES), $(PICTEST_TYPES), $(TEST_ART_BROKEN_GCSTRESS_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 225 | endif |
| 226 | |
| 227 | TEST_ART_BROKEN_GCSTRESS_RUN_TESTS := |
| 228 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 229 | # 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] | 230 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 231 | $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),$(PICTEST_TYPES),115-native-bridge, \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 232 | $(ALL_ADDRESS_SIZES)) |
| 233 | |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 234 | # All these tests check that we have sane behavior if we don't have a patchoat or dex2oat. |
| 235 | # Therefore we shouldn't run them in situations where we actually don't have these since they |
| 236 | # explicitly test for them. These all also assume we have an image. |
| 237 | TEST_ART_BROKEN_FALLBACK_RUN_TESTS := \ |
| 238 | 116-nodex2oat \ |
| 239 | 117-nopatchoat \ |
| 240 | 118-noimage-dex2oat \ |
| 241 | 119-noimage-patchoat |
| 242 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 243 | ifneq (,$(filter no-dex2oat,$(PREBUILD_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 244 | 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] | 245 | $(COMPILER_TYPES),$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 246 | $(PICTEST_TYPES),$(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 247 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 248 | |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 249 | |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 250 | ifneq (,$(filter no-image,$(IMAGE_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 251 | 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] | 252 | $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 253 | $(PICTEST_TYPES), $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 254 | endif |
| 255 | |
| 256 | ifneq (,$(filter relocate-no-patchoat,$(RELOCATE_TYPES))) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 257 | 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] | 258 | $(COMPILER_TYPES), relocate-no-patchoat,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 259 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Ian Rogers | 40e1912 | 2014-09-02 15:59:28 -0700 | [diff] [blame] | 260 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 261 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 262 | TEST_ART_BROKEN_FALLBACK_RUN_TESTS := |
| 263 | |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 264 | # The following tests use libarttest.so, which is linked against libartd.so, so will |
| 265 | # not work when libart.so is the one loaded. |
| 266 | # TODO: Find a way to run these tests in ndebug mode. |
| 267 | TEST_ART_BROKEN_NDEBUG_TESTS := \ |
| 268 | 004-JniTest \ |
| 269 | 004-ReferenceMap \ |
| 270 | 004-SignalTest \ |
| 271 | 004-StackWalk \ |
| 272 | 004-UnsafeTest \ |
Nicolas Geoffray | 64dea7e | 2014-11-07 14:32:42 +0000 | [diff] [blame] | 273 | 051-thread \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 274 | 115-native-bridge \ |
| 275 | 116-nodex2oat \ |
| 276 | 117-nopatchoat \ |
| 277 | 118-noimage-dex2oat \ |
| 278 | 119-noimage-patchoat \ |
| 279 | |
| 280 | ifneq (,$(filter ndebug,$(RUN_TYPES))) |
| 281 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),ndebug,$(PREBUILD_TYPES), \ |
| 282 | $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 283 | $(PICTEST_TYPES),$(TEST_ART_BROKEN_NDEBUG_TESTS),$(ALL_ADDRESS_SIZES)) |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 284 | endif |
| 285 | |
| 286 | TEST_ART_BROKEN_NDEBUG_TESTS := |
| 287 | |
Nicolas Geoffray | a3d05a4 | 2014-10-20 17:41:32 +0100 | [diff] [blame] | 288 | # Known broken tests for the default compiler (Quick). |
Serguei Katkov | 2750354 | 2014-11-06 14:45:44 +0600 | [diff] [blame] | 289 | TEST_ART_BROKEN_DEFAULT_RUN_TESTS := |
Nicolas Geoffray | a3d05a4 | 2014-10-20 17:41:32 +0100 | [diff] [blame] | 290 | |
| 291 | ifneq (,$(filter default,$(COMPILER_TYPES))) |
| 292 | 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] | 293 | default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 294 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(TEST_ART_BROKEN_DEFAULT_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
Nicolas Geoffray | a3d05a4 | 2014-10-20 17:41:32 +0100 | [diff] [blame] | 295 | endif |
| 296 | |
| 297 | TEST_ART_BROKEN_DEFAULT_RUN_TESTS := |
| 298 | |
Alexandre Rames | 5319def | 2014-10-23 10:03:10 +0100 | [diff] [blame] | 299 | # Known broken tests for the arm64 optimizing compiler backend. |
| 300 | TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS := \ |
Alexandre Rames | 3e69f16 | 2014-12-10 10:36:50 +0000 | [diff] [blame] | 301 | 003-omnibus-opcodes64 \ |
| 302 | 012-math64 \ |
| 303 | 436-rem-float64 |
Alexandre Rames | 5319def | 2014-10-23 10:03:10 +0100 | [diff] [blame] | 304 | |
| 305 | ifneq (,$(filter optimizing,$(COMPILER_TYPES))) |
| 306 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 307 | optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 308 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS),64) |
Alexandre Rames | 5319def | 2014-10-23 10:03:10 +0100 | [diff] [blame] | 309 | endif |
| 310 | |
| 311 | TEST_ART_BROKEN_OPTIMIZING_ARM64_RUN_TESTS := |
| 312 | |
Nicolas Geoffray | 19a19cf | 2014-10-22 16:07:05 +0100 | [diff] [blame] | 313 | # Known broken tests for the optimizing compiler. |
| 314 | TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS := \ |
| 315 | 099-vmdebug \ # b/18098594 |
| 316 | |
| 317 | ifneq (,$(filter optimizing,$(COMPILER_TYPES))) |
| 318 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 319 | optimizing,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
| 320 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
| 321 | endif |
| 322 | |
Nicolas Geoffray | 5d672a6 | 2014-12-04 14:39:31 +0000 | [diff] [blame] | 323 | # If ART_USE_OPTIMIZING_COMPILER is set to true, then the default core.art has been |
| 324 | # compiled with the optimizing compiler. |
| 325 | ifeq ($(ART_USE_OPTIMIZING_COMPILER),true) |
| 326 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(RUN_TYPES),$(PREBUILD_TYPES), \ |
| 327 | default,$(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
| 328 | $(IMAGE_TYPES),$(PICTEST_TYPES),$(TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
| 329 | endif |
| 330 | |
Nicolas Geoffray | 19a19cf | 2014-10-22 16:07:05 +0100 | [diff] [blame] | 331 | TEST_ART_BROKEN_OPTIMIZING_RUN_TESTS := |
| 332 | |
Alexandre Rames | 5319def | 2014-10-23 10:03:10 +0100 | [diff] [blame] | 333 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 334 | # Clear variables ahead of appending to them when defining tests. |
| 335 | $(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=)) |
| 336 | $(foreach target, $(TARGET_TYPES), \ |
| 337 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 338 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=))) |
| 339 | $(foreach target, $(TARGET_TYPES), \ |
| 340 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 341 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=))) |
| 342 | $(foreach target, $(TARGET_TYPES), \ |
| 343 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 344 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=))) |
| 345 | $(foreach target, $(TARGET_TYPES), \ |
| 346 | $(foreach trace, $(TRACE_TYPES), \ |
| 347 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=))) |
| 348 | $(foreach target, $(TARGET_TYPES), \ |
| 349 | $(foreach gc, $(GC_TYPES), \ |
| 350 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=))) |
| 351 | $(foreach target, $(TARGET_TYPES), \ |
| 352 | $(foreach jni, $(JNI_TYPES), \ |
| 353 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=))) |
| 354 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 355 | $(foreach image, $(IMAGE_TYPES), \ |
| 356 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=))) |
| 357 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 358 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
| 359 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=))) |
| 360 | $(foreach target, $(TARGET_TYPES), \ |
| 361 | $(foreach address_size, $(ALL_ADDRESS_SIZES), \ |
| 362 | $(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] | 363 | $(foreach target, $(TARGET_TYPES), \ |
| 364 | $(foreach run_type, $(RUN_TYPES), \ |
| 365 | $(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] | 366 | |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 367 | # We need dex2oat and dalvikvm on the target as well as the core images (all images as we sync |
| 368 | # only once). |
| 369 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_EXECUTABLES) $(TARGET_CORE_IMG_OUTS) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 370 | |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 371 | # Also need libarttest. |
| 372 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so |
| 373 | ifdef TARGET_2ND_ARCH |
| 374 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so |
| 375 | endif |
| 376 | |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 377 | # Also need libnativebridgetest. |
| 378 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so |
| 379 | ifdef TARGET_2ND_ARCH |
| 380 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so |
| 381 | endif |
| 382 | |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 383 | # All tests require the host executables. The tests also depend on the core images, but on |
| 384 | # specific version depending on the compiler. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 385 | ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \ |
| 386 | $(ART_HOST_EXECUTABLES) \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 387 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 388 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 389 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 390 | |
| 391 | ifneq ($(HOST_PREFER_32_BIT),true) |
| 392 | ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 393 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 394 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 395 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 396 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 397 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 398 | # Create a rule to build and run a tests following the form: |
Calin Juravle | 9228b2a | 2014-10-22 15:54:34 +0100 | [diff] [blame] | 399 | # test-art-{1: host or target}-run-test-{2: debug ndebug}-{3: prebuild no-prebuild no-dex2oat}- |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 400 | # {4: interpreter default optimizing}-{5: relocate no-relocate relocate-no-patchoat}- |
| 401 | # {6: trace or no-trace}-{7: gcstress gcverify cms}-{8: forcecopy checkjni jni}- |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 402 | # {9: no-image image picimage}-{10: pictest nopictest}-{11: test name}{12: 32 or 64} |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 403 | define define-test-art-run-test |
Nicolas Geoffray | 611e1db | 2014-10-09 17:34:45 +0100 | [diff] [blame] | 404 | run_test_options := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 405 | prereq_rule := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 406 | test_groups := |
| 407 | uc_host_or_target := |
Alex Light | bfac14a | 2014-07-30 09:41:21 -0700 | [diff] [blame] | 408 | ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true) |
| 409 | run_test_options += --always-clean |
| 410 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 411 | ifeq ($(1),host) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 412 | uc_host_or_target := HOST |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 413 | test_groups := ART_RUN_TEST_HOST_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 414 | run_test_options += --host |
| 415 | prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) |
| 416 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 417 | ifeq ($(1),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 418 | uc_host_or_target := TARGET |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 419 | test_groups := ART_RUN_TEST_TARGET_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 420 | prereq_rule := test-art-target-sync |
| 421 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 422 | $$(error found $(1) expected $(TARGET_TYPES)) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 423 | endif |
| 424 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 425 | ifeq ($(2),debug) |
| 426 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEBUG_RULES |
| 427 | else |
| 428 | ifeq ($(2),ndebug) |
| 429 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELEASE_RULES |
| 430 | run_test_options += -O |
| 431 | else |
| 432 | $$(error found $(2) expected $(RUN_TYPES)) |
| 433 | endif |
| 434 | endif |
| 435 | ifeq ($(3),prebuild) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 436 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES |
| 437 | run_test_options += --prebuild |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 438 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 439 | ifeq ($(3),no-prebuild) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 440 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES |
| 441 | run_test_options += --no-prebuild |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 442 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 443 | ifeq ($(3),no-dex2oat) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 444 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES |
| 445 | run_test_options += --no-prebuild --no-dex2oat |
| 446 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 447 | $$(error found $(3) expected $(PREBUILD_TYPES)) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 448 | endif |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 449 | endif |
| 450 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 451 | ifeq ($(4),optimizing) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 452 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 453 | run_test_options += --optimizing |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 454 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 455 | ifeq ($(4),interpreter) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 456 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 457 | run_test_options += --interpreter |
| 458 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 459 | ifeq ($(4),default) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 460 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEFAULT_RULES |
Nicolas Geoffray | c9338b9 | 2014-12-03 13:36:10 +0000 | [diff] [blame] | 461 | run_test_options += --quick |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 462 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 463 | $$(error found $(4) expected $(COMPILER_TYPES)) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 464 | endif |
| 465 | endif |
| 466 | endif |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 467 | |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 468 | ifeq ($(5),relocate) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 469 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES |
| 470 | run_test_options += --relocate |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 471 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 472 | ifeq ($(5),no-relocate) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 473 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES |
| 474 | run_test_options += --no-relocate |
| 475 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 476 | ifeq ($(5),relocate-no-patchoat) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 477 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES |
| 478 | run_test_options += --relocate --no-patchoat |
| 479 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 480 | $$(error found $(5) expected $(RELOCATE_TYPES)) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 481 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 482 | endif |
| 483 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 484 | ifeq ($(6),trace) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 485 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 486 | run_test_options += --trace |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 487 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 488 | ifeq ($(6),no-trace) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 489 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES |
Ian Rogers | 701aa64 | 2014-07-18 11:38:13 -0700 | [diff] [blame] | 490 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 491 | $$(error found $(6) expected $(TRACE_TYPES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 492 | endif |
| 493 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 494 | ifeq ($(7),gcverify) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 495 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 496 | run_test_options += --gcverify |
| 497 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 498 | ifeq ($(7),gcstress) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 499 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 500 | run_test_options += --gcstress |
| 501 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 502 | ifeq ($(7),cms) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 503 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES |
Ian Rogers | 8a14b75 | 2014-07-18 15:06:53 -0700 | [diff] [blame] | 504 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 505 | $$(error found $(7) expected $(GC_TYPES)) |
Ian Rogers | 701aa64 | 2014-07-18 11:38:13 -0700 | [diff] [blame] | 506 | endif |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 507 | endif |
| 508 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 509 | ifeq ($(8),forcecopy) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 510 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 511 | run_test_options += --runtime-option -Xjniopts:forcecopy |
| 512 | ifneq ($$(ART_TEST_JNI_FORCECOPY),true) |
| 513 | skip_test := true |
| 514 | endif |
| 515 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 516 | ifeq ($(8),checkjni) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 517 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 518 | run_test_options += --runtime-option -Xcheck:jni |
| 519 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 520 | ifeq ($(8),jni) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 521 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES |
| 522 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 523 | $$(error found $(8) expected $(JNI_TYPES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 524 | endif |
| 525 | endif |
| 526 | endif |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 527 | ifeq ($(9),no-image) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 528 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES |
| 529 | run_test_options += --no-image |
Andreas Gampe | bf03e84 | 2014-10-29 20:46:17 -0700 | [diff] [blame] | 530 | # Add the core dependency. This is required for pre-building. |
| 531 | ifeq ($(1),host) |
| 532 | prereq_rule += $(HOST_CORE_IMAGE_$(4)_no-pic_$(12)) |
| 533 | else |
| 534 | prereq_rule += $(TARGET_CORE_IMAGE_$(4)_no-pic_$(12)) |
| 535 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 536 | else |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 537 | ifeq ($(9),image) |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 538 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 539 | # Add the core dependency. |
| 540 | ifeq ($(1),host) |
| 541 | prereq_rule += $(HOST_CORE_IMAGE_$(4)_no-pic_$(12)) |
| 542 | else |
| 543 | prereq_rule += $(TARGET_CORE_IMAGE_$(4)_no-pic_$(12)) |
| 544 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 545 | else |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 546 | ifeq ($(9),picimage) |
| 547 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PICIMAGE_RULES |
| 548 | run_test_options += --pic-image |
| 549 | ifeq ($(1),host) |
| 550 | prereq_rule += $(HOST_CORE_IMAGE_$(4)_pic_$(12)) |
| 551 | else |
| 552 | prereq_rule += $(TARGET_CORE_IMAGE_$(4)_pic_$(12)) |
| 553 | endif |
| 554 | else |
| 555 | $$(error found $(9) expected $(IMAGE_TYPES)) |
| 556 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 557 | endif |
| 558 | endif |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 559 | ifeq ($(10),pictest) |
| 560 | run_test_options += --pic-test |
| 561 | else |
| 562 | ifeq ($(10),nopictest) |
| 563 | # Nothing to be done. |
| 564 | else |
| 565 | $$(error found $(10) expected $(PICTEST_TYPES)) |
| 566 | endif |
| 567 | endif |
| 568 | # $(11) is the test name |
| 569 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(11))_RULES |
| 570 | ifeq ($(12),64) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 571 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES |
| 572 | run_test_options += --64 |
| 573 | else |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 574 | ifeq ($(12),32) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 575 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES |
| 576 | else |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 577 | $$(error found $(12) expected $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 578 | endif |
| 579 | endif |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 580 | run_test_rule_name := test-art-$(1)-run-test-$(2)-$(3)-$(4)-$(5)-$(6)-$(7)-$(8)-$(9)-$(10)-$(11)$(12) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 581 | 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] | 582 | $$(run_test_options) |
Nicolas Geoffray | c8f23fc | 2014-10-28 17:59:47 +0000 | [diff] [blame] | 583 | ifneq ($(ART_TEST_ANDROID_ROOT),) |
| 584 | run_test_options := --android-root $(ART_TEST_ANDROID_ROOT) $$(run_test_options) |
| 585 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 586 | $$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options) |
| 587 | .PHONY: $$(run_test_rule_name) |
Andreas Gampe | 8fda9f2 | 2014-10-03 16:15:37 -0700 | [diff] [blame] | 588 | $$(run_test_rule_name): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin $(HOST_OUT_EXECUTABLES)/smali $(HOST_OUT_EXECUTABLES)/dexmerger $$(prereq_rule) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 589 | $(hide) $$(call ART_TEST_SKIP,$$@) && \ |
| 590 | DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \ |
Andreas Gampe | 8fda9f2 | 2014-10-03 16:15:37 -0700 | [diff] [blame] | 591 | SMALI=$(abspath $(HOST_OUT_EXECUTABLES)/smali) \ |
| 592 | DXMERGER=$(abspath $(HOST_OUT_EXECUTABLES)/dexmerger) \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 593 | art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(11) \ |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 594 | && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@) |
| 595 | $$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \ |
| 596 | echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \ |
| 597 | rm -r $(ART_HOST_TEST_DIR)) || true |
| 598 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 599 | $$(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] | 600 | |
| 601 | # Clear locally defined variables. |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 602 | uc_host_or_target := |
| 603 | test_groups := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 604 | run_test_options := |
| 605 | run_test_rule_name := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 606 | prereq_rule := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 607 | endef # define-test-art-run-test |
| 608 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 609 | $(foreach target, $(TARGET_TYPES), \ |
| 610 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 611 | $(foreach run_type, $(RUN_TYPES), \ |
| 612 | $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \ |
| 613 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 614 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 615 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 616 | $(foreach trace, $(TRACE_TYPES), \ |
| 617 | $(foreach gc, $(GC_TYPES), \ |
| 618 | $(foreach jni, $(JNI_TYPES), \ |
| 619 | $(foreach image, $(IMAGE_TYPES), \ |
Andreas Gampe | c23c9c9 | 2014-10-28 14:47:25 -0700 | [diff] [blame] | 620 | $(foreach pictest, $(PICTEST_TYPES), \ |
| 621 | $(eval $(call define-test-art-run-test,$(target),$(run_type),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(pictest),$(test),$(address_size))) \ |
| 622 | )))))))))))) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 623 | define-test-art-run-test := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 624 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 625 | # Define a phony rule whose purpose is to test its prerequisites. |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 626 | # $(1): host or target |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 627 | # $(2): list of prerequisites |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 628 | define define-test-art-run-test-group |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 629 | .PHONY: $(1) |
| 630 | $(1): $(2) |
| 631 | $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@) |
| 632 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 633 | endef # define-test-art-run-test-group |
| 634 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 635 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 636 | $(foreach target, $(TARGET_TYPES), $(eval \ |
| 637 | $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES)))) |
| 638 | $(foreach target, $(TARGET_TYPES), \ |
| 639 | $(foreach prebuild, $(PREBUILD_TYPES), $(eval \ |
| 640 | $(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))))) |
| 641 | $(foreach target, $(TARGET_TYPES), \ |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 642 | $(foreach run-type, $(RUN_TYPES), $(eval \ |
| 643 | $(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))))) |
| 644 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 645 | $(foreach compiler, $(COMPILER_TYPES), $(eval \ |
| 646 | $(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))))) |
| 647 | $(foreach target, $(TARGET_TYPES), \ |
| 648 | $(foreach relocate, $(RELOCATE_TYPES), $(eval \ |
| 649 | $(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))))) |
| 650 | $(foreach target, $(TARGET_TYPES), \ |
| 651 | $(foreach trace, $(TRACE_TYPES), $(eval \ |
| 652 | $(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))))) |
| 653 | $(foreach target, $(TARGET_TYPES), \ |
| 654 | $(foreach gc, $(GC_TYPES), $(eval \ |
| 655 | $(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))))) |
| 656 | $(foreach target, $(TARGET_TYPES), \ |
| 657 | $(foreach jni, $(JNI_TYPES), $(eval \ |
| 658 | $(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))))) |
| 659 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 660 | $(foreach image, $(IMAGE_TYPES), $(eval \ |
| 661 | $(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))))) |
| 662 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 663 | $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \ |
| 664 | $(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))))) |
| 665 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 666 | $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \ |
Ian Rogers | a3cf6ce | 2014-10-02 16:35:52 -0700 | [diff] [blame] | 667 | $(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] | 668 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 669 | # Clear variables now we're finished with them. |
| 670 | $(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=)) |
| 671 | $(foreach target, $(TARGET_TYPES), \ |
| 672 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 673 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=))) |
| 674 | $(foreach target, $(TARGET_TYPES), \ |
| 675 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 676 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=))) |
| 677 | $(foreach target, $(TARGET_TYPES), \ |
| 678 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 679 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=))) |
| 680 | $(foreach target, $(TARGET_TYPES), \ |
| 681 | $(foreach trace, $(TRACE_TYPES), \ |
| 682 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=))) |
| 683 | $(foreach target, $(TARGET_TYPES), \ |
| 684 | $(foreach gc, $(GC_TYPES), \ |
| 685 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=))) |
| 686 | $(foreach target, $(TARGET_TYPES), \ |
| 687 | $(foreach jni, $(JNI_TYPES), \ |
| 688 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=))) |
| 689 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 690 | $(foreach image, $(IMAGE_TYPES), \ |
| 691 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=))) |
| 692 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 693 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
| 694 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=))) |
| 695 | $(foreach target, $(TARGET_TYPES), \ |
| 696 | $(foreach address_size, $(ALL_ADDRESS_SIZES), \ |
| 697 | $(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] | 698 | $(foreach target, $(TARGET_TYPES), \ |
| 699 | $(foreach run_type, $(RUN_TYPES), \ |
| 700 | $(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] | 701 | define-test-art-run-test-group := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 702 | TARGET_TYPES := |
| 703 | PREBUILD_TYPES := |
| 704 | COMPILER_TYPES := |
| 705 | RELOCATE_TYPES := |
| 706 | TRACE_TYPES := |
| 707 | GC_TYPES := |
| 708 | JNI_TYPES := |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 709 | IMAGE_TYPES := |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 710 | ADDRESS_SIZES_TARGET := |
| 711 | ADDRESS_SIZES_HOST := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 712 | ALL_ADDRESS_SIZES := |
Nicolas Geoffray | bd2c63c | 2014-10-16 18:04:12 +0100 | [diff] [blame] | 713 | RUN_TYPES := |
Ian Rogers | 9fcaa4b | 2014-08-26 19:59:52 -0700 | [diff] [blame] | 714 | |
| 715 | include $(LOCAL_PATH)/Android.libarttest.mk |
| 716 | include art/test/Android.libnativebridgetest.mk |