Merge lp:~psivaa/ubuntu-test-cases/touch-force-suite-timeout into lp:ubuntu-test-cases/touch

Proposed by Para Siva
Status: Merged
Approved by: Para Siva
Approved revision: 420
Merged at revision: 419
Proposed branch: lp:~psivaa/ubuntu-test-cases/touch-force-suite-timeout
Merge into: lp:ubuntu-test-cases/touch
Diff against target: 36 lines (+19/-2)
1 file modified
scripts/run-autopilot-tests.sh (+19/-2)
To merge this branch: bzr merge lp:~psivaa/ubuntu-test-cases/touch-force-suite-timeout
Reviewer Review Type Date Requested Status
Francis Ginther Approve
Review via email: mp+281248@code.launchpad.net

Commit message

use TEST_SUITE_TIMEOUT for being able to collect logs before job timeout.

Description of the change

To post a comment you must log in.
Revision history for this message
Francis Ginther (fginther) wrote :

Looks great!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/run-autopilot-tests.sh'
2--- scripts/run-autopilot-tests.sh 2015-06-03 20:35:52 +0000
3+++ scripts/run-autopilot-tests.sh 2015-12-22 19:20:37 +0000
4@@ -93,13 +93,30 @@
5 # Use --timeout-profile=long only if we are using the emulator
6 [ -z $USE_EMULATOR ] || EXTRA="-A '--timeout-profile=long'"
7
8- phablet-test-run \
9+ FORCE_TEST_SUITE_TIMEOUT=""
10+ if [ -n "${TEST_SUITE_TIMEOUT}" ] ; then
11+ # This is to help collect logs during cases where tests hang forever
12+ # causing the job to timeout without collecting logs
13+ # Forcing a timeout before the big-hammer job timeout will allow the
14+ # consecutive log collection steps to complete.
15+ FORCE_TEST_SUITE_TIMEOUT="timeout ${TEST_SUITE_TIMEOUT}"
16+ fi
17+ set +e
18+ RET=0
19+ ${FORCE_TEST_SUITE_TIMEOUT} phablet-test-run \
20 $NOSHELL $EXTRA \
21 -o ${odir} -f subunit \
22 -a /var/crash -a /home/phablet/.cache/upstart \
23 -a /var/log/syslog \
24 -A --timeout-profile=long \
25- -v $app || true
26+ -v $app
27+ RET=$?
28+ if [ "$RET" = "124" ];then
29+ echo "========================================================"
30+ echo "== Test suite $app timed out =="
31+ echo "========================================================"
32+ fi
33+ set -e
34 adb shell rm -rf /tmp/ci-logs
35 adb shell mkdir /tmp/ci-logs
36 adb shell sudo install -o phablet \

Subscribers

People subscribed via source and target branches