summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorRoland Levillain <rpl@google.com>2017-10-30 13:14:28 +0000
committerRoland Levillain <rpl@google.com>2018-05-08 13:55:56 +0100
commit76cfe61b0c20f7c9d9ba9b60b188f483d81c5f68 (patch)
tree7ac27f14dedefc355c9f890d339397b8fdcb3e52 /Android.mk
parentb865d9af3bb5f4777dbe9cbd60cdb2a8fe5f0557 (diff)
downloadart-76cfe61b0c20f7c9d9ba9b60b188f483d81c5f68.tar.gz
art-76cfe61b0c20f7c9d9ba9b60b188f483d81c5f68.tar.bz2
art-76cfe61b0c20f7c9d9ba9b60b188f483d81c5f68.zip
Support ART on-device testing in a chroot environment.
This change updates the ART test rules and scripts to allow installation and ART testing in a chroot directory on device. All existing ART testing is supported: - ART gtests (with and without Valgrind). - ART run-tests. - libcore tests (with companion CL in external/vogar). - JDWP tests (with companion CL in external/vogar). Test: Run ART tests (gtest, run-tests, libcore tests, JDWP tests) in chroot Bug: 34729697 Bug: 68125496 Change-Id: I398e9bafee61eccd98d827ab8d9b8f6395aaa853
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk27
1 files changed, 19 insertions, 8 deletions
diff --git a/Android.mk b/Android.mk
index 64b9400f66..d6472be895 100644
--- a/Android.mk
+++ b/Android.mk
@@ -110,22 +110,33 @@ TEST_ART_ADB_ROOT_AND_REMOUNT := \
# Sync test files to the target, depends upon all things that must be pushed to the target.
.PHONY: test-art-target-sync
-# Check if we need to sync. In case ART_TEST_ANDROID_ROOT is not empty,
-# the code below uses 'adb push' instead of 'adb sync', which does not
-# check if the files on the device have changed.
+# Check if we need to sync. In case ART_TEST_CHROOT or ART_TEST_ANDROID_ROOT
+# is not empty, the code below uses 'adb push' instead of 'adb sync',
+# which does not check if the files on the device have changed.
+# TODO: Remove support for ART_TEST_ANDROID_ROOT when it is no longer needed.
ifneq ($(ART_TEST_NO_SYNC),true)
+# Sync system and data partitions.
ifeq ($(ART_TEST_ANDROID_ROOT),)
+ifeq ($(ART_TEST_CHROOT),)
test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
$(TEST_ART_ADB_ROOT_AND_REMOUNT)
adb sync system && adb sync data
else
test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
$(TEST_ART_ADB_ROOT_AND_REMOUNT)
- adb wait-for-device push $(PRODUCT_OUT)/system $(ART_TEST_ANDROID_ROOT)
-# Push the contents of the `data` dir into `/data` on the device. If
-# `/data` already exists on the device, it is not overwritten, but its
-# contents are updated.
- adb push $(PRODUCT_OUT)/data /
+ adb wait-for-device
+ adb push $(PRODUCT_OUT)/system $(ART_TEST_CHROOT)/
+ adb push $(PRODUCT_OUT)/data $(ART_TEST_CHROOT)/
+endif
+else
+test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
+ $(TEST_ART_ADB_ROOT_AND_REMOUNT)
+ adb wait-for-device
+ adb push $(PRODUCT_OUT)/system $(ART_TEST_CHROOT)$(ART_TEST_ANDROID_ROOT)
+# Push the contents of the `data` dir into `$(ART_TEST_CHROOT)/data` on the device (note
+# that $(ART_TEST_CHROOT) can be empty). If `$(ART_TEST_CHROOT)/data` already exists on
+# the device, it is not overwritten, but its content is updated.
+ adb push $(PRODUCT_OUT)/data $(ART_TEST_CHROOT)/
endif
endif