Merge lp:~stylesen/lava-dispatcher/fix-bug-1212589 into lp:lava-dispatcher

Proposed by Senthil Kumaran S
Status: Merged
Approved by: Senthil Kumaran S
Approved revision: 654
Merged at revision: 653
Proposed branch: lp:~stylesen/lava-dispatcher/fix-bug-1212589
Merge into: lp:lava-dispatcher
Diff against target: 34 lines (+16/-8)
1 file modified
lava_test_shell/lava-test-runner (+16/-8)
To merge this branch: bzr merge lp:~stylesen/lava-dispatcher/fix-bug-1212589
Reviewer Review Type Date Requested Status
Fathi Boudra Approve
Linaro Automation & Validation Pending
Review via email: mp+180961@code.launchpad.net

Description of the change

Fix bug #1212589 - dependencies are not installed before executing the tests.

To post a comment you must log in.
Revision history for this message
Fathi Boudra (fboudra) wrote :

please fix the message:
 echo "${PREFIX} DEBUG: Dependencies will not be installed since the test image failed to bring up the network interface ..."

It should be a WARNING at least, not DEBUG. Also the message could be improved.
You assume the test image failed to bring up the network interface but you don't know. It could be hardware issue or on purpose.

Stick to the fact: Network interface is down. Dependencies will not be installed.

review: Needs Fixing
Revision history for this message
Senthil Kumaran S (stylesen) wrote :

Hi Fathi,

On Tuesday 20 August 2013 11:25 AM, Fathi Boudra wrote:
> Stick to the fact: Network interface is down. Dependencies will not be installed.

I shall use the above statement as a warning.

Thank You.
--
Senthil Kumaran
http://www.stylesen.org/
http://www.sasenthilkumaran.com/

654. By Senthil Kumaran S

Improve the warning message if the dependencies fail to install.

Suggested by: fabo

Revision history for this message
Fathi Boudra (fboudra) wrote :

Thanks. Ship it!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lava_test_shell/lava-test-runner'
2--- lava_test_shell/lava-test-runner 2013-04-11 19:50:48 +0000
3+++ lava_test_shell/lava-test-runner 2013-08-20 06:12:38 +0000
4@@ -51,15 +51,23 @@
5 echo "${PREFIX} looking for installation work in ${WORKFILE}"
6 for line in $(cat ${WORKFILE}); do
7 test=`basename $line`
8+ echo "${PREFIX} Check if network interface is up ..."
9 if [ -f ${line}/install.sh ] ; then
10- echo "${PREFIX} running ${test} installer ..."
11- /bin/sh ${line}/install.sh
12- if [ $? -ne 0 ] ; then
13- echo "${PREFIX} ${test} installer failed, exiting"
14- hwcontext
15- swcontext
16- exit 1
17- fi
18+ /bin/ping -W1 -c1 8.8.8.8
19+ if [ $? -ne 0 ] ; then
20+ echo "${PREFIX} WARNING: Network interface is down. Dependencies will not be installed."
21+ hwcontext
22+ swcontext
23+ exit 1
24+ fi
25+ echo "${PREFIX} running ${test} installer ..."
26+ /bin/sh ${line}/install.sh
27+ if [ $? -ne 0 ] ; then
28+ echo "${PREFIX} ${test} installer failed, exiting"
29+ hwcontext
30+ swcontext
31+ exit 1
32+ fi
33 fi
34 done
35

Subscribers

People subscribed via source and target branches