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 16LOCAL_PATH := $(call my-dir) 17 18include art/build/Android.common_test.mk 19 20# Dependencies for actually running a run-test. 21TEST_ART_RUN_TEST_DEPENDENCIES := \ 22 $(HOST_OUT_EXECUTABLES)/d8 \ 23 $(HOST_OUT_EXECUTABLES)/hiddenapi \ 24 $(HOST_OUT_EXECUTABLES)/jasmin \ 25 $(HOST_OUT_EXECUTABLES)/android-smali 26 27# We need the ART Testing APEX (which is a superset of the Release 28# and Debug APEXes) -- which contains dex2oat, dalvikvm, their 29# dependencies and ART gtests -- on the target, as well as the core 30# images (all images as we sync only once). 31ART_TEST_TARGET_RUN_TEST_DEPENDENCIES := $(TESTING_ART_APEX) $(TARGET_CORE_IMG_OUTS) 32 33# Also need libartagent. 34ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libartagent-target libartagentd-target 35 36# Also need libtiagent. 37ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libtiagent-target libtiagentd-target 38 39# Also need libtistress. 40ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libtistress-target libtistressd-target 41 42# Also need libarttest. 43ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libarttest-target libarttestd-target 44 45# Also need libnativebridgetest. 46ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libnativebridgetest-target libnativebridgetestd-target 47 48# Also need signal_dumper. 49ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += signal_dumper-target 50 51# All tests require the host executables. The tests also depend on the core images, but on 52# specific version depending on the compiler. 53ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \ 54 $(ART_HOST_EXECUTABLES) \ 55 $(HOST_OUT_EXECUTABLES)/hprof-conv \ 56 $(HOST_OUT_EXECUTABLES)/signal_dumper \ 57 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libtiagent) \ 58 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libtiagentd) \ 59 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libtistress) \ 60 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libtistressd) \ 61 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libartagent) \ 62 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libartagentd) \ 63 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libarttest) \ 64 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libarttestd) \ 65 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libnativebridgetest) \ 66 $(ART_TEST_LIST_host_$(ART_HOST_ARCH)_libnativebridgetestd) \ 67 $(ART_HOST_OUT_SHARED_LIBRARIES)/libicu_jni$(ART_HOST_SHLIB_EXTENSION) \ 68 $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \ 69 $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \ 70 $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$(ART_HOST_SHLIB_EXTENSION) \ 71 $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkjvmti$(ART_HOST_SHLIB_EXTENSION) \ 72 $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkjvmtid$(ART_HOST_SHLIB_EXTENSION) \ 73 $(ART_HOST_DEX_DEPENDENCIES) \ 74 $(HOST_I18N_DATA) 75 76ifneq ($(HOST_PREFER_32_BIT),true) 77ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \ 78 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libtiagent) \ 79 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libtiagentd) \ 80 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libtistress) \ 81 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libtistressd) \ 82 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libartagent) \ 83 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libartagentd) \ 84 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libarttest) \ 85 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libarttestd) \ 86 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libnativebridgetest) \ 87 $(ART_TEST_LIST_host_$(2ND_ART_HOST_ARCH)_libnativebridgetestd) \ 88 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libicu_jni$(ART_HOST_SHLIB_EXTENSION) \ 89 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \ 90 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \ 91 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkd$(ART_HOST_SHLIB_EXTENSION) \ 92 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkjvmti$(ART_HOST_SHLIB_EXTENSION) \ 93 $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkjvmtid$(ART_HOST_SHLIB_EXTENSION) \ 94 95endif 96 97test-art-host-run-test-dependencies : \ 98 $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(TEST_ART_RUN_TEST_DEPENDENCIES) \ 99 $(HOST_BOOT_IMAGE_JARS) $(HOST_BOOT_IMAGE) $(2ND_HOST_BOOT_IMAGE) 100.PHONY: test-art-host-run-test-dependencies 101test-art-run-test-dependencies : test-art-host-run-test-dependencies 102 103test-art-jvm-run-test-dependencies : test-art-host-run-test-dependencies 104.PHONY: test-art-jvm-run-test-dependencies 105 106test-art-target-run-test-dependencies : 107.PHONY: test-art-target-run-test-dependencies 108test-art-run-test-dependencies : test-art-target-run-test-dependencies 109.PHONY: test-art-run-test-dependencies 110 111# Create a rule to build and run a test group of the following form: 112# test-art-{1: host target}-run-test 113define define-test-art-host-or-target-run-test-group 114 build_target := test-art-$(1)-run-test 115 .PHONY: $$(build_target) 116 117 $$(build_target) : args := --$(1) --verbose 118 $$(build_target) : test-art-$(1)-run-test-dependencies 119 ./art/test/testrunner/testrunner.py $$(args) 120 build_target := 121 args := 122 123 test-art-run-test : $(build_target) 124endef # define-test-art-host-or-target-run-test-group 125 126$(eval $(call define-test-art-host-or-target-run-test-group,target)) 127$(eval $(call define-test-art-host-or-target-run-test-group,host)) 128 129define-test-art-host-or-target-run-test-group := 130LOCAL_PATH := 131