17b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro#
27b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# Copyright (C) 2011 The Android Open Source Project
37b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro#
47b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# Licensed under the Apache License, Version 2.0 (the "License");
57b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# you may not use this file except in compliance with the License.
67b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# You may obtain a copy of the License at
77b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro#
87b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro#      http://www.apache.org/licenses/LICENSE-2.0
97b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro#
107b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# Unless required by applicable law or agreed to in writing, software
117b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# distributed under the License is distributed on an "AS IS" BASIS,
127b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
137b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# See the License for the specific language governing permissions and
147b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro# limitations under the License.
157b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro#
167b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro
177b21670581d13db32f1384a3b2692bcfc8f57320Carl ShapiroLOCAL_PATH := $(call my-dir)
187b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro
197940e44f4517de5e2634a7e07d58d0fb26160513Brian Carlstromart_path := $(LOCAL_PATH)
20cdc8de4642ca447a7ed205f0d2203cb217e48aadBrian Carlstrom
21b2793375d42b5d90d9a0111581c4314abe11ca4cBrian Carlstrom########################################################################
22afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# clean-oat rules
2362e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom#
2462e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom
25afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersinclude $(art_path)/build/Android.common_path.mk
2663fc30e201a74dbad9422a6dbd4c39e4b60ac4c5Andreas Gampeinclude $(art_path)/build/Android.oat.mk
27afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
288f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogers# Following the example of build's dont_bother for clean targets.
29b5594ba8a0713ad65413dfabc67ac4cb325383e6Ian Rogersart_dont_bother := false
308f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogersifneq (,$(filter clean-oat%,$(MAKECMDGOALS)))
318f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogers  art_dont_bother := true
3262e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstromendif
338f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogers
3446a6fc571b795fbb1296b7e0fa3b8d1d65a7fdc2Brian Carlstrom# Don't bother with tests unless there is a test-art*, build-art*, or related target.
358f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogersart_test_bother := false
36a852a5b8a6cbe7aaf130acd104b6bd2f1812a7ceAndreas Gampeifneq (,$(filter tests test-art% valgrind-test-art% build-art% checkbuild,$(MAKECMDGOALS)))
378f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogers  art_test_bother := true
3862e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstromendif
3962e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom
4062e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom.PHONY: clean-oat
4162e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstromclean-oat: clean-oat-host clean-oat-target
4262e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom
4362e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom.PHONY: clean-oat-host
4462e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstromclean-oat-host:
45572f07c0f819e69d7ff899773598efc00ed594a6Nicolas Geoffray	find $(OUT_DIR) -name "*.oat" -o -name "*.odex" -o -name "*.art" | xargs rm -f
465a79fdecffbea657ebecd4cf19078925239eb1c3Andreas Gampeifneq ($(TMPDIR),)
475a79fdecffbea657ebecd4cf19078925239eb1c3Andreas Gampe	rm -rf $(TMPDIR)/$(USER)/test-*/dalvik-cache/*
485a79fdecffbea657ebecd4cf19078925239eb1c3Andreas Gampe	rm -rf $(TMPDIR)/android-data/dalvik-cache/*
495a79fdecffbea657ebecd4cf19078925239eb1c3Andreas Gampeelse
5081c56e73558dee0a8e537a12a210d4bc0ef01a62Dmitry Petrochenko	rm -rf /tmp/$(USER)/test-*/dalvik-cache/*
51ae089616183e7af01fee83dad45aff06f3dd47caBrian Carlstrom	rm -rf /tmp/android-data/dalvik-cache/*
525a79fdecffbea657ebecd4cf19078925239eb1c3Andreas Gampeendif
5362e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom
5462e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom.PHONY: clean-oat-target
5562e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstromclean-oat-target:
5628a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
5728a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device remount
580a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_NATIVETEST_DIR)
590a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_TEST_DIR)
600a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*/*
610a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(DEXPREOPT_BOOT_JAR_DIR)/$(DEX2OAT_TARGET_ARCH)
620a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf system/app/$(DEX2OAT_TARGET_ARCH)
63f662e0600ae0e0a1a5f732dc3aae25679ffa102fBrian Carlstromifdef TARGET_2ND_ARCH
640a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(DEXPREOPT_BOOT_JAR_DIR)/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)
650a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf system/app/$($(TARGET_2ND_ARCH_VAR_PREFIX)DEX2OAT_TARGET_ARCH)
66f662e0600ae0e0a1a5f732dc3aae25679ffa102fBrian Carlstromendif
670a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf data/run-test/test-*/dalvik-cache/*
6862e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom
6962e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstromifneq ($(art_dont_bother),true)
7062e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom
7162e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstrom########################################################################
72afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# cpplint rules to style check art source files
73afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
74afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersinclude $(art_path)/build/Android.cpplint.mk
75afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
76afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers########################################################################
77afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# product rules
78afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
797940e44f4517de5e2634a7e07d58d0fb26160513Brian Carlstrominclude $(art_path)/runtime/Android.mk
80751beff19b36f777d9e3a966d754fd9cfad5d534Phil Wanginclude $(art_path)/runtime/simulator/Android.mk
817940e44f4517de5e2634a7e07d58d0fb26160513Brian Carlstrominclude $(art_path)/compiler/Android.mk
8269ae54abd4eaad54dc73b75ea7c8051aa515581dAart Bikinclude $(art_path)/dexdump/Android.mk
833e40f4a7289bf0104e061dc36f17a776d4c122d4Aart Bikinclude $(art_path)/dexlist/Android.mk
847940e44f4517de5e2634a7e07d58d0fb26160513Brian Carlstrominclude $(art_path)/dex2oat/Android.mk
8502ed4c04468ca5f5540c5b704ac3e2f30eb9e8f4Ian Rogersinclude $(art_path)/disassembler/Android.mk
867940e44f4517de5e2634a7e07d58d0fb26160513Brian Carlstrominclude $(art_path)/oatdump/Android.mk
873774335b08076117d6950cd472cdd59a167470b5Igor Murashkininclude $(art_path)/imgdiag/Android.mk
8853cb16b98acf3cf6f3a1e2204ad4958ecf1b5a3cAlex Lightinclude $(art_path)/patchoat/Android.mk
892e2db786b8fbaa4dceb37603a4296b0b2aea4e9eCalin Juravleinclude $(art_path)/profman/Android.mk
90fa50baa45bf7c82e489bd66bbba70544f7981997Brian Carlstrominclude $(art_path)/dalvikvm/Android.mk
919583fbcf597eff6d0b3c5359b8e8d5f70ed82c40Nicolas Geoffrayinclude $(art_path)/tools/Android.mk
92b730b78dac047c6d8ead93ad77605bcb7414f5ceRichard Uhlerinclude $(art_path)/tools/ahat/Android.mk
93959ffdf65f280ee90b7944a8dd610564e7f99e69Stephen Kyleinclude $(art_path)/tools/dexfuzz/Android.mk
940ccc341cfa5c31d3b7ed99602bcb4837f6897e6aJeff Haoinclude $(art_path)/tools/dmtracedump/Android.mk
95f4b80bcc7190fe75023b983d56a795b440a0c515Dave Allisoninclude $(art_path)/sigchainlib/Android.mk
96b270b9e6cba453209e226b0f621c75f2e51f122aAlex Lightinclude $(art_path)/libart_fake/Android.mk
97f4b80bcc7190fe75023b983d56a795b440a0c515Dave Allison
987b21670581d13db32f1384a3b2692bcfc8f57320Carl Shapiro
99b2793375d42b5d90d9a0111581c4314abe11ca4cBrian Carlstrom# ART_HOST_DEPENDENCIES depends on Android.executable.mk above for ART_HOST_EXECUTABLES
100532714abd50c547f0fdbe830f811d99e621e2d34Brian CarlstromART_HOST_DEPENDENCIES := \
101532714abd50c547f0fdbe830f811d99e621e2d34Brian Carlstrom	$(ART_HOST_EXECUTABLES) \
102532714abd50c547f0fdbe830f811d99e621e2d34Brian Carlstrom	$(HOST_OUT_JAVA_LIBRARIES)/core-libart-hostdex.jar \
10362ce6561cb2d6b4df07c851f4bcbf8ac19ef2e4bPiotr Jastrzebski	$(HOST_OUT_JAVA_LIBRARIES)/core-oj-hostdex.jar \
1048ca90774165b22fdbc87c89c8b55192e43fb2e43Piotr Jastrzebski	$(ART_HOST_OUT_SHARED_LIBRARIES)/libjavacore$(ART_HOST_SHLIB_EXTENSION) \
1056ca77ecadde2f5fe622ce50db4f5865364d2b519Narayan Kamath	$(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdk$(ART_HOST_SHLIB_EXTENSION) \
1066ca77ecadde2f5fe622ce50db4f5865364d2b519Narayan Kamath	$(ART_HOST_OUT_SHARED_LIBRARIES)/libopenjdkjvm$(ART_HOST_SHLIB_EXTENSION)
107532714abd50c547f0fdbe830f811d99e621e2d34Brian CarlstromART_TARGET_DEPENDENCIES := \
108532714abd50c547f0fdbe830f811d99e621e2d34Brian Carlstrom	$(ART_TARGET_EXECUTABLES) \
109532714abd50c547f0fdbe830f811d99e621e2d34Brian Carlstrom	$(TARGET_OUT_JAVA_LIBRARIES)/core-libart.jar \
11062ce6561cb2d6b4df07c851f4bcbf8ac19ef2e4bPiotr Jastrzebski	$(TARGET_OUT_JAVA_LIBRARIES)/core-oj.jar \
1118ca90774165b22fdbc87c89c8b55192e43fb2e43Piotr Jastrzebski	$(TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so \
1126ca77ecadde2f5fe622ce50db4f5865364d2b519Narayan Kamath	$(TARGET_OUT_SHARED_LIBRARIES)/libopenjdk.so \
1136ca77ecadde2f5fe622ce50db4f5865364d2b519Narayan Kamath	$(TARGET_OUT_SHARED_LIBRARIES)/libopenjdkjvm.so
114fb040d068cd0a6e91cea3cba279a5f4e3f67825dAndreas Gampeifdef TARGET_2ND_ARCH
115fb040d068cd0a6e91cea3cba279a5f4e3f67825dAndreas GampeART_TARGET_DEPENDENCIES += $(2ND_TARGET_OUT_SHARED_LIBRARIES)/libjavacore.so
116d7b3c7f0044bc5d120cd6d516866ab399489b4e7Narayan KamathART_TARGET_DEPENDENCIES += $(2ND_TARGET_OUT_SHARED_LIBRARIES)/libopenjdk.so
1176ca77ecadde2f5fe622ce50db4f5865364d2b519Narayan KamathART_TARGET_DEPENDENCIES += $(2ND_TARGET_OUT_SHARED_LIBRARIES)/libopenjdkjvm.so
118fb040d068cd0a6e91cea3cba279a5f4e3f67825dAndreas Gampeendif
11987bb26f87fe33da6d372b5d5e2ad14390c67c96fBrian Carlstromifdef HOST_2ND_ARCH
12087bb26f87fe33da6d372b5d5e2ad14390c67c96fBrian CarlstromART_HOST_DEPENDENCIES += $(2ND_HOST_OUT_SHARED_LIBRARIES)/libjavacore.so
121d7b3c7f0044bc5d120cd6d516866ab399489b4e7Narayan KamathART_HOST_DEPENDENCIES += $(2ND_HOST_OUT_SHARED_LIBRARIES)/libopenjdk.so
1226ca77ecadde2f5fe622ce50db4f5865364d2b519Narayan KamathART_HOST_DEPENDENCIES += $(2ND_HOST_OUT_SHARED_LIBRARIES)/libopenjdkjvm.so
12387bb26f87fe33da6d372b5d5e2ad14390c67c96fBrian Carlstromendif
1241580379bb02ee7866ca94d54851a4d08de12a5a4Brian Carlstrom
125b2793375d42b5d90d9a0111581c4314abe11ca4cBrian Carlstrom########################################################################
126afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# test rules
127b2793375d42b5d90d9a0111581c4314abe11ca4cBrian Carlstrom
1288f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogersifeq ($(art_test_bother),true)
1298f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogers
130afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# All the dependencies that must be built ahead of sync-ing them onto the target device.
131afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian RogersTEST_ART_TARGET_SYNC_DEPS :=
1322fe07927610177e9b83809e5bdb6d2b3d835a076Andreas Gampe
133afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersinclude $(art_path)/build/Android.common_test.mk
134afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersinclude $(art_path)/build/Android.gtest.mk
135afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersinclude $(art_path)/test/Android.run-test.mk
136563e9846711aa1830bc7a34499204091032349fbMathieu Chartierinclude $(art_path)/benchmark/Android.mk
1372fe07927610177e9b83809e5bdb6d2b3d835a076Andreas Gampe
13853fc75ae4ec907292adb6765be4d0d50584c4c1eAlex LightTEST_ART_ADB_ROOT_AND_REMOUNT := \
13953fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light    (adb root && \
14053fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light     adb wait-for-device remount && \
14153fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light     ((adb shell touch /system/testfile && \
14253fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light       (adb shell rm /system/testfile || true)) || \
14353fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light      (adb disable-verity && \
14453fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light       adb reboot && \
14553fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light       adb wait-for-device root && \
14653fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light       adb wait-for-device remount)))
14753fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light
148afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# Sync test files to the target, depends upon all things that must be pushed to the target.
149afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-sync
15058035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray# Check if we need to sync. In case ART_TEST_ANDROID_ROOT is not empty,
15158035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray# the code below uses 'adb push' instead of 'adb sync', which does not
15258035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray# check if the files on the device have changed.
15358035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffrayifneq ($(ART_TEST_NO_SYNC),true)
154c8f23fc19726245da6a11fa2d92e319b9d26c019Nicolas Geoffrayifeq ($(ART_TEST_ANDROID_ROOT),)
155afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogerstest-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
15653fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light	$(TEST_ART_ADB_ROOT_AND_REMOUNT)
157afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	adb sync
158c8f23fc19726245da6a11fa2d92e319b9d26c019Nicolas Geoffrayelse
159c8f23fc19726245da6a11fa2d92e319b9d26c019Nicolas Geoffraytest-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
16053fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light	$(TEST_ART_ADB_ROOT_AND_REMOUNT)
161c8f23fc19726245da6a11fa2d92e319b9d26c019Nicolas Geoffray	adb wait-for-device push $(ANDROID_PRODUCT_OUT)/system $(ART_TEST_ANDROID_ROOT)
162ca023a398f4120c3ce0792c8ab4d9bf06db167beRoland Levillain# Push the contents of the `data` dir into `/data` on the device.  If
163ca023a398f4120c3ce0792c8ab4d9bf06db167beRoland Levillain# `/data` already exists on the device, it is not overwritten, but its
164ca023a398f4120c3ce0792c8ab4d9bf06db167beRoland Levillain# contents are updated.
165ca023a398f4120c3ce0792c8ab4d9bf06db167beRoland Levillain	adb push $(ANDROID_PRODUCT_OUT)/data /
166c8f23fc19726245da6a11fa2d92e319b9d26c019Nicolas Geoffrayendif
16758035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffrayendif
168934486cf07c578b6494417ca5dcbae89cf04b019Brian Carlstrom
1694a96b60e45fba4a9d4a2e9c8fc849660eacef684Brian Carlstrom# "mm test-art" to build and run all tests on host and device
1704a96b60e45fba4a9d4a2e9c8fc849660eacef684Brian Carlstrom.PHONY: test-art
1714a96b60e45fba4a9d4a2e9c8fc849660eacef684Brian Carlstromtest-art: test-art-host test-art-target
172afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
1734a96b60e45fba4a9d4a2e9c8fc849660eacef684Brian Carlstrom
17447a0d5a6f221066c3daf7f67f2122ed9c9cd217cBrian Carlstrom.PHONY: test-art-gtest
175b2793375d42b5d90d9a0111581c4314abe11ca4cBrian Carlstromtest-art-gtest: test-art-host-gtest test-art-target-gtest
176afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
1772cae5a22e73c540c5e4c5f37b31b545674eb4d2bElliott Hughes
17808981abe9085d35f6b87f03ceefc78e81d915e60Brian Carlstrom.PHONY: test-art-run-test
179dbaa93a4265e2fdbe729ec58f543a4042ccd2d8eBrian Carlstromtest-art-run-test: test-art-host-run-test test-art-target-run-test
180afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
18108981abe9085d35f6b87f03ceefc78e81d915e60Brian Carlstrom
182bc2f3e3e41d02eb2896dc16390c5c4023a7b5649Brian Carlstrom########################################################################
183afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# host test rules
184bc2f3e3e41d02eb2896dc16390c5c4023a7b5649Brian Carlstrom
1857a4c1c1533f6f25303752525424b6244e4c9b739Ian RogersVIXL_TEST_DEPENDENCY :=
1867a4c1c1533f6f25303752525424b6244e4c9b739Ian Rogers# We can only run the vixl tests on 64-bit hosts (vixl testing issue) when its a
1877a4c1c1533f6f25303752525424b6244e4c9b739Ian Rogers# top-level build (to declare the vixl test rule).
188afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersifneq ($(HOST_PREFER_32_BIT),true)
1897a4c1c1533f6f25303752525424b6244e4c9b739Ian Rogersifeq ($(ONE_SHOT_MAKEFILE),)
1907a4c1c1533f6f25303752525424b6244e4c9b739Ian RogersVIXL_TEST_DEPENDENCY := run-vixl-tests
1913c0335735e9e8963003eeabb984e5208731d972eAndreas Gampeendif
1927a4c1c1533f6f25303752525424b6244e4c9b739Ian Rogersendif
1937a4c1c1533f6f25303752525424b6244e4c9b739Ian Rogers
194afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-vixl
1957a4c1c1533f6f25303752525424b6244e4c9b739Ian Rogerstest-art-host-vixl: $(VIXL_TEST_DEPENDENCY)
1963c0335735e9e8963003eeabb984e5208731d972eAndreas Gampe
197afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# "mm test-art-host" to build and run all host tests.
198934486cf07c578b6494417ca5dcbae89cf04b019Brian Carlstrom.PHONY: test-art-host
199a59032f579569ed57274696e16af01837ade0eefAart Biktest-art-host: test-art-host-gtest test-art-host-run-test \
200a59032f579569ed57274696e16af01837ade0eefAart Bik               test-art-host-vixl test-art-host-dexdump
201afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
2025511f2161d71ac67a9bc140cbbca5d9637ab7499Elliott Hughes
203afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# All host tests that run solely with the default compiler.
204afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-default
2051c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-default: test-art-host-run-test-default
206afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
2073a5052214df8140978f19f0e9e242df6ffcb621fNicolas Geoffray
208afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# All host tests that run solely with the optimizing compiler.
209afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-optimizing
2101c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-optimizing: test-art-host-run-test-optimizing
211afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
2123a5052214df8140978f19f0e9e242df6ffcb621fNicolas Geoffray
213afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# All host tests that run solely on the interpreter.
214afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-interpreter
2151c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-interpreter: test-art-host-run-test-interpreter
216afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
217afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
2183fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier# All host tests that run solely on the jit.
2193fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier.PHONY: test-art-host-jit
2203fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartiertest-art-host-jit: test-art-host-run-test-jit
2213fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
2223fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier
223afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# Primary host architecture variants:
224afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host$(ART_PHONY_TEST_HOST_SUFFIX)
225afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogerstest-art-host$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(ART_PHONY_TEST_HOST_SUFFIX) \
2261c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampe    test-art-host-run-test$(ART_PHONY_TEST_HOST_SUFFIX)
227afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
228afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
229afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX)
2301c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-default$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(ART_PHONY_TEST_HOST_SUFFIX)
231afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
232afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
233afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX)
2341c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-optimizing$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(ART_PHONY_TEST_HOST_SUFFIX)
235afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
236afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
237afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX)
2381c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-interpreter$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(ART_PHONY_TEST_HOST_SUFFIX)
239afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
240afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
2413fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier.PHONY: test-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX)
2423fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartiertest-art-host-jit$(ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(ART_PHONY_TEST_HOST_SUFFIX)
2433fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
2443fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier
245afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# Secondary host architecture variants:
246afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersifneq ($(HOST_PREFER_32_BIT),true)
247afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
248afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogerstest-art-host$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-gtest$(2ND_ART_PHONY_TEST_HOST_SUFFIX) \
2491c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampe    test-art-host-run-test$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
250afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
251afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
252afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
2531c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-default$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
254afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
255afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
256afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
2571c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-optimizing$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
258afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
259afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
260afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
2611c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-host-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-interpreter$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
262afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
2633fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier
2643fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier.PHONY: test-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
2653fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartiertest-art-host-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX): test-art-host-run-test-jit$(2ND_ART_PHONY_TEST_HOST_SUFFIX)
2663fc1b12a2308e39a0c9b1cdcf4eb0b5770081e51Mathieu Chartier	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
267afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersendif
2684855cd516d97c9728fa58312acdf6c4b8b81397aBrian Carlstrom
2693e40f4a7289bf0104e061dc36f17a776d4c122d4Aart Bik# Dexdump/list regression test.
270a59032f579569ed57274696e16af01837ade0eefAart Bik.PHONY: test-art-host-dexdump
271b1b45bec6a3eed1fb95dabd95b1957a51341dc2aAart Biktest-art-host-dexdump: $(addprefix $(HOST_OUT_EXECUTABLES)/, dexdump2 dexlist)
272882a4f314b775445f36b486cb147b432cbb66617Ying Wang	ANDROID_HOST_OUT=$(realpath $(HOST_OUT)) art/test/dexdump/run-all-tests
273a59032f579569ed57274696e16af01837ade0eefAart Bik
2744dd47ab9fb2c4b0c964417f7c9013d749a16dfa4Hiroshi Yamauchi# Valgrind.
275928f72bd75c385ba2708c58521171a77264d4486Andreas Gampe.PHONY: valgrind-test-art-host
2764dd47ab9fb2c4b0c964417f7c9013d749a16dfa4Hiroshi Yamauchivalgrind-test-art-host: valgrind-test-art-host-gtest
277928f72bd75c385ba2708c58521171a77264d4486Andreas Gampe	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
278928f72bd75c385ba2708c58521171a77264d4486Andreas Gampe
27970b92aebd3be16fad350a307aaaadb9af5e67163Hiroshi Yamauchi.PHONY: valgrind-test-art-host32
28070b92aebd3be16fad350a307aaaadb9af5e67163Hiroshi Yamauchivalgrind-test-art-host32: valgrind-test-art-host-gtest32
28170b92aebd3be16fad350a307aaaadb9af5e67163Hiroshi Yamauchi	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
28270b92aebd3be16fad350a307aaaadb9af5e67163Hiroshi Yamauchi
28370b92aebd3be16fad350a307aaaadb9af5e67163Hiroshi Yamauchi.PHONY: valgrind-test-art-host64
28470b92aebd3be16fad350a307aaaadb9af5e67163Hiroshi Yamauchivalgrind-test-art-host64: valgrind-test-art-host-gtest64
28570b92aebd3be16fad350a307aaaadb9af5e67163Hiroshi Yamauchi	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
28670b92aebd3be16fad350a307aaaadb9af5e67163Hiroshi Yamauchi
287bc2f3e3e41d02eb2896dc16390c5c4023a7b5649Brian Carlstrom########################################################################
288afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# target test rules
289afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
290afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# "mm test-art-target" to build and run all target tests.
291afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target
2921c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target: test-art-target-gtest test-art-target-run-test
293afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
294afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
295afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# All target tests that run solely with the default compiler.
296afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-default
2971c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-default: test-art-target-run-test-default
298afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
299afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
300afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# All target tests that run solely with the optimizing compiler.
301afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-optimizing
3021c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-optimizing: test-art-target-run-test-optimizing
303afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
304afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
305afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# All target tests that run solely on the interpreter.
306afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-interpreter
3071c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-interpreter: test-art-target-run-test-interpreter
308afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
309afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
310721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier# All target tests that run solely on the jit.
311721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier.PHONY: test-art-target-jit
312721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartiertest-art-target-jit: test-art-target-run-test-jit
313721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
314721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier
315afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# Primary target architecture variants:
316afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target$(ART_PHONY_TEST_TARGET_SUFFIX)
317afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogerstest-art-target$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(ART_PHONY_TEST_TARGET_SUFFIX) \
3181c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampe    test-art-target-run-test$(ART_PHONY_TEST_TARGET_SUFFIX)
319afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
320afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
321afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX)
3221c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-default$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(ART_PHONY_TEST_TARGET_SUFFIX)
323afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
324afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
325afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX)
3261c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(ART_PHONY_TEST_TARGET_SUFFIX)
327afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
328afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
329afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX)
3301c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(ART_PHONY_TEST_TARGET_SUFFIX)
331afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
332afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
333721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier.PHONY: test-art-target-jit$(ART_PHONY_TEST_TARGET_SUFFIX)
334721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartiertest-art-target-jit$(ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-jit$(ART_PHONY_TEST_TARGET_SUFFIX)
335721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
336721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier
337afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# Secondary target architecture variants:
338afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersifdef TARGET_2ND_ARCH
339afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
340afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogerstest-art-target$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-gtest$(2ND_ART_PHONY_TEST_TARGET_SUFFIX) \
3411c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampe    test-art-target-run-test$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
342afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
343afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
344afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
3451c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-default$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
346afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
347afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
348afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
3491c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-optimizing$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
350afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
351afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers
352afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers.PHONY: test-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
3531c83cbc4a817acbd7f9abb5b29a2d418a958e6a1Andreas Gampetest-art-target-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-interpreter$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
354afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
355721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier
356721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier.PHONY: test-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
357721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartiertest-art-target-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX): test-art-target-run-test-jit$(2ND_ART_PHONY_TEST_TARGET_SUFFIX)
358721f3a817884c1c4cf30cea2bbb337738745a74dMathieu Chartier	$(hide) $(call ART_TEST_PREREQ_FINISHED,$@)
3592fe07927610177e9b83809e5bdb6d2b3d835a076Andreas Gampeendif
360e24fa61603a60ade3797e4a0c8b3fccb346cb048Brian Carlstrom
3618f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogersendif  # art_test_bother
3628f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogers
363bc2f3e3e41d02eb2896dc16390c5c4023a7b5649Brian Carlstrom########################################################################
364afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogers# oat-target and oat-target-sync rules
365bc2f3e3e41d02eb2896dc16390c5c4023a7b5649Brian Carlstrom
366afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian RogersOAT_TARGET_RULES :=
36727ec961a1da540ba7f16c07a682585ab167317adBrian Carlstrom
36804941d992eca73f23ba268a0f422d501502cd6cfBrian Carlstrom# $(1): input jar or apk target location
36904941d992eca73f23ba268a0f422d501502cd6cfBrian Carlstromdefine declare-oat-target-target
370999cd43edadfd408064457c2b46a9f3b6dde4dd3Brian CarlstromOUT_OAT_FILE := $(PRODUCT_OUT)/$(basename $(1)).odex
3712e01f2428d50cd3002266759a4de09d629059074Shih-wei Liao
3722e01f2428d50cd3002266759a4de09d629059074Shih-wei Liaoifeq ($(ONE_SHOT_MAKEFILE),)
37390e2741aaa006c70b1ca20f97ead299c547c76f1Brian Carlstrom# ONE_SHOT_MAKEFILE is empty for a top level build and we don't want
37490e2741aaa006c70b1ca20f97ead299c547c76f1Brian Carlstrom# to define the oat-target-* rules there because they will conflict
37590e2741aaa006c70b1ca20f97ead299c547c76f1Brian Carlstrom# with the build/core/dex_preopt.mk defined rules.
37604941d992eca73f23ba268a0f422d501502cd6cfBrian Carlstrom.PHONY: oat-target-$(1)
37790e2741aaa006c70b1ca20f97ead299c547c76f1Brian Carlstromoat-target-$(1):
3782e01f2428d50cd3002266759a4de09d629059074Shih-wei Liao
3792e01f2428d50cd3002266759a4de09d629059074Shih-wei Liaoelse
3802e01f2428d50cd3002266759a4de09d629059074Shih-wei Liao.PHONY: oat-target-$(1)
3817eea0e8f0838598c67ef93df3149b8040dcb8f0fShih-wei Liaooat-target-$(1): $$(OUT_OAT_FILE)
3822e01f2428d50cd3002266759a4de09d629059074Shih-wei Liao
3831ffa074c9be5c77b9c0a3536bf18665fdc0c5c88Nicolas Geoffray$$(OUT_OAT_FILE): $(PRODUCT_OUT)/$(1) $(DEFAULT_DEX_PREOPT_BUILT_IMAGE) $(DEX2OAT_DEPENDENCY)
38490e2741aaa006c70b1ca20f97ead299c547c76f1Brian Carlstrom	@mkdir -p $$(dir $$@)
3851ffa074c9be5c77b9c0a3536bf18665fdc0c5c88Nicolas Geoffray	$(DEX2OAT) --runtime-arg -Xms$(DEX2OAT_XMS) --runtime-arg -Xmx$(DEX2OAT_XMX) \
3869b79776f14108ea559e5e08f94a5188468fda1e9Ian Rogers		--boot-image=$(DEFAULT_DEX_PREOPT_BUILT_IMAGE) --dex-file=$(PRODUCT_OUT)/$(1) \
3879b79776f14108ea559e5e08f94a5188468fda1e9Ian Rogers		--dex-location=/$(1) --oat-file=$$@ \
3889b79776f14108ea559e5e08f94a5188468fda1e9Ian Rogers		--instruction-set=$(DEX2OAT_TARGET_ARCH) \
3893d12eadf67e263ebc7e533f8daa65029feb41313Douglas Leung		--instruction-set-variant=$(DEX2OAT_TARGET_CPU_VARIANT) \
3909b79776f14108ea559e5e08f94a5188468fda1e9Ian Rogers		--instruction-set-features=$(DEX2OAT_TARGET_INSTRUCTION_SET_FEATURES) \
3916e183f2e973a20f2eaca135c240908e1bf98c5d0Alex Light		--android-root=$(PRODUCT_OUT)/system --include-patch-information \
3926e183f2e973a20f2eaca135c240908e1bf98c5d0Alex Light		--runtime-arg -Xnorelocate
3932e01f2428d50cd3002266759a4de09d629059074Shih-wei Liao
3942e01f2428d50cd3002266759a4de09d629059074Shih-wei Liaoendif
395bc2f3e3e41d02eb2896dc16390c5c4023a7b5649Brian Carlstrom
396afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian RogersOAT_TARGET_RULES += oat-target-$(1)
39704941d992eca73f23ba268a0f422d501502cd6cfBrian Carlstromendef
398f8a199cb0c53b7a6f0def21ec5b462992d93746bIan Rogers
399bd411021057416e56a1544b98831b92faf66a1a1Brian Carlstrom$(foreach file,\
400bd411021057416e56a1544b98831b92faf66a1a1Brian Carlstrom  $(filter-out\
4017ab763caf16cc88a9696c1ebb727242106af61ebBrian Carlstrom    $(addprefix $(TARGET_OUT_JAVA_LIBRARIES)/,$(addsuffix .jar,$(LIBART_TARGET_BOOT_JARS))),\
402bd411021057416e56a1544b98831b92faf66a1a1Brian Carlstrom    $(wildcard $(TARGET_OUT_APPS)/*.apk) $(wildcard $(TARGET_OUT_JAVA_LIBRARIES)/*.jar)),\
40304941d992eca73f23ba268a0f422d501502cd6cfBrian Carlstrom  $(eval $(call declare-oat-target-target,$(subst $(PRODUCT_OUT)/,,$(file)))))
40404941d992eca73f23ba268a0f422d501502cd6cfBrian Carlstrom
40504941d992eca73f23ba268a0f422d501502cd6cfBrian Carlstrom.PHONY: oat-target
406afd9acc30bdd11cdd12d8209eb994cb371c65e33Ian Rogersoat-target: $(ART_TARGET_DEPENDENCIES) $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) $(OAT_TARGET_RULES)
407beb60e28572288772c219a0bd62457d7d9bbd1f5Ian Rogers
408a6cc893c4b142cd410fc956963b6f5a014e983adBrian Carlstrom.PHONY: oat-target-sync
40904941d992eca73f23ba268a0f422d501502cd6cfBrian Carlstromoat-target-sync: oat-target
41053fc75ae4ec907292adb6765be4d0d50584c4c1eAlex Light	$(TEST_ART_ADB_ROOT_AND_REMOUNT)
4110796af03edc06d92bb8d631f1c0c23befdae2315Brian Carlstrom	adb sync
4120796af03edc06d92bb8d631f1c0c23befdae2315Brian Carlstrom
41310edbb159afae232817c86fc06a6801349f05baeAndreas Gampe####################################################################################################
41410edbb159afae232817c86fc06a6801349f05baeAndreas Gampe# Fake packages to ensure generation of libopenjdkd when one builds with mm/mmm/mmma.
41510edbb159afae232817c86fc06a6801349f05baeAndreas Gampe#
41610edbb159afae232817c86fc06a6801349f05baeAndreas Gampe# The library is required for starting a runtime in debug mode, but libartd does not depend on it
41710edbb159afae232817c86fc06a6801349f05baeAndreas Gampe# (dependency cycle otherwise).
41810edbb159afae232817c86fc06a6801349f05baeAndreas Gampe#
41910edbb159afae232817c86fc06a6801349f05baeAndreas Gampe# Note: * As the package is phony to create a dependency the package name is irrelevant.
42010edbb159afae232817c86fc06a6801349f05baeAndreas Gampe#       * We make MULTILIB explicit to "both," just to state here that we want both libraries on
42110edbb159afae232817c86fc06a6801349f05baeAndreas Gampe#         64-bit systems, even if it is the default.
42210edbb159afae232817c86fc06a6801349f05baeAndreas Gampe
42310edbb159afae232817c86fc06a6801349f05baeAndreas Gampe# ART on the host.
42410edbb159afae232817c86fc06a6801349f05baeAndreas Gampeifeq ($(ART_BUILD_HOST_DEBUG),true)
42510edbb159afae232817c86fc06a6801349f05baeAndreas Gampeinclude $(CLEAR_VARS)
42610edbb159afae232817c86fc06a6801349f05baeAndreas GampeLOCAL_MODULE := art-libartd-libopenjdkd-host-dependency
42710edbb159afae232817c86fc06a6801349f05baeAndreas GampeLOCAL_MULTILIB := both
42810edbb159afae232817c86fc06a6801349f05baeAndreas GampeLOCAL_REQUIRED_MODULES := libopenjdkd
42910edbb159afae232817c86fc06a6801349f05baeAndreas GampeLOCAL_IS_HOST_MODULE := true
43010edbb159afae232817c86fc06a6801349f05baeAndreas Gampeinclude $(BUILD_PHONY_PACKAGE)
43110edbb159afae232817c86fc06a6801349f05baeAndreas Gampeendif
43210edbb159afae232817c86fc06a6801349f05baeAndreas Gampe
43310edbb159afae232817c86fc06a6801349f05baeAndreas Gampe# ART on the target.
43410edbb159afae232817c86fc06a6801349f05baeAndreas Gampeifeq ($(ART_BUILD_TARGET_DEBUG),true)
43510edbb159afae232817c86fc06a6801349f05baeAndreas Gampeinclude $(CLEAR_VARS)
43610edbb159afae232817c86fc06a6801349f05baeAndreas GampeLOCAL_MODULE := art-libartd-libopenjdkd-target-dependency
43710edbb159afae232817c86fc06a6801349f05baeAndreas GampeLOCAL_MULTILIB := both
43810edbb159afae232817c86fc06a6801349f05baeAndreas GampeLOCAL_REQUIRED_MODULES := libopenjdkd
43910edbb159afae232817c86fc06a6801349f05baeAndreas Gampeinclude $(BUILD_PHONY_PACKAGE)
44010edbb159afae232817c86fc06a6801349f05baeAndreas Gampeendif
44110edbb159afae232817c86fc06a6801349f05baeAndreas Gampe
44276aa0c0134a3e5754a877d42f2273858e1672cf3Brian Carlstrom########################################################################
443fa50baa45bf7c82e489bd66bbba70544f7981997Brian Carlstrom# "m build-art" for quick minimal build
444fa50baa45bf7c82e489bd66bbba70544f7981997Brian Carlstrom.PHONY: build-art
445fa50baa45bf7c82e489bd66bbba70544f7981997Brian Carlstrombuild-art: build-art-host build-art-target
446fa50baa45bf7c82e489bd66bbba70544f7981997Brian Carlstrom
447fa50baa45bf7c82e489bd66bbba70544f7981997Brian Carlstrom.PHONY: build-art-host
44863fc30e201a74dbad9422a6dbd4c39e4b60ac4c5Andreas Gampebuild-art-host:   $(HOST_OUT_EXECUTABLES)/art $(ART_HOST_DEPENDENCIES) $(HOST_CORE_IMG_OUTS)
449fa50baa45bf7c82e489bd66bbba70544f7981997Brian Carlstrom
450fa50baa45bf7c82e489bd66bbba70544f7981997Brian Carlstrom.PHONY: build-art-target
45163fc30e201a74dbad9422a6dbd4c39e4b60ac4c5Andreas Gampebuild-art-target: $(TARGET_OUT_EXECUTABLES)/art $(ART_TARGET_DEPENDENCIES) $(TARGET_CORE_IMG_OUTS)
4529583fbcf597eff6d0b3c5359b8e8d5f70ed82c40Nicolas Geoffray
4539583fbcf597eff6d0b3c5359b8e8d5f70ed82c40Nicolas Geoffray########################################################################
45458035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray# Rules for building all dependencies for tests.
45558035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray
45658035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray.PHONY: build-art-host-tests
45705b91251870533aae58670cd073643ae700c8521Yohann Rousselbuild-art-host-tests:   build-art-host $(TEST_ART_RUN_TEST_DEPENDENCIES) $(ART_TEST_HOST_RUN_TEST_DEPENDENCIES) $(ART_TEST_HOST_GTEST_DEPENDENCIES) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
45858035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray
45958035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray.PHONY: build-art-target-tests
46005b91251870533aae58670cd073643ae700c8521Yohann Rousselbuild-art-target-tests:   build-art-target $(TEST_ART_RUN_TEST_DEPENDENCIES) $(TEST_ART_TARGET_SYNC_DEPS) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
46158035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray
46258035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas Geoffray########################################################################
463a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom# targets to switch back and forth from libdvm to libart
464a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom
465a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom.PHONY: use-art
466a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstromuse-art:
46728a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
46828a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
469346265e4bea716fdadef24719709135c5dcf68fcBrian Carlstrom	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
4701e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom	adb shell start
471a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom
472a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom.PHONY: use-artd
473a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstromuse-artd:
47428a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
47528a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
476346265e4bea716fdadef24719709135c5dcf68fcBrian Carlstrom	adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
4771e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom	adb shell start
478a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom
479a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom.PHONY: use-dalvik
480a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstromuse-dalvik:
48128a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
48228a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
483346265e4bea716fdadef24719709135c5dcf68fcBrian Carlstrom	adb shell setprop persist.sys.dalvik.vm.lib.2 libdvm.so
4841e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom	adb shell start
4851e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom
4861e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom.PHONY: use-art-full
4871e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstromuse-art-full:
48828a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
48928a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
4900a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
4910a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell setprop dalvik.vm.dex2oat-filter \"\"
4920a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell setprop dalvik.vm.image-dex2oat-filter \"\"
493346265e4bea716fdadef24719709135c5dcf68fcBrian Carlstrom	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
494d71795bdc7a68b0bd40ebf8fdf195cf967240f84Mathieu Chartier	adb shell setprop dalvik.vm.usejit false
4951e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom	adb shell start
4961e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom
497cb9bccdf77e22604dcf9a9b9e8936ff747ef9f64Hiroshi Yamauchi.PHONY: use-artd-full
498cb9bccdf77e22604dcf9a9b9e8936ff747ef9f64Hiroshi Yamauchiuse-artd-full:
49928a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
50028a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
5010a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
5020a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell setprop dalvik.vm.dex2oat-filter \"\"
5030a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell setprop dalvik.vm.image-dex2oat-filter \"\"
504346265e4bea716fdadef24719709135c5dcf68fcBrian Carlstrom	adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
505d71795bdc7a68b0bd40ebf8fdf195cf967240f84Mathieu Chartier	adb shell setprop dalvik.vm.usejit false
506cb9bccdf77e22604dcf9a9b9e8936ff747ef9f64Hiroshi Yamauchi	adb shell start
507cb9bccdf77e22604dcf9a9b9e8936ff747ef9f64Hiroshi Yamauchi
508d71795bdc7a68b0bd40ebf8fdf195cf967240f84Mathieu Chartier.PHONY: use-art-jit
509d71795bdc7a68b0bd40ebf8fdf195cf967240f84Mathieu Chartieruse-art-jit:
51028a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
51128a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
5120a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
5132c9bd225dfa445a2967ebe8fa4428609020478b1Mathieu Chartier	adb shell setprop dalvik.vm.dex2oat-filter "verify-at-runtime"
5142c9bd225dfa445a2967ebe8fa4428609020478b1Mathieu Chartier	adb shell setprop dalvik.vm.image-dex2oat-filter "verify-at-runtime"
515346265e4bea716fdadef24719709135c5dcf68fcBrian Carlstrom	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
516d71795bdc7a68b0bd40ebf8fdf195cf967240f84Mathieu Chartier	adb shell setprop dalvik.vm.usejit true
5171e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom	adb shell start
5181e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom
5191e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom.PHONY: use-art-interpret-only
5201e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstromuse-art-interpret-only:
52128a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
52228a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
5230a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
5242e879694544744436a595eb30cd0b8ad4580c9dbBrian Carlstrom	adb shell setprop dalvik.vm.dex2oat-filter "interpret-only"
5252e879694544744436a595eb30cd0b8ad4580c9dbBrian Carlstrom	adb shell setprop dalvik.vm.image-dex2oat-filter "interpret-only"
526346265e4bea716fdadef24719709135c5dcf68fcBrian Carlstrom	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
527d71795bdc7a68b0bd40ebf8fdf195cf967240f84Mathieu Chartier	adb shell setprop dalvik.vm.usejit false
5281e895cd5a9b67fc7aa44445d1e5b54afa387e308Brian Carlstrom	adb shell start
529a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom
53015582b92c464151fa06f4d848165344885983888Sebastien Hertz.PHONY: use-artd-interpret-only
53115582b92c464151fa06f4d848165344885983888Sebastien Hertzuse-artd-interpret-only:
53228a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
53328a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
5340a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
5352e879694544744436a595eb30cd0b8ad4580c9dbBrian Carlstrom	adb shell setprop dalvik.vm.dex2oat-filter "interpret-only"
5362e879694544744436a595eb30cd0b8ad4580c9dbBrian Carlstrom	adb shell setprop dalvik.vm.image-dex2oat-filter "interpret-only"
53715582b92c464151fa06f4d848165344885983888Sebastien Hertz	adb shell setprop persist.sys.dalvik.vm.lib.2 libartd.so
538d71795bdc7a68b0bd40ebf8fdf195cf967240f84Mathieu Chartier	adb shell setprop dalvik.vm.usejit false
53915582b92c464151fa06f4d848165344885983888Sebastien Hertz	adb shell start
54015582b92c464151fa06f4d848165344885983888Sebastien Hertz
5414a200f56b7075309316b04d550c9cc50f8314eddJeff Hao.PHONY: use-art-verify-none
5424a200f56b7075309316b04d550c9cc50f8314eddJeff Haouse-art-verify-none:
54328a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb root
54428a42c1f3ba4711162b3d4f02262d72c6a8dd55dNicolas Geoffray	adb wait-for-device shell stop
5450a4c61db049f7ddcd9cbebb54e67a1285d621da9Hiroshi Yamauchi	adb shell rm -rf $(ART_TARGET_DALVIK_CACHE_DIR)/*
5462e879694544744436a595eb30cd0b8ad4580c9dbBrian Carlstrom	adb shell setprop dalvik.vm.dex2oat-filter "verify-none"
5472e879694544744436a595eb30cd0b8ad4580c9dbBrian Carlstrom	adb shell setprop dalvik.vm.image-dex2oat-filter "verify-none"
548346265e4bea716fdadef24719709135c5dcf68fcBrian Carlstrom	adb shell setprop persist.sys.dalvik.vm.lib.2 libart.so
549d71795bdc7a68b0bd40ebf8fdf195cf967240f84Mathieu Chartier	adb shell setprop dalvik.vm.usejit false
5504a200f56b7075309316b04d550c9cc50f8314eddJeff Hao	adb shell start
5514a200f56b7075309316b04d550c9cc50f8314eddJeff Hao
552a7a60a8244dd6f6e70ff1d7babf261c7a8da873aBrian Carlstrom########################################################################
553bc2f3e3e41d02eb2896dc16390c5c4023a7b5649Brian Carlstrom
55462e3ee3d5a8d3823f4537f48354159954ae6c5aaBrian Carlstromendif # !art_dont_bother
5558f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogers
5568f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogers# Clear locally used variables.
5578f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogersart_dont_bother :=
5588f0bbd235c30c99f16e10100036537dd0c0080b5Ian Rogersart_test_bother :=
55958035ae27c7668f3235bd90f0841b7cf3e7fe102Nicolas GeoffrayTEST_ART_TARGET_SYNC_DEPS :=
5600095d880767226b43e8c4f12798495fe65412ae7Narayan Kamath
5610095d880767226b43e8c4f12798495fe65412ae7Narayan Kamathinclude $(art_path)/runtime/openjdkjvm/Android.mk
5623052db1b6cf45b5c3ba6d5adafb47ebf3545590aAndreas Gampe
5633052db1b6cf45b5c3ba6d5adafb47ebf3545590aAndreas Gampe# Helper target that depends on boot image creation.
5643052db1b6cf45b5c3ba6d5adafb47ebf3545590aAndreas Gampe#
5653052db1b6cf45b5c3ba6d5adafb47ebf3545590aAndreas Gampe# Can be used, for example, to dump initialization failures:
5663052db1b6cf45b5c3ba6d5adafb47ebf3545590aAndreas Gampe#   m art-boot-image ART_BOOT_IMAGE_EXTRA_ARGS=--dump-init-failures=fails.txt
5673052db1b6cf45b5c3ba6d5adafb47ebf3545590aAndreas Gampe.PHONY: art-boot-image
5683052db1b6cf45b5c3ba6d5adafb47ebf3545590aAndreas Gampeart-boot-image: $(DEFAULT_DEX_PREOPT_BUILT_IMAGE_FILENAME)
569