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) |
Shubham Ajmera | 6f3d590 | 2017-02-06 06:39:11 +0000 | [diff] [blame] | 17 | |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 18 | include art/build/Android.common_test.mk |
| 19 | |
Nicolas Geoffray | 07f2bc1 | 2015-05-29 13:40:25 +0100 | [diff] [blame] | 20 | # Dependencies for actually running a run-test. |
Sebastien Hertz | 19ac027 | 2015-02-24 17:39:50 +0100 | [diff] [blame] | 21 | TEST_ART_RUN_TEST_DEPENDENCIES := \ |
Alex Light | cc917d9 | 2018-02-22 13:28:28 -0800 | [diff] [blame] | 22 | $(HOST_OUT_EXECUTABLES)/d8 \ |
David Brazdil | 11b67b2 | 2018-01-18 16:41:40 +0000 | [diff] [blame] | 23 | $(HOST_OUT_EXECUTABLES)/hiddenapi \ |
Sebastien Hertz | 19ac027 | 2015-02-24 17:39:50 +0100 | [diff] [blame] | 24 | $(HOST_OUT_EXECUTABLES)/jasmin \ |
Orion Hodson | 64fe3be | 2018-06-15 12:50:22 +0100 | [diff] [blame] | 25 | $(HOST_OUT_EXECUTABLES)/smali |
Sebastien Hertz | 19ac027 | 2015-02-24 17:39:50 +0100 | [diff] [blame] | 26 | |
Martin Stjernholm | d6be5da | 2019-07-16 17:14:46 +0100 | [diff] [blame] | 27 | # We need the ART Testing APEX (which is a superset of the Release |
| 28 | # and Debug APEXes) -- which contains dex2oat, dalvikvm, their |
Roland Levillain | 8d5a215 | 2019-07-02 19:40:28 +0100 | [diff] [blame] | 29 | # dependencies and ART gtests -- on the target, as well as the core |
| 30 | # images (all images as we sync only once). |
Martin Stjernholm | 84e5bb9 | 2019-09-05 19:56:46 +0100 | [diff] [blame] | 31 | ART_TEST_TARGET_RUN_TEST_DEPENDENCIES := $(TESTING_ART_APEX) $(TARGET_CORE_IMG_OUTS) |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 32 | |
Alex Light | 7233c7e | 2016-07-28 10:07:45 -0700 | [diff] [blame] | 33 | # Also need libartagent. |
Nicolas Geoffray | 375d4eb | 2018-10-12 15:23:56 +0100 | [diff] [blame] | 34 | ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libartagent-target libartagentd-target |
Alex Light | 7233c7e | 2016-07-28 10:07:45 -0700 | [diff] [blame] | 35 | |
Alex Light | 49948e9 | 2016-08-11 15:35:28 -0700 | [diff] [blame] | 36 | # Also need libtiagent. |
Nicolas Geoffray | 375d4eb | 2018-10-12 15:23:56 +0100 | [diff] [blame] | 37 | ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libtiagent-target libtiagentd-target |
Alex Light | 49948e9 | 2016-08-11 15:35:28 -0700 | [diff] [blame] | 38 | |
Alex Light | 8f2c6d4 | 2017-04-10 16:27:35 -0700 | [diff] [blame] | 39 | # Also need libtistress. |
Nicolas Geoffray | 375d4eb | 2018-10-12 15:23:56 +0100 | [diff] [blame] | 40 | ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libtistress-target libtistressd-target |
Alex Light | 8f2c6d4 | 2017-04-10 16:27:35 -0700 | [diff] [blame] | 41 | |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 42 | # Also need libarttest. |
Nicolas Geoffray | 375d4eb | 2018-10-12 15:23:56 +0100 | [diff] [blame] | 43 | ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libarttest-target libarttestd-target |
Andreas Gampe | 1c83cbc | 2014-07-22 18:52:29 -0700 | [diff] [blame] | 44 | |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 45 | # Also need libnativebridgetest. |
David Srbecky | 68fa4ca | 2019-04-30 16:51:13 +0100 | [diff] [blame] | 46 | ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += libnativebridgetest-target libnativebridgetestd-target |
Andreas Gampe | 855564b | 2014-07-25 02:32:19 -0700 | [diff] [blame] | 47 | |
Andreas Gampe | 2ea4ec0 | 2019-09-11 11:36:01 -0700 | [diff] [blame] | 48 | # Also need signal_dumper. |
| 49 | ART_TEST_TARGET_RUN_TEST_DEPENDENCIES += signal_dumper-target |
| 50 | |
Andreas Gampe | 63fc30e | 2014-10-24 21:58:16 -0700 | [diff] [blame] | 51 | # All tests require the host executables. The tests also depend on the core images, but on |
| 52 | # specific version depending on the compiler. |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 53 | ART_TEST_HOST_RUN_TEST_DEPENDENCIES := \ |
| 54 | $(ART_HOST_EXECUTABLES) \ |
Nicolas Geoffray | a6fbe39 | 2017-03-25 14:05:28 +0000 | [diff] [blame] | 55 | $(HOST_OUT_EXECUTABLES)/hprof-conv \ |
Andreas Gampe | 148c160 | 2019-06-10 16:47:46 -0700 | [diff] [blame] | 56 | $(HOST_OUT_EXECUTABLES)/signal_dumper \ |
Colin Cross | 8307206 | 2019-10-02 16:06:58 -0700 | [diff] [blame] | 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) \ |
Victor Chang | 65ae669 | 2019-10-11 14:17:21 +0100 | [diff] [blame] | 67 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libicu_jni$(ART_HOST_SHLIB_EXTENSION) \ |
Narayan Kamath | 67ef2c9 | 2015-11-16 10:17:35 +0000 | [diff] [blame] | 68 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 10edbb1 | 2016-01-06 17:59:49 -0800 | [diff] [blame] | 69 | $(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | f2c5dbd | 2016-11-17 22:50:33 -0800 | [diff] [blame] | 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) \ |
Nicolas Geoffray | d31cff1 | 2020-03-27 14:29:45 +0000 | [diff] [blame] | 73 | $(ART_HOST_DEX_DEPENDENCIES) \ |
Nicolas Geoffray | 1525960 | 2020-07-30 09:31:15 +0100 | [diff] [blame] | 74 | $(HOST_I18N_DATA) |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 75 | |
| 76 | ifneq ($(HOST_PREFER_32_BIT),true) |
| 77 | ART_TEST_HOST_RUN_TEST_DEPENDENCIES += \ |
Colin Cross | 8307206 | 2019-10-02 16:06:58 -0700 | [diff] [blame] | 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) \ |
Victor Chang | 65ae669 | 2019-10-11 14:17:21 +0100 | [diff] [blame] | 88 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libicu_jni$(ART_HOST_SHLIB_EXTENSION) \ |
Narayan Kamath | 67ef2c9 | 2015-11-16 10:17:35 +0000 | [diff] [blame] | 89 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | 10edbb1 | 2016-01-06 17:59:49 -0800 | [diff] [blame] | 90 | $(2ND_ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \ |
Andreas Gampe | f2c5dbd | 2016-11-17 22:50:33 -0800 | [diff] [blame] | 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 | |
Ian Rogers | 665de8a | 2014-06-24 21:34:09 -0700 | [diff] [blame] | 95 | endif |
Ian Rogers | afd9acc | 2014-06-17 08:21:54 -0700 | [diff] [blame] | 96 | |
Martin Stjernholm | 21dafaf | 2021-02-17 20:39:45 +0000 | [diff] [blame] | 97 | ifeq (true,$(my_art_module_source_build)) |
| 98 | test-art-host-run-test-dependencies : \ |
David Srbecky | 928d28e | 2020-04-01 17:50:51 +0100 | [diff] [blame] | 99 | $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(TEST_ART_RUN_TEST_DEPENDENCIES) \ |
| 100 | $(HOST_BOOT_IMAGE_JARS) $(HOST_BOOT_IMAGE) $(2ND_HOST_BOOT_IMAGE) |
Martin Stjernholm | 21dafaf | 2021-02-17 20:39:45 +0000 | [diff] [blame] | 101 | .PHONY: test-art-host-run-test-dependencies |
| 102 | test-art-run-test-dependencies : test-art-host-run-test-dependencies |
| 103 | endif |
| 104 | |
Roland Levillain | f69c189 | 2020-01-30 13:25:32 +0000 | [diff] [blame] | 105 | test-art-target-run-test-dependencies : |
Dan Willemsen | 03b0346 | 2018-06-18 20:29:18 -0700 | [diff] [blame] | 106 | .PHONY: test-art-target-run-test-dependencies |
Martin Stjernholm | 21dafaf | 2021-02-17 20:39:45 +0000 | [diff] [blame] | 107 | test-art-run-test-dependencies : test-art-target-run-test-dependencies |
Dan Willemsen | 03b0346 | 2018-06-18 20:29:18 -0700 | [diff] [blame] | 108 | .PHONY: test-art-run-test-dependencies |
Shubham Ajmera | 65adb8b | 2017-02-06 16:04:25 +0000 | [diff] [blame] | 109 | |
Shubham Ajmera | 4a5a162 | 2017-03-22 10:07:19 -0700 | [diff] [blame] | 110 | # Create a rule to build and run a test group of the following form: |
| 111 | # test-art-{1: host target}-run-test |
| 112 | define define-test-art-host-or-target-run-test-group |
| 113 | build_target := test-art-$(1)-run-test |
| 114 | .PHONY: $$(build_target) |
| 115 | |
| 116 | $$(build_target) : args := --$(1) --verbose |
| 117 | $$(build_target) : test-art-$(1)-run-test-dependencies |
| 118 | ./art/test/testrunner/testrunner.py $$(args) |
| 119 | build_target := |
| 120 | args := |
Martin Stjernholm | 21dafaf | 2021-02-17 20:39:45 +0000 | [diff] [blame] | 121 | |
| 122 | test-art-run-test : $(build_target) |
Shubham Ajmera | 4a5a162 | 2017-03-22 10:07:19 -0700 | [diff] [blame] | 123 | endef # define-test-art-host-or-target-run-test-group |
| 124 | |
Martin Stjernholm | 21dafaf | 2021-02-17 20:39:45 +0000 | [diff] [blame] | 125 | $(eval $(call define-test-art-host-or-target-run-test-group,target)) |
Shubham Ajmera | 4a5a162 | 2017-03-22 10:07:19 -0700 | [diff] [blame] | 126 | |
Martin Stjernholm | 21dafaf | 2021-02-17 20:39:45 +0000 | [diff] [blame] | 127 | ifeq (true,$(my_art_module_source_build)) |
| 128 | $(eval $(call define-test-art-host-or-target-run-test-group,host)) |
| 129 | endif |
Shubham Ajmera | 4a5a162 | 2017-03-22 10:07:19 -0700 | [diff] [blame] | 130 | |
Shubham Ajmera | 4a5a162 | 2017-03-22 10:07:19 -0700 | [diff] [blame] | 131 | define-test-art-host-or-target-run-test-group := |
Alex Light | 7233c7e | 2016-07-28 10:07:45 -0700 | [diff] [blame] | 132 | LOCAL_PATH := |