Add a new script for buildbots to sync to device.
The makefile is using the built adb, which requires frameworks/base,
which we don't have.
Also remove artificial adb dependency when building art target tests.
Test: buildbot-sync.sh
Change-Id: I058b6371124e6040e9b064c99683bbdfc093e9fd
diff --git a/Android.mk b/Android.mk
index e27c3db..925f6e4 100644
--- a/Android.mk
+++ b/Android.mk
@@ -484,7 +484,7 @@
build-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)
.PHONY: build-art-target-tests
-build-art-target-tests: build-art-target $(TEST_ART_RUN_TEST_DEPENDENCIES) $(TEST_ART_TARGET_SYNC_DEPS) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
+build-art-target-tests: build-art-target $(TEST_ART_RUN_TEST_DEPENDENCIES) | $(TEST_ART_RUN_TEST_ORDERONLY_DEPENDENCIES)
########################################################################
# targets to switch back and forth from libdvm to libart
diff --git a/tools/buildbot-sync.sh b/tools/buildbot-sync.sh
new file mode 100755
index 0000000..01b3c0d
--- /dev/null
+++ b/tools/buildbot-sync.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+#
+# Copyright (C) 2018 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+adb wait-for-device
+
+if [[ -z "${ANDROID_PRODUCT_OUT}" ]]; then
+ echo 'ANDROID_PRODUCT_OUT environment variable is empty; did you forget to run `lunch`?'
+ exit 1
+fi
+
+if [[ -z "${ART_TEST_CHROOT}" ]]; then
+ echo 'ART_TEST_CHROOT environment variable is empty'
+ exit 1
+fi
+
+adb push ${ANDROID_PRODUCT_OUT}/system ${ART_TEST_CHROOT}/
+adb push ${ANDROID_PRODUCT_OUT}/data ${ART_TEST_CHROOT}/