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