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
=== modified file 'phablet-test-run'
--- phablet-test-run 2013-11-12 21:28:35 +0000
+++ phablet-test-run 2014-01-20 20:00:23 +0000
@@ -22,6 +22,7 @@
2222
23EXECUTE_COMMAND=023EXECUTE_COMMAND=0
24USER=phablet24USER=phablet
25ADBOPTS=""
25NOSHELL=026NOSHELL=0
26RETVAL=027RETVAL=0
27VERBOSE=""28VERBOSE=""
@@ -44,20 +45,15 @@
44}45}
4546
46wait_for_device() {47wait_for_device() {
47 adb -s $ANDROID_SERIAL wait-for-device48 adb $ADBOPTS wait-for-device
48}49}
4950
50exec_with_adb() {51exec_with_adb() {
51 adb -s $ANDROID_SERIAL shell /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"52 adb $ADBOPTS shell /usr/bin/env -i PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin "$@"
52}53}
5354
54exec_with_adb_user() {55exec_with_adb_user() {
55 adb -s $ANDROID_SERIAL shell sudo -u $USER -i sh -lc \'"$@"\'56 adb $ADBOPTS shell sudo -u $USER -i sh -lc \'"$@"\'
56}
57
58adb_root() {
59 adb root
60 adb wait-for-device
61}57}
6258
63install_packages() {59install_packages() {
@@ -172,7 +168,7 @@
172 TESTPACKAGES="$TESTPACKAGES $OPTARG"168 TESTPACKAGES="$TESTPACKAGES $OPTARG"
173 ;;169 ;;
174 s)170 s)
175 ANDROID_SERIAL=$OPTARG171 ADBOPTS="-s $OPTARG"
176 ;;172 ;;
177 x)173 x)
178 EXECUTE_COMMAND=1174 EXECUTE_COMMAND=1
@@ -191,14 +187,6 @@
191 exit 0187 exit 0
192fi188fi
193189
194if test -z $ANDROID_SERIAL; then
195 ANDROID_SERIAL=$(adb devices -l | grep usb | cut -f 1 -d " " | head -n1)
196fi
197export ANDROID_SERIAL=$ANDROID_SERIAL
198
199adb_root
200
201
202install_packages190install_packages
203191
204if [ $NOSHELL -eq 1 ]; then192if [ $NOSHELL -eq 1 ]; then

Subscribers

People subscribed via source and target branches