Merge lp:~bzoltan/qtcreator-plugin-ubuntu/find_arch into lp:qtcreator-plugin-ubuntu

Proposed by Zoltan Balogh
Status: Merged
Approved by: Zoltan Balogh
Approved revision: 229
Merged at revision: 229
Proposed branch: lp:~bzoltan/qtcreator-plugin-ubuntu/find_arch
Merge into: lp:qtcreator-plugin-ubuntu
Diff against target: 51 lines (+30/-6)
2 files modified
share/qtcreator/ubuntu/scripts/device_search (+18/-5)
share/qtcreator/ubuntu/scripts/local_search_images (+12/-1)
To merge this branch: bzr merge lp:~bzoltan/qtcreator-plugin-ubuntu/find_arch
Reviewer Review Type Date Requested Status
Benjamin Zeller Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+229097@code.launchpad.net

Commit message

Discover the processor type of the device and the emulator

Description of the change

Discover the processor type of the device and the emulator

To post a comment you must log in.
228. By Zoltan Balogh

discover device arch

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
229. By Zoltan Balogh

Handle the case when the serial number is wrong

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Benjamin Zeller (zeller-benjamin) wrote :

OK

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'share/qtcreator/ubuntu/scripts/device_search'
2--- share/qtcreator/ubuntu/scripts/device_search 2014-05-14 14:18:55 +0000
3+++ share/qtcreator/ubuntu/scripts/device_search 2014-08-01 06:08:23 +0000
4@@ -19,8 +19,21 @@
5 adb kill-server > /dev/null
6 adb start-server > /dev/null
7 fi
8-#adb root &> /dev/null
9-#if [ $?==1 ]; then
10-# exit
11-#fi
12-adb devices -l | grep -Ev "List of devices attached" | grep -Ev "emulator-" | sed "/^$/d"
13+
14+IFS=$'\n'
15+
16+for DEVICES_INFO in `adb devices -l | grep -Ev "List of devices attached" | grep -Ev "emulator-" | sed "/^$/d"`
17+do
18+ if [[ ${DEVICES_INFO} =~ ^([a-z0-9]+)(.*)$ ]]; then
19+ NAME="${BASH_REMATCH[1]}"
20+ REST="${BASH_REMATCH[2]}"
21+ ARCH=`adb -s ${NAME} shell uname -p 2>&1|egrep -v "device not found"`
22+ if [ $? -ne 0 ]
23+ then
24+ continue
25+ fi
26+ ARCH=${ARCH/arm*/armhf}
27+ ARCH=${ARCH//[[:blank:]]/}
28+ echo "$NAME$REST arch:$ARCH"
29+ fi
30+done
31
32=== modified file 'share/qtcreator/ubuntu/scripts/local_search_images'
33--- share/qtcreator/ubuntu/scripts/local_search_images 2014-03-06 14:00:58 +0000
34+++ share/qtcreator/ubuntu/scripts/local_search_images 2014-08-01 06:08:23 +0000
35@@ -17,4 +17,15 @@
36
37 set -e
38
39-ubuntu-emulator list 2>&1|grep -v "no such file or directory"
40+IFS=$'\n'
41+
42+for EMULATOR_INFO in `ubuntu-emulator list 2>&1|grep -v "no such file or directory"`
43+do
44+ if [[ ${EMULATOR_INFO} =~ ^([A-Za-z0-9._%+-]+)([^ ]*) ]]; then
45+ NAME="${BASH_REMATCH[1]}"
46+ REST="${BASH_REMATCH[2]}"
47+ ARCH=`cat ${HOME}/.local/share/ubuntu-emulator/${NAME}/.device`
48+ ARCH=${ARCH//[[:blank:]]/}
49+ echo "$NAME${REST},arch=$ARCH"
50+ fi
51+done

Subscribers

People subscribed via source and target branches

to all changes: