Merge lp:~fginther/ubuntu-touch-boottest/console-log-cleanup into lp:ubuntu-touch-boottest

Proposed by Francis Ginther
Status: Merged
Approved by: Francis Ginther
Approved revision: 8
Merged at revision: 6
Proposed branch: lp:~fginther/ubuntu-touch-boottest/console-log-cleanup
Merge into: lp:ubuntu-touch-boottest
Diff against target: 70 lines (+11/-9)
1 file modified
boottest.sh (+11/-9)
To merge this branch: bzr merge lp:~fginther/ubuntu-touch-boottest/console-log-cleanup
Reviewer Review Type Date Requested Status
Paul Larson Approve
Evan (community) Approve
Review via email: mp+261298@code.launchpad.net

Commit message

Provide END_MESSAGEs for all exit paths and redirect provisiong to it's own log file.

Description of the change

To post a comment you must log in.
7. By Francis Ginther

Cleanup tabs.

Revision history for this message
Evan (ev) wrote :

Minor nits, but don't block on these +1

review: Approve
Revision history for this message
Paul Larson (pwlars) wrote :

A couple of small items

review: Needs Fixing
8. By Francis Ginther

Apply fixes from review comments.

Revision history for this message
Francis Ginther (fginther) wrote :
Revision history for this message
Paul Larson (pwlars) wrote :

Looks good, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'boottest.sh'
2--- boottest.sh 2015-06-05 20:15:05 +0000
3+++ boottest.sh 2015-06-06 02:56:04 +0000
4@@ -23,10 +23,8 @@
5
6 # Setup our dependencies
7 UTILDIR="${BASEDIR}/utils"
8-if [ -f "${UTILDIR}" ]; then
9- rm -rf "${UTILDIR}"
10-fi
11-bzr branch lp:ubuntu-test-cases/touch $UTILDIR
12+rm -rf "${UTILDIR}"
13+bzr checkout --lightweight lp:ubuntu-test-cases/touch $UTILDIR
14
15 # Default adt-run timeout
16 export ADT_TIMEOUT=${ADT_TIMEOUT:-600}
17@@ -68,7 +66,6 @@
18 [ -z ${NODE_NAME} ] || ${UTILDIR}/scripts/recover.py ${NODE_NAME}
19
20 # Leave a parting message
21- # (disable command tracing as it confuses the output)
22 [ -z "${END_MESSAGE}" ] || echo -e "\n\n${END_MESSAGE}\n\n"
23 }
24 trap exit_handler SIGINT SIGTERM EXIT
25@@ -123,7 +120,7 @@
26 if [ -n "${NODE_NAME}" ]; then
27 while [ ${RETRY} -gt 0 ]; do
28 echo "Provisioning device"
29- ${PROV_CMD} && break
30+ ${PROV_CMD} > "provision.log" 2>&1 && break
31 PROV_ERR=$?
32 # Make sure the device doesn't need to be recovered first
33 ${UTILDIR}/scripts/recover.py ${NODE_NAME}
34@@ -138,7 +135,7 @@
35 echo "Provisioning failed, retrying up to ${RETRY} more times..."
36 done
37 if [ ${RETRY} -eq 0 ]; then
38- echo ERROR: Device provisioning failed!
39+ END_MESSAGE="ERROR: Device provisioning failed!"
40 exit 1
41 fi
42 fi
43@@ -215,7 +212,7 @@
44 adb pull /home/phablet/sourcepkg-version results/sourcepkg-version
45 echo "Version tested: $(cat results/sourcepkg-version)"
46 grep -q 'ERROR' results/sourcepkg-version && \
47- END_MESSAGE="$(cat results/sourcepkg-version)"
48+ END_MESSAGE="$(cat results/sourcepkg-version)"
49 set -e
50 fi
51
52@@ -226,12 +223,17 @@
53
54 if [ -e "results/sourcepkg-version" -a -e "results/testbed-packages" ]; then
55 result='PASS'
56+ END_MESSAGE="PASS: Boottest passed"
57 resultfile=results/${RELEASE}_${ARCH}_${SRC_PKG_NAME}_$(date +%Y%m%d-%H%M%S).result
58- [ $RET -gt 0 ] && result="FAIL"
59+ if [ $RET -gt 0 ]; then
60+ result="FAIL"
61+ END_MESSAGE="FAIL: Boottest failure"
62+ fi
63 echo "$RELEASE $ARCH ${SRC_PKG_NAME} $(cat results/sourcepkg-version) $result $(sort -u results/*-packages|tr -s '[\n\t]' ' ')" > $resultfile
64 [ -f "$resultfile" ] && ${RSYNC} -a $resultfile $RSYNC_DEST/${RELEASE}/tmp/ || true
65 else
66 # Something went wrong with the testbed
67+ END_MESSAGE="ERROR: Boottest testbed failure"
68 errfile=results/${RELEASE}_${ARCH}_${SRC_PKG_NAME}_$(date +%Y%m%d-%H%M%S).error
69 echo "$RELEASE $ARCH $SRC_PKG_NAME" > $errfile
70 [ -f "$errfile" ] && ${RSYNC} -a $errfile $RSYNC_DEST/${RELEASE}/tmp/ || true

Subscribers

People subscribed via source and target branches