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

Side by Side Diff: build/android/adb_install_content_shell

Issue 10824227: Organize adb install cmds and reboot on failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/usr/bin/env python
bulach 2012/08/09 12:36:52 nice! :)
Isaac (away) 2012/08/10 04:44:35 I thought you'd like that :-)
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 CONTENT_SHELL_APK=${CHROME_SRC}/out/Release/content_shell/ContentShell-debug.apk 7 import os
8 from pylib import android_commands
8 9
9 if [ ! -f "${CONTENT_SHELL_APK}" ]; then 10 devices = android_commands.GetAttachedDevices()
10 echo "Error: Could not find ${CONTENT_SHELL_APK} to install." 11 apk_path = os.path.join(os.environ['CHROME_SRC'],
11 exit 1 12 'out/Release/content_shell/ContentShell-debug.apk')
12 fi
13 13
14 DEVS=$(adb devices | grep device | grep -v devices | awk '{ print $1 }') 14 if not devices:
15 print 'Error: no connected devices'
16 exit(1)
15 17
16 if [[ -z $DEVS ]]; then 18 for device in devices:
17 echo "Error: No connected devices. Device needed to run content shell test." 19 print android_commands.AndroidCommands(device=device).ManagedInstall(
18 exit 1 20 apk_path, False, 'org.chromium.content_shell')
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
OLDNEW
« no previous file with comments | « no previous file | build/android/pylib/android_commands.py » ('j') | build/android/pylib/android_commands.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698