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 |
| 39 | $$(dmart_target): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin |
| 40 | $(hide) rm -rf $$(dir $$@) && mkdir -p $$(dir $$@) |
| 41 | $(hide) DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \ |
| 42 | $(LOCAL_PATH)/run-test --build-only --output-path $$(abspath $$(dir $$@)) $(1) |
| 43 | $(hide) touch $$@ |
| 44 | |
| 45 | TEST_ART_RUN_TEST_BUILD_RULES += $$(dmart_target) |
| 46 | dmart_target := |
| 47 | endef |
Ian Rogers | bf66bce | 2014-06-24 23:15:34 -0700 | [diff] [blame] | 48 | $(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] | 49 | |
| 50 | include $(CLEAR_VARS) |
| 51 | LOCAL_MODULE_TAGS := tests |
| 52 | LOCAL_MODULE := art-run-tests |
| 53 | LOCAL_ADDITIONAL_DEPENDENCIES := $(TEST_ART_RUN_TEST_BUILD_RULES) |
| 54 | # The build system use this flag to pick up files generated by declare-make-art-run-test. |
| 55 | LOCAL_PICKUP_FILES := $(art_run_tests_dir) |
| 56 | |
| 57 | include $(BUILD_PHONY_PACKAGE) |
| 58 | |
| 59 | # Clear temp vars. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 60 | art_run_tests_dir := |
| 61 | define-build-art-run-test := |
Ian Rogers | 8a14b75 | 2014-07-18 15:06:53 -0700 | [diff] [blame] | 62 | TEST_ART_RUN_TEST_BUILD_RULES := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 63 | |
| 64 | ######################################################################## |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 65 | # General rules to build and run a run-test. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 66 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 67 | # Test rule names or of the form: |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 68 | # test-art-{1: host or target}-run-test-{2: prebuild no-prebuild no-dex2oat}- |
| 69 | # {3: interpreter default optimizing}-{4: relocate no-relocate relocate-no-patchoat}- |
| 70 | # {5: trace or no-trace}-{6: gcstress gcverify cms}-{7: forcecopy checkjni jni}- |
| 71 | # {8: no-image or image}-{9: test name}{10: 32 or 64} |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 72 | TARGET_TYPES := host target |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 73 | PREBUILD_TYPES := prebuild |
| 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 |
| 102 | ifeq ($(ART_TEST_GCSTRESS),true) |
| 103 | GC_TYPES += gcstress |
| 104 | endif |
| 105 | ifeq ($(ART_TEST_GCVERIFY),true) |
| 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 |
| 116 | ADDRESS_SIZES_TARGET := $(ART_PHONY_TEST_TARGET_SUFFIX) $(2ND_ART_PHONY_TEST_TARGET_SUFFIX) |
| 117 | ADDRESS_SIZES_HOST := $(ART_PHONY_TEST_HOST_SUFFIX) $(2ND_ART_PHONY_TEST_HOST_SUFFIX) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 118 | ALL_ADDRESS_SIZES := 64 32 |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 119 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 120 | # List all run test names with number arguments agreeing with the comment above. |
| 121 | define all-run-test-names |
| 122 | $(foreach target, $(1), \ |
| 123 | $(foreach prebuild, $(2), \ |
| 124 | $(foreach compiler, $(3), \ |
| 125 | $(foreach relocate, $(4), \ |
| 126 | $(foreach trace, $(5), \ |
| 127 | $(foreach gc, $(6), \ |
| 128 | $(foreach jni, $(7), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 129 | $(foreach image, $(8), \ |
| 130 | $(foreach test, $(9), \ |
| 131 | $(foreach address_size, $(10), \ |
| 132 | test-art-$(target)-run-test-$(prebuild)-$(compiler)-$(relocate)-$(trace)-$(gc)-$(jni)-$(image)-$(test)$(address_size) \ |
| 133 | )))))))))) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 134 | endef # all-run-test-names |
| 135 | |
| 136 | # To generate a full list or tests: |
| 137 | # $(call all-run-test-names,$(TARGET_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \ |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 138 | # $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
| 139 | # $(TEST_ART_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 140 | |
| 141 | # Convert's a rule name to the form used in variables, e.g. no-relocate to NO_RELOCATE |
| 142 | define name-to-var |
| 143 | $(shell echo $(1) | tr '[:lower:]' '[:upper:]' | tr '-' '_') |
| 144 | endef # name-to-var |
| 145 | |
| 146 | # Tests that are timing sensitive and flaky on heavily loaded systems. |
| 147 | TEST_ART_TIMING_SENSITIVE_RUN_TESTS := \ |
| 148 | 053-wait-some \ |
| 149 | 055-enum-performance |
| 150 | |
| 151 | # disable timing sensitive tests on "dist" builds. |
| 152 | ifdef dist_goal |
| 153 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(PREBUILD_TYPES), \ |
| 154 | $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 155 | $(IMAGE_TYPES), $(TEST_ART_TIMING_SENSITIVE_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 156 | endif |
| 157 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 158 | TEST_ART_TIMING_SENSITIVE_RUN_TESTS := |
| 159 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 160 | # NB 116-nodex2oat is not broken per-se it just doesn't (and isn't meant to) work with --prebuild. |
| 161 | TEST_ART_BROKEN_PREBUILD_RUN_TESTS := \ |
| 162 | 116-nodex2oat |
| 163 | |
| 164 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),prebuild, \ |
| 165 | $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Ian Rogers | 9fcaa4b | 2014-08-26 19:59:52 -0700 | [diff] [blame] | 166 | $(IMAGE_TYPES), $(TEST_ART_BROKEN_PREBUILD_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 167 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 168 | TEST_ART_BROKEN_PREBUILD_RUN_TESTS := |
| 169 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 170 | # NB 117-nopatchoat is not broken per-se it just doesn't work (and isn't meant to) without --prebuild --relocate |
| 171 | TEST_ART_BROKEN_NO_RELOCATE_TESTS := \ |
| 172 | 117-nopatchoat |
| 173 | |
| 174 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(PREBUILD_TYPES), \ |
| 175 | $(COMPILER_TYPES), no-relocate,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Ian Rogers | 9fcaa4b | 2014-08-26 19:59:52 -0700 | [diff] [blame] | 176 | $(IMAGE_TYPES), $(TEST_ART_BROKEN_NO_RELOCATE_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 177 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 178 | TEST_ART_BROKEN_NO_RELOCATE_TESTS := |
| 179 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 180 | TEST_ART_BROKEN_NO_PREBUILD_TESTS := \ |
| 181 | 117-nopatchoat |
| 182 | |
| 183 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),no-prebuild, \ |
| 184 | $(COMPILER_TYPES), $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES), \ |
Ian Rogers | 9fcaa4b | 2014-08-26 19:59:52 -0700 | [diff] [blame] | 185 | $(IMAGE_TYPES), $(TEST_ART_BROKEN_NO_PREBUILD_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 186 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 187 | TEST_ART_BROKEN_NO_PREBUILD_TESTS := |
| 188 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 189 | # Tests that are broken with tracing. |
| 190 | TEST_ART_BROKEN_TRACE_RUN_TESTS := \ |
| 191 | 004-SignalTest \ |
| 192 | 018-stack-overflow \ |
| 193 | 097-duplicate-method \ |
| 194 | 107-int-math2 |
| 195 | |
| 196 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(PREBUILD_TYPES), \ |
| 197 | $(COMPILER_TYPES), $(RELOCATE_TYPES),trace,$(GC_TYPES),$(JNI_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 198 | $(IMAGE_TYPES), $(TEST_ART_BROKEN_TRACE_RUN_TESTS), $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 199 | |
| 200 | TEST_ART_BROKEN_TRACE_RUN_TESTS := |
| 201 | |
| 202 | # 115-native-bridge setup is complicated. Need to implement it correctly for the target. |
| 203 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,target,$(PREBUILD_TYPES),$(COMPILER_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 204 | $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES),115-native-bridge, \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 205 | $(ALL_ADDRESS_SIZES)) |
| 206 | |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 207 | # All these tests check that we have sane behavior if we don't have a patchoat or dex2oat. |
| 208 | # Therefore we shouldn't run them in situations where we actually don't have these since they |
| 209 | # explicitly test for them. These all also assume we have an image. |
| 210 | TEST_ART_BROKEN_FALLBACK_RUN_TESTS := \ |
| 211 | 116-nodex2oat \ |
| 212 | 117-nopatchoat \ |
| 213 | 118-noimage-dex2oat \ |
| 214 | 119-noimage-patchoat |
| 215 | |
| 216 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),no-dex2oat,$(COMPILER_TYPES), \ |
| 217 | $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
| 218 | $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
| 219 | |
| 220 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \ |
| 221 | $(RELOCATE_TYPES),$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),no-image, \ |
| 222 | $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
| 223 | |
| 224 | ART_TEST_KNOWN_BROKEN += $(call all-run-test-names,$(TARGET_TYPES),$(PREBUILD_TYPES),$(COMPILER_TYPES), \ |
| 225 | relocate-no-patchoat,$(TRACE_TYPES),$(GC_TYPES),$(JNI_TYPES),$(IMAGE_TYPES), \ |
| 226 | $(TEST_ART_BROKEN_FALLBACK_RUN_TESTS),$(ALL_ADDRESS_SIZES)) |
| 227 | |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 228 | TEST_ART_BROKEN_FALLBACK_RUN_TESTS := |
| 229 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 230 | # Clear variables ahead of appending to them when defining tests. |
| 231 | $(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=)) |
| 232 | $(foreach target, $(TARGET_TYPES), \ |
| 233 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 234 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=))) |
| 235 | $(foreach target, $(TARGET_TYPES), \ |
| 236 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 237 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=))) |
| 238 | $(foreach target, $(TARGET_TYPES), \ |
| 239 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 240 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=))) |
| 241 | $(foreach target, $(TARGET_TYPES), \ |
| 242 | $(foreach trace, $(TRACE_TYPES), \ |
| 243 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=))) |
| 244 | $(foreach target, $(TARGET_TYPES), \ |
| 245 | $(foreach gc, $(GC_TYPES), \ |
| 246 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=))) |
| 247 | $(foreach target, $(TARGET_TYPES), \ |
| 248 | $(foreach jni, $(JNI_TYPES), \ |
| 249 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=))) |
| 250 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 251 | $(foreach image, $(IMAGE_TYPES), \ |
| 252 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=))) |
| 253 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 254 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
| 255 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=))) |
| 256 | $(foreach target, $(TARGET_TYPES), \ |
| 257 | $(foreach address_size, $(ALL_ADDRESS_SIZES), \ |
| 258 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 259 | |
| 260 | # We need dex2oat and dalvikvm on the target as well as the core image. |
| 261 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_EXECUTABLES) $(TARGET_CORE_IMG_OUT) $(2ND_TARGET_CORE_IMG_OUT) |
| 262 | |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 263 | # Also need libarttest. |
| 264 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libarttest.so |
| 265 | ifdef TARGET_2ND_ARCH |
| 266 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libarttest.so |
| 267 | endif |
| 268 | |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 269 | # Also need libnativebridgetest. |
| 270 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_ARCH)/libnativebridgetest.so |
| 271 | ifdef TARGET_2ND_ARCH |
| 272 | TEST_ART_TARGET_SYNC_DEPS += $(ART_TARGET_TEST_OUT)/$(TARGET_2ND_ARCH)/libnativebridgetest.so |
| 273 | endif |
| 274 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 275 | # All tests require the host executables and the core images. |
| 276 | ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \ |
| 277 | $(ART_HOST_EXECUTABLES) \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 278 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 279 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \ |
Nicolas Geoffray | 4d1231d | 2014-07-01 10:46:31 +0100 | [diff] [blame] | 280 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \ |
Brian Carlstrom | 519e3d0 | 2014-06-25 00:57:36 -0700 | [diff] [blame] | 281 | $(HOST_CORE_IMG_OUT) |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 282 | |
| 283 | ifneq ($(HOST_PREFER_32_BIT),true) |
| 284 | ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \ |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 285 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libarttest$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 286 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libnativebridgetest$(ART_HOST_SHLIB_EXTENSION) \ |
Nicolas Geoffray | 4d1231d | 2014-07-01 10:46:31 +0100 | [diff] [blame] | 287 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \ |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 288 | $(2ND_HOST_CORE_IMG_OUT) |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 289 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 290 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 291 | # Create a rule to build and run a tests following the form: |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 292 | # test-art-{1: host or target}-run-test-{2: prebuild no-prebuild no-dex2oat}- |
| 293 | # {3: interpreter default optimizing}-{4: relocate no-relocate relocate-no-patchoat}- |
| 294 | # {5: trace or no-trace}-{6: gcstress gcverify cms}-{7: forcecopy checkjni jni}- |
| 295 | # {8: no-image image}-{9: test name}{10: 32 or 64} |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 296 | define define-test-art-run-test |
| 297 | run_test_options := $(addprefix --runtime-option ,$(DALVIKVM_FLAGS)) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 298 | prereq_rule := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 299 | test_groups := |
| 300 | uc_host_or_target := |
Alex Light | bfac14a | 2014-07-30 09:41:21 -0700 | [diff] [blame] | 301 | ifeq ($(ART_TEST_RUN_TEST_ALWAYS_CLEAN),true) |
| 302 | run_test_options += --always-clean |
| 303 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 304 | ifeq ($(1),host) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 305 | uc_host_or_target := HOST |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 306 | test_groups := ART_RUN_TEST_HOST_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 307 | run_test_options += --host |
| 308 | prereq_rule := $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) |
| 309 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 310 | ifeq ($(1),target) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 311 | uc_host_or_target := TARGET |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 312 | test_groups := ART_RUN_TEST_TARGET_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 313 | prereq_rule := test-art-target-sync |
| 314 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 315 | $$(error found $(1) expected $(TARGET_TYPES)) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 316 | endif |
| 317 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 318 | ifeq ($(2),prebuild) |
| 319 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_PREBUILD_RULES |
| 320 | run_test_options += --prebuild |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 321 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 322 | ifeq ($(2),no-prebuild) |
| 323 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_PREBUILD_RULES |
| 324 | run_test_options += --no-prebuild |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 325 | else |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 326 | ifeq ($(2),no-dex2oat) |
| 327 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_DEX2OAT_RULES |
| 328 | run_test_options += --no-prebuild --no-dex2oat |
| 329 | else |
| 330 | $$(error found $(2) expected $(PREBUILD_TYPES)) |
| 331 | endif |
Alex Light | a59dd80 | 2014-07-02 16:28:08 -0700 | [diff] [blame] | 332 | endif |
| 333 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 334 | ifeq ($(3),optimizing) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 335 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_OPTIMIZING_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 336 | run_test_options += -Xcompiler-option --compiler-backend=Optimizing |
| 337 | else |
| 338 | ifeq ($(3),interpreter) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 339 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_INTERPRETER_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 340 | run_test_options += --interpreter |
| 341 | else |
| 342 | ifeq ($(3),default) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 343 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_DEFAULT_RULES |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 344 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 345 | $$(error found $(3) expected $(COMPILER_TYPES)) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 346 | endif |
| 347 | endif |
| 348 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 349 | ifeq ($(4),relocate) |
| 350 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_RULES |
| 351 | run_test_options += --relocate |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 352 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 353 | ifeq ($(4),no-relocate) |
| 354 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_RELOCATE_RULES |
| 355 | run_test_options += --no-relocate |
| 356 | else |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 357 | ifeq ($(4),relocate-no-patchoat) |
| 358 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_RELOCATE_NO_PATCHOAT_RULES |
| 359 | run_test_options += --relocate --no-patchoat |
| 360 | else |
| 361 | $$(error found $(4) expected $(RELOCATE_TYPES)) |
| 362 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 363 | endif |
| 364 | endif |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 365 | ifeq ($(5),trace) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 366 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_TRACE_RULES |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 367 | run_test_options += --trace |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 368 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 369 | ifeq ($(5),no-trace) |
| 370 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_TRACE_RULES |
Ian Rogers | 701aa64 | 2014-07-18 11:38:13 -0700 | [diff] [blame] | 371 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 372 | $$(error found $(5) expected $(TRACE_TYPES)) |
| 373 | endif |
| 374 | endif |
| 375 | ifeq ($(6),gcverify) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 376 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCVERIFY_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 377 | run_test_options += --gcverify |
| 378 | else |
| 379 | ifeq ($(6),gcstress) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 380 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_GCSTRESS_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 381 | run_test_options += --gcstress |
| 382 | else |
| 383 | ifeq ($(6),cms) |
| 384 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CMS_RULES |
Ian Rogers | 8a14b75 | 2014-07-18 15:06:53 -0700 | [diff] [blame] | 385 | else |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 386 | $$(error found $(6) expected $(GC_TYPES)) |
Ian Rogers | 701aa64 | 2014-07-18 11:38:13 -0700 | [diff] [blame] | 387 | endif |
Ian Rogers | 716e4f8 | 2014-07-16 11:18:03 -0700 | [diff] [blame] | 388 | endif |
| 389 | endif |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 390 | ifeq ($(7),forcecopy) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 391 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_FORCECOPY_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 392 | run_test_options += --runtime-option -Xjniopts:forcecopy |
| 393 | ifneq ($$(ART_TEST_JNI_FORCECOPY),true) |
| 394 | skip_test := true |
| 395 | endif |
| 396 | else |
| 397 | ifeq ($(7),checkjni) |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 398 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_CHECKJNI_RULES |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 399 | run_test_options += --runtime-option -Xcheck:jni |
| 400 | else |
| 401 | ifeq ($(7),jni) |
| 402 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_JNI_RULES |
| 403 | else |
| 404 | $$(error found $(7) expected $(JNI_TYPES)) |
| 405 | endif |
| 406 | endif |
| 407 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 408 | ifeq ($(8),no-image) |
| 409 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_NO_IMAGE_RULES |
| 410 | run_test_options += --no-image |
| 411 | else |
| 412 | ifeq ($(8),image) |
| 413 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_IMAGE_RULES |
| 414 | else |
| 415 | $$(error found $(8) expected $(IMAGE_TYPES)) |
| 416 | endif |
| 417 | endif |
| 418 | # $(9) is the test name |
| 419 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_$(call name-to-var,$(9))_RULES |
| 420 | ifeq ($(10),64) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 421 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_64_RULES |
| 422 | run_test_options += --64 |
| 423 | else |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 424 | ifeq ($(10),32) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 425 | test_groups += ART_RUN_TEST_$$(uc_host_or_target)_32_RULES |
| 426 | else |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 427 | $$(error found $(10) expected $(ALL_ADDRESS_SIZES)) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 428 | endif |
| 429 | endif |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 430 | run_test_rule_name := test-art-$(1)-run-test-$(2)-$(3)-$(4)-$(5)-$(6)-$(7)-$(8)-$(9)$(10) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 431 | 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] | 432 | $$(run_test_options) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 433 | $$(run_test_rule_name): PRIVATE_RUN_TEST_OPTIONS := $$(run_test_options) |
| 434 | .PHONY: $$(run_test_rule_name) |
| 435 | $$(run_test_rule_name): $(DX) $(HOST_OUT_EXECUTABLES)/jasmin $$(prereq_rule) |
| 436 | $(hide) $$(call ART_TEST_SKIP,$$@) && \ |
| 437 | DX=$(abspath $(DX)) JASMIN=$(abspath $(HOST_OUT_EXECUTABLES)/jasmin) \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 438 | art/test/run-test $$(PRIVATE_RUN_TEST_OPTIONS) $(9) \ |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 439 | && $$(call ART_TEST_PASSED,$$@) || $$(call ART_TEST_FAILED,$$@) |
| 440 | $$(hide) (echo $(MAKECMDGOALS) | grep -q $$@ && \ |
| 441 | echo "run-test run as top-level target, removing test directory $(ART_HOST_TEST_DIR)" && \ |
| 442 | rm -r $(ART_HOST_TEST_DIR)) || true |
| 443 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 444 | $$(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] | 445 | |
| 446 | # Clear locally defined variables. |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 447 | uc_host_or_target := |
| 448 | test_groups := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 449 | run_test_options := |
| 450 | run_test_rule_name := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 451 | prereq_rule := |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 452 | endef # define-test-art-run-test |
| 453 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 454 | $(foreach target, $(TARGET_TYPES), \ |
| 455 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
| 456 | $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), \ |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 457 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 458 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 459 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 460 | $(foreach trace, $(TRACE_TYPES), \ |
| 461 | $(foreach gc, $(GC_TYPES), \ |
| 462 | $(foreach jni, $(JNI_TYPES), \ |
| 463 | $(foreach image, $(IMAGE_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 464 | $(eval $(call define-test-art-run-test,$(target),$(prebuild),$(compiler),$(relocate),$(trace),$(gc),$(jni),$(image),$(test),$(address_size))) \ |
| 465 | )))))))))) |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 466 | define-test-art-run-test := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 467 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 468 | # Define a phony rule whose purpose is to test its prerequisites. |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 469 | # $(1): host or target |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 470 | # $(2): list of prerequisites |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 471 | define define-test-art-run-test-group |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 472 | .PHONY: $(1) |
| 473 | $(1): $(2) |
| 474 | $(hide) $$(call ART_TEST_PREREQ_FINISHED,$$@) |
| 475 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 476 | endef # define-test-art-run-test-group |
| 477 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 478 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 479 | $(foreach target, $(TARGET_TYPES), $(eval \ |
| 480 | $(call define-test-art-run-test-group,test-art-$(target)-run-test,$(ART_RUN_TEST_$(call name-to-var,$(target))_RULES)))) |
| 481 | $(foreach target, $(TARGET_TYPES), \ |
| 482 | $(foreach prebuild, $(PREBUILD_TYPES), $(eval \ |
| 483 | $(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))))) |
| 484 | $(foreach target, $(TARGET_TYPES), \ |
| 485 | $(foreach compiler, $(COMPILER_TYPES), $(eval \ |
| 486 | $(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))))) |
| 487 | $(foreach target, $(TARGET_TYPES), \ |
| 488 | $(foreach relocate, $(RELOCATE_TYPES), $(eval \ |
| 489 | $(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))))) |
| 490 | $(foreach target, $(TARGET_TYPES), \ |
| 491 | $(foreach trace, $(TRACE_TYPES), $(eval \ |
| 492 | $(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))))) |
| 493 | $(foreach target, $(TARGET_TYPES), \ |
| 494 | $(foreach gc, $(GC_TYPES), $(eval \ |
| 495 | $(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))))) |
| 496 | $(foreach target, $(TARGET_TYPES), \ |
| 497 | $(foreach jni, $(JNI_TYPES), $(eval \ |
| 498 | $(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))))) |
| 499 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 500 | $(foreach image, $(IMAGE_TYPES), $(eval \ |
| 501 | $(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))))) |
| 502 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 503 | $(foreach test, $(TEST_ART_RUN_TESTS), $(eval \ |
| 504 | $(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))))) |
| 505 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 506 | $(foreach address_size, $(ADDRESS_SIZES_$(call name-to-var,$(target))), $(eval \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 507 | $(call define-test-art-run-test-group,test-art-$(target)-run-test-$(address_size),$(ART_RUN_TEST_$(address_size)_RULES))))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 508 | |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 509 | # Clear variables now we're finished with them. |
| 510 | $(foreach target, $(TARGET_TYPES), $(eval ART_RUN_TEST_$(call name-to-var,$(target))_RULES :=)) |
| 511 | $(foreach target, $(TARGET_TYPES), \ |
| 512 | $(foreach prebuild, $(PREBUILD_TYPES), \ |
| 513 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(prebuild))_RULES :=))) |
| 514 | $(foreach target, $(TARGET_TYPES), \ |
| 515 | $(foreach compiler, $(COMPILER_TYPES), \ |
| 516 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(compiler))_RULES :=))) |
| 517 | $(foreach target, $(TARGET_TYPES), \ |
| 518 | $(foreach relocate, $(RELOCATE_TYPES), \ |
| 519 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(relocate))_RULES :=))) |
| 520 | $(foreach target, $(TARGET_TYPES), \ |
| 521 | $(foreach trace, $(TRACE_TYPES), \ |
| 522 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(trace))_RULES :=))) |
| 523 | $(foreach target, $(TARGET_TYPES), \ |
| 524 | $(foreach gc, $(GC_TYPES), \ |
| 525 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(gc))_RULES :=))) |
| 526 | $(foreach target, $(TARGET_TYPES), \ |
| 527 | $(foreach jni, $(JNI_TYPES), \ |
| 528 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(jni))_RULES :=))) |
| 529 | $(foreach target, $(TARGET_TYPES), \ |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 530 | $(foreach image, $(IMAGE_TYPES), \ |
| 531 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(image))_RULES :=))) |
| 532 | $(foreach target, $(TARGET_TYPES), \ |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 533 | $(foreach test, $(TEST_ART_RUN_TESTS), \ |
| 534 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(test))_RULES :=))) |
| 535 | $(foreach target, $(TARGET_TYPES), \ |
| 536 | $(foreach address_size, $(ALL_ADDRESS_SIZES), \ |
| 537 | $(eval ART_RUN_TEST_$(call name-to-var,$(target))_$(call name-to-var,$(address_size))_RULES :=))) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 538 | define-test-art-run-test-group := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 539 | TARGET_TYPES := |
| 540 | PREBUILD_TYPES := |
| 541 | COMPILER_TYPES := |
| 542 | RELOCATE_TYPES := |
| 543 | TRACE_TYPES := |
| 544 | GC_TYPES := |
| 545 | JNI_TYPES := |
Alex Light | 03a112d | 2014-08-25 13:25:56 -0700 | [diff] [blame] | 546 | IMAGE_TYPES := |
Ian Rogers | 86df3ac | 2014-08-27 10:54:11 -0700 | [diff] [blame] | 547 | ADDRESS_SIZES_TARGET := |
| 548 | ADDRESS_SIZES_HOST := |
Ian Rogers | f5c44b3 | 2014-08-19 16:52:36 -0700 | [diff] [blame] | 549 | ALL_ADDRESS_SIZES := |
Ian Rogers | 9fcaa4b | 2014-08-26 19:59:52 -0700 | [diff] [blame] | 550 | |
| 551 | include $(LOCAL_PATH)/Android.libarttest.mk |
| 552 | include art/test/Android.libnativebridgetest.mk |