~nuclearbob/lrt/lrt-full

« back to all changes in this revision

Viewing changes to lrt_setup.sh

  • Committer: Max Brustkern
  • Date: 2015-01-14 19:27:22 UTC
  • mfrom: (92.1.1 lrt-full)
  • Revision ID: max@canonical.com-20150114192722-ecqj0rr58u1j1o7z
Megred changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
set -ex
 
4
 
 
5
exec_with_adb() { 
 
6
    adb -s $ANDROID_SERIAL shell "echo 1234|sudo -S $@"
 
7
}
 
8
 
 
9
 
 
10
# Install the latest requested image
 
11
adb -s $ANDROID_SERIAL wait-for-device
 
12
 
 
13
 
 
14
sudo ubuntu-device-flash touch --channel=ubuntu-touch/ubuntu-rtm/14.09-proposed --developer-mode --serial=$ANDROID_SERIAL --password=1234 --wipe
 
15
 
 
16
#sudo ubuntu-device-flash --channel=ubuntu-touch/ubuntu-rtm/14.09-proposed --developer-mode --serial=$ANDROID_SERIAL --password=1234
 
17
 
 
18
adb -s $ANDROID_SERIAL wait-for-device
 
19
sleep 130
 
20
 
 
21
 
 
22
phablet-config -s $ANDROID_SERIAL welcome-wizard --disable
 
23
exec_with_adb 'touch /userdata/.writable_image'
 
24
exec_with_adb 'reboot'
 
25
 
 
26
sleep 10
 
27
adb -s $ANDROID_SERIAL  wait-for-device
 
28
sleep 130
 
29
phablet-config -s $ANDROID_SERIAL edges-intro --disable
 
30
sudo phablet-network -s $ANDROID_SERIAL
 
31
 
 
32
 
 
33
 
 
34
phablet-test-run -s $ANDROID_SERIAL -x 'ping -c 2 launchpad.net' || phablet-test-run -s $ANDROID_SERIAL -x 'nmcli nm wifi on'
 
35
 
 
36
 
 
37
sudo phablet-network -s $ANDROID_SERIAL
 
38
 
 
39
exec_with_adb 'apt-get update'
 
40
sleep 10
 
41
exec_with_adb 'apt-get update'
 
42
sleep 10
 
43
exec_with_adb 'apt-get update'
 
44
sleep 10
 
45
 
 
46
exec_with_adb 'apt-get install bzr -y'
 
47
exec_with_adb 'apt-get install python3-autopilot autopilot-touch -y'
 
48
exec_with_adb 'apt-get install gdb gdb-multiarch apport-retrace python3-apport python3-requests-oauthlib -y'
 
49
exec_with_adb 'apt-get install imagemagick -y'
 
50
exec_with_adb 'touch /etc/apport/autoreport'
 
51
exec_with_adb 'mkdir -p /var/lib/apport'
 
52
exec_with_adb 'touch /var/lib/apport/autoreport'
 
53
exec_with_adb "sed -i 's/report_crashes=false/report_crashes=true/g' /etc/default/whoopsie"
 
54
 
 
55
adb -s $ANDROID_SERIAL push /get_sudo.sh /home/phablet/get_sudo.sh
 
56
adb -s $ANDROID_SERIAL shell chmod +x /home/phablet/get_sudo.sh
 
57
exec_with_adb /home/phablet/get_sudo.sh
 
58
 
 
59
phablet-click-test-setup -s $ANDROID_SERIAL --distribution ubuntu-rtm --series 14.09
 
60
 
 
61
phablet-test-run -s $ANDROID_SERIAL -x "mkdir -p autopilot && cd autopilot && rm -rf lrt && bzr branch lp:~nuclearbob/lrt/lrt-full lrt -Ossl.cert_reqs=none"