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