Merge lp:~fginther/ubuntu-touch-boottest/dump-log-on-failure into lp:ubuntu-touch-boottest

Proposed by Francis Ginther
Status: Merged
Approved by: Francis Ginther
Approved revision: 10
Merged at revision: 8
Proposed branch: lp:~fginther/ubuntu-touch-boottest/dump-log-on-failure
Merge into: lp:ubuntu-touch-boottest
Diff against target: 36 lines (+9/-3)
1 file modified
boottest.sh (+9/-3)
To merge this branch: bzr merge lp:~fginther/ubuntu-touch-boottest/dump-log-on-failure
Reviewer Review Type Date Requested Status
Para Siva (community) Approve
Review via email: mp+263167@code.launchpad.net

This proposal supersedes a proposal from 2015-06-25.

Commit message

Dump adt-run log file on failed tests and redirect the recover.py output to a log file to quiet it.

Description of the change

Dump adt-run log file on failed tests and redirect the recover.py output to a log file to quiet it.

Tested here:
http://d-jenkins.ubuntu-ci:8080/view/Wily/view/BootTest/job/fjg-boottest/60/console
http://d-jenkins.ubuntu-ci:8080/view/Wily/view/BootTest/job/fjg-boottest/61/console

To post a comment you must log in.
Revision history for this message
Para Siva (psivaa) wrote : Posted in a previous version of this proposal

+1, This should help.

review: Approve
Revision history for this message
Para Siva (psivaa) wrote :

Looking good. Thanks for moving the dumping part to the right place.
Posted an inline question about where the recovery logs are created.

review: Needs Information
10. By Francis Ginther

Fix the check for detecting a failure.

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

> Looking good. Thanks for moving the dumping part to the right place.
> Posted an inline question about where the recovery logs are created.

Psivaa, I did not include this in results/ because I didn't think they were worth archiving. They are still available from the workspace for the most recent run if there is a problem. I did try to save them to results/ but this gets cleared out when the adt-run test starts.

If you think these should be archived, we can update the job templates to save "*.log".

Revision history for this message
Para Siva (psivaa) wrote :

Francis, That makes sense. I wasn't sure if that was what was intended. Thanks for clearing this up.

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-06 02:55:54 +0000
3+++ boottest.sh 2015-06-29 18:54:51 +0000
4@@ -63,7 +63,13 @@
5 fi
6
7 # Ensure we leave a usable phone
8- [ -z ${NODE_NAME} ] || ${UTILDIR}/scripts/recover.py ${NODE_NAME}
9+ [ -z ${NODE_NAME} ] || ${UTILDIR}/scripts/recover.py ${NODE_NAME} > "recover-post.log" 2>&1
10+
11+ # Dump the adt-run log on failures
12+ if [ -z ${resultfile} ] && [ -e "results/log" ]; then
13+ echo "INFO: Failure detected, dumping adt-run log"
14+ cat "results/log"
15+ fi
16
17 # Leave a parting message
18 [ -z "${END_MESSAGE}" ] || echo -e "\n\n${END_MESSAGE}\n\n"
19@@ -91,7 +97,7 @@
20 export SKIP_TESTCONFIG=1
21
22 # Ensures we start with a usable phone
23-[ -z ${NODE_NAME} ] || ${UTILDIR}/scripts/recover.py ${NODE_NAME}
24+[ -z ${NODE_NAME} ] || ${UTILDIR}/scripts/recover.py ${NODE_NAME} > "recover-pre.log" 2>&1
25
26 TESTS=${BASEDIR}/tests
27
28@@ -123,7 +129,7 @@
29 ${PROV_CMD} > "provision.log" 2>&1 && break
30 PROV_ERR=$?
31 # Make sure the device doesn't need to be recovered first
32- ${UTILDIR}/scripts/recover.py ${NODE_NAME}
33+ ${UTILDIR}/scripts/recover.py ${NODE_NAME} > "recover-mid.log" 2>&1
34 if [ ${PROV_ERR} -eq 124 ]; then
35 # The provisioning fails with a timeout, the image is not
36 # flashable/bootable

Subscribers

People subscribed via source and target branches