~pwlars/ubuntu-test-cases/krillin-recovery

« back to all changes in this revision

Viewing changes to scripts/jenkins.sh

  • Committer: Andy Doan
  • Date: 2013-10-21 01:55:41 UTC
  • mto: This revision was merged to the branch mainline in revision 74.
  • Revision ID: andy.doan@canonical.com-20131021015541-p96i911kqdm28kmo
oops - typo when converting to apconfig.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
        [ -z $ANDROID_SERIAL ] || ADBOPTS="-s $ANDROID_SERIAL"
48
48
 
49
 
        # If we are not in the utah group, then we don't have permissions
50
 
        # for /var/lib/utah, so run under sudo
51
 
        if ! groups |grep -q utah ; then
52
 
                SUDO="sudo"
53
 
                sudo TARGET_PREFIX="${TARGET_PREFIX}" PATH="${PATH}" \
54
 
                        ${UTAH_PHABLET_CMD} \
55
 
                        ${ADBOPTS} \
56
 
                        --from-host \
57
 
                        --whoopsie \
58
 
                        --results-dir "${RESDIR}" \
59
 
                        --skip-install --skip-network --skip-utah \
60
 
                        --pull /var/crash \
61
 
                        --pull /home/phablet/.cache/upstart \
62
 
                        --pull /tmp/xmlresults \
63
 
                        --pull /var/log/syslog \
64
 
                        --pull /var/log/kern.log \
65
 
                        --pull /var/log/upstart/whoopsie.log \
66
 
                        $EXTRA_PULL \
67
 
                        -l "${TESTSUITE_HOST}/master.run"
68
 
        else
69
 
                TARGET_PREFIX="${TARGET_PREFIX}" PATH="${PATH}" \
70
 
                        ${UTAH_PHABLET_CMD} \
71
 
                        ${ADBOPTS} \
72
 
                        --from-host \
73
 
                        --whoopsie \
74
 
                        --results-dir "${RESDIR}" \
75
 
                        --skip-install --skip-network --skip-utah \
76
 
                        --pull /var/crash \
77
 
                        --pull /home/phablet/.cache/upstart \
78
 
                        --pull /tmp/xmlresults \
79
 
                        --pull /var/log/syslog \
80
 
                        --pull /var/log/kern.log \
81
 
                        --pull /var/log/upstart/whoopsie.log \
82
 
                        $EXTRA_PULL \
83
 
                        -l "${TESTSUITE_HOST}/master.run"
84
 
        fi
 
49
        sudo TARGET_PREFIX=$TARGET_PREFIX PATH="${PATH}" ${UTAH_PHABLET_CMD} \
 
50
                ${ADBOPTS} \
 
51
                --from-host \
 
52
                --results-dir ${RESDIR} \
 
53
                --skip-install --skip-network --skip-utah \
 
54
                --pull /var/crash \
 
55
                --pull /home/phablet/.cache/upstart \
 
56
                --pull /tmp/xmlresults \
 
57
                $EXTRA_PULL \
 
58
                -l ${TESTSUITE_HOST}/master.run
85
59
 
86
60
        # make sure the user running this script can remove its artifacts.
87
 
        # only run this if we had to run under sudo
88
 
        if [ "${SUDO}" = "sudo" ] ; then
89
 
                sudo chown -R "${USER}" ${RESDIR}
90
 
        fi
 
61
        sudo chown -R `whoami` ${RESDIR}
91
62
}
92
63
 
93
64
assert_image() {
119
90
        adb shell "top -n1 -b" > ${RESDIR}/top.log
120
91
 
121
92
        set -x
122
 
        adb shell 'sudo rm -f /var/crash/*'
 
93
        adb shell 'rm -f /var/crash/*'
123
94
        if [ -z $QUICK ] ; then
124
95
                # get the phone in sane place
125
96
                adb reboot
130
101
                sleep 5
131
102
                adb wait-for-device
132
103
                phablet-network --skip-setup -t 90s
133
 
                adb shell sudo powerd-cli active &
 
104
                adb shell powerd-cli active &
134
105
                PIDS="$PIDS $!"
135
 
                adb shell sudo powerd-cli display on &
 
106
                adb shell powerd-cli display on &
136
107
                PIDS="$PIDS $!"
137
108
        else
138
109
                echo "SKIPPING phone reboot..."
139
110
        fi
140
111
 
141
 
        ${BASEDIR}/utils/host/adb-shell "sudo aa-clickhook -f --include=/usr/share/autopilot-touch/apparmor/click.rules"
 
112
        ${BASEDIR}/utils/host/adb-shell "aa-clickhook -f --include=/usr/share/autopilot-touch/apparmor/click.rules"
142
113
 
143
114
        echo "launching test from the host...."
144
115
        test_from_host
145
 
        adb shell 'sudo rm -f /var/crash/*'
 
116
        adb shell 'rm -f /var/crash/*'
146
117
 
147
118
        if ! `grep "^errors: [!0]" < $UTAHFILE >/dev/null` ; then
148
119
                echo "errors found"