Merge lp:~sergiusens/phablet-tools/1270497 into lp:phablet-tools

Proposed by Sergio Schvezov
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 234
Merged at revision: 234
Proposed branch: lp:~sergiusens/phablet-tools/1270497
Merge into: lp:phablet-tools
Diff against target: 59 lines (+5/-17)
1 file modified
phablet-test-run (+5/-17)
To merge this branch: bzr merge lp:~sergiusens/phablet-tools/1270497
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+202368@code.launchpad.net

Commit message

Removing device serial detection and using the same mechanism as in other tools.
Removing the unnecessary call to adb root.

To post a comment you must log in.
lp:~sergiusens/phablet-tools/1270497 updated
234. By Sergio Schvezov

Removing logic to detect the default adb device and the unnecessary call to adb root

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

Good, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'phablet-test-run'
2--- phablet-test-run 2013-11-12 21:28:35 +0000
3+++ phablet-test-run 2014-01-20 20:00:23 +0000
4@@ -22,6 +22,7 @@
5
6 EXECUTE_COMMAND=0
7 USER=phablet
8+ADBOPTS=""
9 NOSHELL=0
10 RETVAL=0
11 VERBOSE=""
12@@ -44,20 +45,15 @@
13 }
14
15 wait_for_device() {
16- adb -s $ANDROID_SERIAL wait-for-device
17+ adb $ADBOPTS wait-for-device
18 }
19
20 exec_with_adb() {
21- adb -s $ANDROID_SERIAL shell /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"
22+ adb $ADBOPTS shell /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"
23 }
24
25 exec_with_adb_user() {
26- adb -s $ANDROID_SERIAL shell sudo -u $USER -i sh -lc \'"$@"\'
27-}
28-
29-adb_root() {
30- adb root
31- adb wait-for-device
32+ adb $ADBOPTS shell sudo -u $USER -i sh -lc \'"$@"\'
33 }
34
35 install_packages() {
36@@ -172,7 +168,7 @@
37 TESTPACKAGES="$TESTPACKAGES $OPTARG"
38 ;;
39 s)
40- ANDROID_SERIAL=$OPTARG
41+ ADBOPTS="-s $OPTARG"
42 ;;
43 x)
44 EXECUTE_COMMAND=1
45@@ -191,14 +187,6 @@
46 exit 0
47 fi
48
49-if test -z $ANDROID_SERIAL; then
50- ANDROID_SERIAL=$(adb devices -l | grep usb | cut -f 1 -d " " | head -n1)
51-fi
52-export ANDROID_SERIAL=$ANDROID_SERIAL
53-
54-adb_root
55-
56-
57 install_packages
58
59 if [ $NOSHELL -eq 1 ]; then

Subscribers

People subscribed via source and target branches