=== modified file 'lava_dispatcher/lava_test_shell.py'
@@ -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'
@@ -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'
@@ -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'
@@ -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}