~larry-e-works/+junk/benchmark-with-emulator

« back to all changes in this revision

Viewing changes to scripts/run-emulator.sh

  • Committer: Larry Works
  • Date: 2014-02-27 16:18:22 UTC
  • Revision ID: larry.works@canonical.com-20140227161822-jart0mwvsy0xs0ln
Added files, modified files to support benchmark testing via emulator. Additions and modifications based on Andy's code found at lp:~doanac/ubuntu-test-cases/touch-emulator-support

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
set -ex
 
3
 
 
4
EMULATOR_DIR=${EMULATOR_DIR-`pwd`/emulator}
 
5
cd $EMULATOR_DIR
 
6
 
 
7
setup_emulator() {
 
8
    for j in `seq 3`
 
9
    do
 
10
        killall emulator-arm || true
 
11
 
 
12
        ./run-emulator.sh &
 
13
 
 
14
        adb wait-for-device
 
15
        sleep 160
 
16
 
 
17
        for i in `seq 10`
 
18
        do
 
19
            sleep 10
 
20
            adb shell sudo -i -u phablet status unity8 | grep -q start/running && break 2
 
21
        done
 
22
 
 
23
        echo "Error: Emulator failed to fully boot"
 
24
 
 
25
        [ "$j" = "3" ] && { echo "Error: Giving up"; exit 1; }
 
26
    done
 
27
}
 
28
 
 
29
setup_emulator