diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 653: Fix bug #1212589 - dependencies are not installed before executing the tests.

Message ID 20130820063728.11932.98585.launchpad@ackee.canonical.com
State Accepted
Headers show

Commit Message

Senthil Kumaran Aug. 20, 2013, 6:37 a.m. UTC
Merge authors:
  Senthil Kumaran S (stylesen)
Related merge proposals:
  https://code.launchpad.net/~stylesen/lava-dispatcher/fix-bug-1212589/+merge/180961
  proposed by: Senthil Kumaran S (stylesen)
  review: Approve - Fathi Boudra (fboudra)
------------------------------------------------------------
revno: 653 [merge]
committer: Senthil Kumaran <senthil.kumaran@linaro.org>
branch nick: trunk
timestamp: Tue 2013-08-20 12:06:27 +0530
message:
  Fix bug #1212589 - dependencies are not installed before executing the tests.
modified:
  lava_test_shell/lava-test-runner


--
lp:lava-dispatcher
https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk

You are subscribed to branch lp:lava-dispatcher.
To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-dispatcher/trunk/+edit-subscription
diff mbox

Patch

=== modified file 'lava_test_shell/lava-test-runner'
--- lava_test_shell/lava-test-runner	2013-04-11 19:50:48 +0000
+++ lava_test_shell/lava-test-runner	2013-08-20 06:11:19 +0000
@@ -51,15 +51,23 @@ 
 echo "${PREFIX} looking for installation work in ${WORKFILE}"
 for line in $(cat ${WORKFILE}); do
 	test=`basename $line`
+        echo "${PREFIX} Check if network interface is up ..."
 	if [ -f ${line}/install.sh ] ; then
-		echo "${PREFIX} running ${test} installer ..."
-		/bin/sh ${line}/install.sh
-		if [ $? -ne 0 ] ; then
-			echo "${PREFIX} ${test} installer failed, exiting"
-			hwcontext
-			swcontext
-			exit 1
-		fi
+            /bin/ping -W1 -c1 8.8.8.8
+            if [ $? -ne 0 ] ; then
+                echo "${PREFIX} WARNING: Network interface is down. Dependencies will not be installed."
+		hwcontext
+		swcontext
+                exit 1
+            fi
+	    echo "${PREFIX} running ${test} installer ..."
+	    /bin/sh ${line}/install.sh
+	    if [ $? -ne 0 ] ; then
+		echo "${PREFIX} ${test} installer failed, exiting"
+		hwcontext
+		swcontext
+		exit 1
+	    fi
 	fi
 done