diff mbox

[Branch,~linaro-validation/lava-dispatcher/trunk] Rev 483: more fixes for signal things

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

Commit Message

Michael-Doyle Hudson Dec. 4, 2012, 10:19 p.m. UTC
Merge authors:
  Michael Hudson-Doyle (mwhudson)
Related merge proposals:
  https://code.launchpad.net/~mwhudson/lava-dispatcher/more-signal-fixes/+merge/138009
  proposed by: Michael Hudson-Doyle (mwhudson)
  review: Approve - Andy Doan (doanac)
------------------------------------------------------------
revno: 483 [merge]
committer: Michael Hudson-Doyle <michael.hudson@linaro.org>
branch nick: trunk
timestamp: Wed 2012-12-05 11:18:26 +1300
message:
  more fixes for signal things
modified:
  lava_dispatcher/lava_test_shell.py
  lava_test_shell/lava-test-case
  lava_test_shell/lava-test-case-attach
  lava_test_shell/lava-test-runner-ubuntu


--
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_dispatcher/lava_test_shell.py'
--- lava_dispatcher/lava_test_shell.py	2012-12-03 19:41:16 +0000
+++ lava_dispatcher/lava_test_shell.py	2012-12-04 21:47:49 +0000
@@ -265,7 +265,12 @@ 
     attributes = _attributes_from_dir(os.path.join(test_run_dir, 'attributes'))
 
     testdef = yaml.load(testdef)
-    swcontext = _get_sw_context(build, pkginfo, testdefs_by_uuid[uuid]._sw_sources)
+    if uuid in testdefs_by_uuid:
+        sw_sources = testdefs_by_uuid[uuid]._sw_sources
+    else:
+        logging.warning("no software sources found for run with uuid %s" % uuid)
+        sw_sources = []
+    swcontext = _get_sw_context(build, pkginfo, sw_sources)
 
     return {
         'test_id': testdef.get('metadata').get('name'),

=== modified file 'lava_test_shell/lava-test-case'
--- lava_test_shell/lava-test-case	2012-12-04 14:19:38 +0000
+++ lava_test_shell/lava-test-case	2012-12-04 21:55:35 +0000
@@ -74,4 +74,4 @@ 
 if [ -n "${MEASUREMENT+x}" ]; then
     echo $MEASUREMENT > $result_dir/measurement
 fi
-[ -n "${rc+x}" ] && exit $rc
+exit $rc

=== modified file 'lava_test_shell/lava-test-case-attach'
--- lava_test_shell/lava-test-case-attach	2012-11-21 01:33:01 +0000
+++ lava_test_shell/lava-test-case-attach	2012-12-04 21:51:15 +0000
@@ -4,7 +4,7 @@ 
 # basename is not present on AOSP builds, but the /*\// thing does not
 # work with dash (Ubuntu builds) or busybox (OpenEmbedded).  Both of
 # those have basename though.
-which basename || basename () { echo ${1/*\//}; }
+which basename > /dev/null || basename () { echo ${1/*\//}; }
 
 usage () {
     echo "Usage: lava-test-case-attach TEST_CASE_ID FILE [MIME_TYPE]"

=== modified file 'lava_test_shell/lava-test-runner-ubuntu'
--- lava_test_shell/lava-test-runner-ubuntu	2012-12-03 19:40:49 +0000
+++ lava_test_shell/lava-test-runner-ubuntu	2012-12-04 21:51:35 +0000
@@ -1,8 +1,5 @@ 
 #!/bin/bash
 
-# make sure we log to serial console
-exec >/dev/console
-
 # This is a total hack to make sure we wait until the shell prompt has
 # appeared before sending any signals.
 sleep 15
@@ -75,7 +72,7 @@ 
 swcontext
 
 echo "${PREFIX} looking for work in ${WORKFILE}"
-while read line ; do
+while read -u 9 line ; do
 	test=`basename $line`
 	echo "${PREFIX} running ${test} under lava-test-shell..."
 	odir=${RESULTSDIR}/${test}-`date +%s`
@@ -93,5 +90,5 @@ 
 	# so be sure to use bash
 	lava-test-shell --output_dir ${odir} /bin/bash -e "${line}/run.sh"
 	echo "${PREFIX} ${test} exited with: `cat ${odir}/return_code`"
-done < ${WORKFILE}
+done 9< ${WORKFILE}