summaryrefslogtreecommitdiffstats
path: root/Android.mk
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2015-11-20 15:35:48 -0800
committerAlex Light <allight@google.com>2015-11-20 17:01:30 -0800
commit53fc75ae4ec907292adb6765be4d0d50584c4c1e (patch)
tree3f40e5d48e2275ba9cfa69b35558e197bac9d742 /Android.mk
parentb9bbbeb2b05d74cae0fe0682a26b19f5a7e68d8c (diff)
downloadandroid_art-53fc75ae4ec907292adb6765be4d0d50584c4c1e.tar.gz
android_art-53fc75ae4ec907292adb6765be4d0d50584c4c1e.tar.bz2
android_art-53fc75ae4ec907292adb6765be4d0d50584c4c1e.zip
Make target-sync work with verity.
It will disable verity and restart and try again if the adb remount does not actually work. Change-Id: Icf3589c40682e09e1c4e099f173a2e51fe8a20f9
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk18
1 files changed, 13 insertions, 5 deletions
diff --git a/Android.mk b/Android.mk
index fcf70ff2eb..0d0003abb0 100644
--- a/Android.mk
+++ b/Android.mk
@@ -122,6 +122,16 @@ include $(art_path)/build/Android.gtest.mk
include $(art_path)/test/Android.run-test.mk
include $(art_path)/benchmark/Android.mk
+TEST_ART_ADB_ROOT_AND_REMOUNT := \
+ (adb root && \
+ adb wait-for-device remount && \
+ ((adb shell touch /system/testfile && \
+ (adb shell rm /system/testfile || true)) || \
+ (adb disable-verity && \
+ adb reboot && \
+ adb wait-for-device root && \
+ adb wait-for-device 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,
@@ -130,12 +140,11 @@ include $(art_path)/benchmark/Android.mk
ifneq ($(ART_TEST_NO_SYNC),true)
ifeq ($(ART_TEST_ANDROID_ROOT),)
test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
- adb root
- adb wait-for-device remount
+ $(TEST_ART_ADB_ROOT_AND_REMOUNT)
adb sync
else
test-art-target-sync: $(TEST_ART_TARGET_SYNC_DEPS)
- adb root
+ $(TEST_ART_ADB_ROOT_AND_REMOUNT)
adb wait-for-device push $(ANDROID_PRODUCT_OUT)/system $(ART_TEST_ANDROID_ROOT)
adb push $(ANDROID_PRODUCT_OUT)/data /data
endif
@@ -374,8 +383,7 @@ oat-target: $(ART_TARGET_DEPENDENCIES) $(DEFAULT_DEX_PREOPT_INSTALLED_IMAGE) $(O
.PHONY: oat-target-sync
oat-target-sync: oat-target
- adb root
- adb wait-for-device remount
+ $(TEST_ART_ADB_ROOT_AND_REMOUNT)
adb sync
########################################################################