aboutsummaryrefslogtreecommitdiffhomepage
path: root/platform_tools/android/bin/android_kill_skia
diff options
context:
space:
mode:
authorGravatar borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-16 18:12:34 +0000
committerGravatar borenet@google.com <borenet@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-16 18:12:34 +0000
commit8371e704b77f213fc59cce860e6cf98db7318df4 (patch)
treedd87631b51bf562de17261ec87be5a09b5373c11 /platform_tools/android/bin/android_kill_skia
parent05403dfe240d47df6ef1634fb03633fe797baf11 (diff)
Fix android_run_skia to work with multiple attached devices
(SkipBuildbotRuns) R=djsollen@google.com Review URL: https://codereview.chromium.org/15199005 git-svn-id: http://skia.googlecode.com/svn/trunk@9167 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'platform_tools/android/bin/android_kill_skia')
-rwxr-xr-xplatform_tools/android/bin/android_kill_skia23
1 files changed, 20 insertions, 3 deletions
diff --git a/platform_tools/android/bin/android_kill_skia b/platform_tools/android/bin/android_kill_skia
index 5560efc746..a17f88d973 100755
--- a/platform_tools/android/bin/android_kill_skia
+++ b/platform_tools/android/bin/android_kill_skia
@@ -6,11 +6,28 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/utils/setup_adb.sh
+SERIAL=""
+
+while (( "$#" )); do
+
+ if [[ "$1" == "-s" ]];
+ then
+ if [[ $# -lt 2 ]];
+ then
+ echo "ERROR: missing serial number"
+ exit 1;
+ fi
+ SERIAL="-s $2"
+ shift
+ fi
+ shift
+done
+
if [ $(uname) == "Linux" ]; then
- $ADB shell ps | grep skia | awk '{print $2}' | xargs -r $ADB shell kill
+ $ADB $SERIAL shell ps | grep skia | awk '{print $2}' | xargs -r $ADB $SERIAL shell kill
elif [ $(uname) == "Darwin" ]; then
- $ADB shell ps | grep skia | awk '{print $2}' | xargs $ADB shell kill
+ $ADB $SERIAL shell ps | grep skia | awk '{print $2}' | xargs $ADB $SERIAL shell kill
else
echo "Could not automatically determine OS!"
exit 1;
-fi
+fi \ No newline at end of file