Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3073)

Unified Diff: build/android/adb_install_content_shell

Issue 10825100: Android: follow up on instrumentation tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/all_android.gyp ('k') | build/android/buildbot_functions.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/adb_install_content_shell
diff --git a/build/android/adb_install_content_shell b/build/android/adb_install_content_shell
index d1a8ee965b9049df130ce4deee71998f71af405f..3667998cdc044c6703c95ed0e06fb4c9ccb0c4f9 100755
--- a/build/android/adb_install_content_shell
+++ b/build/android/adb_install_content_shell
@@ -4,6 +4,23 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# install -r doesn't always work? Try uninstalling first.
-adb uninstall org.chromium.content_shell
-adb install -r ${CHROME_SRC}/out/Release/content_shell/ContentShell-debug.apk
+CONTENT_SHELL_APK=${CHROME_SRC}/out/Release/content_shell/ContentShell-debug.apk
+
+if [ ! -f "${CONTENT_SHELL_APK}" ]; then
+ echo "Error: Could not find ${CONTENT_SHELL_APK} to install."
+ exit 1
+fi
+
+DEVS=$(adb devices | grep device | grep -v devices | awk '{ print $1 }')
+
+if [[ -z $DEVS ]]; then
+ echo "Error: No connected devices. Device needed to run content shell test."
+ exit 1
+fi
+
+for DEV in ${DEVS}; do
+ # Reinstall content shell. This will also kill existing content_shell procs.
+ echo "Installing ${CONTENT_SHELL_APK} in ${DEV}"
+ adb -s ${DEV} uninstall org.chromium.content_shell
+ adb -s ${DEV} install -r ${CONTENT_SHELL_APK}
+done
« no previous file with comments | « build/all_android.gyp ('k') | build/android/buildbot_functions.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698