OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # install -r doesn't always work? Try uninstalling first. | 7 CONTENT_SHELL_APK=${CHROME_SRC}/out/Release/content_shell/ContentShell-debug.apk |
8 adb uninstall org.chromium.content_shell | 8 |
9 adb install -r ${CHROME_SRC}/out/Release/content_shell/ContentShell-debug.apk | 9 if [ ! -f "${CONTENT_SHELL_APK}" ]; then |
| 10 echo "Error: Could not find ${CONTENT_SHELL_APK} to install." |
| 11 exit 1 |
| 12 fi |
| 13 |
| 14 DEVS=$(adb devices | grep device | grep -v devices | awk '{ print $1 }') |
| 15 |
| 16 if [[ -z $DEVS ]]; then |
| 17 echo "Error: No connected devices. Device needed to run content shell test." |
| 18 exit 1 |
| 19 fi |
| 20 |
| 21 for DEV in ${DEVS}; do |
| 22 # Reinstall content shell. This will also kill existing content_shell procs. |
| 23 echo "Installing ${CONTENT_SHELL_APK} in ${DEV}" |
| 24 adb -s ${DEV} uninstall org.chromium.content_shell |
| 25 adb -s ${DEV} install -r ${CONTENT_SHELL_APK} |
| 26 done |
OLD | NEW |