mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
qemuimagetest: collect and print runqemu output
If runqemu (or qemu itself) fails we need to know why, so tee out to a log file and print it when we can't find the qemu process or determine its IP address. (From OE-Core rev: 3faa2d5bc993876f1f8b3ad806a0192efaa43e05) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
d76a3f534d
commit
baba50e931
@@ -75,6 +75,7 @@ def qemuimagetest_main(d):
|
|||||||
os.environ["TARGET_IPSAVE"] = d.getVar("TARGET_IPSAVE", True)
|
os.environ["TARGET_IPSAVE"] = d.getVar("TARGET_IPSAVE", True)
|
||||||
os.environ["TEST_SERIALIZE"] = d.getVar("TEST_SERIALIZE", True)
|
os.environ["TEST_SERIALIZE"] = d.getVar("TEST_SERIALIZE", True)
|
||||||
os.environ["SDK_NAME"] = d.getVar("SDK_NAME", True)
|
os.environ["SDK_NAME"] = d.getVar("SDK_NAME", True)
|
||||||
|
os.environ["RUNQEMU_LOGFILE"] = d.expand("${T}/log.runqemutest.%s" % os.getpid())
|
||||||
|
|
||||||
"""run Test Case"""
|
"""run Test Case"""
|
||||||
bb.note("Run %s test in scenario %s" % (case, scen))
|
bb.note("Run %s test in scenario %s" % (case, scen))
|
||||||
|
|||||||
@@ -408,8 +408,8 @@ Test_Create_Qemu()
|
|||||||
export MACHINE=$QEMUARCH
|
export MACHINE=$QEMUARCH
|
||||||
|
|
||||||
# Create Qemu in localhost VNC Port 1
|
# Create Qemu in localhost VNC Port 1
|
||||||
echo "Running xterm -display ${DISPLAY} -e 'OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} || /bin/sleep 60' &"
|
echo "Running xterm -display ${DISPLAY} -e 'OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} | tee ${RUNQEMU_LOGFILE} || /bin/sleep 60' &"
|
||||||
xterm -display ${DISPLAY} -e "OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} || /bin/sleep 60" &
|
xterm -display ${DISPLAY} -e "OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} | tee ${RUNQEMU_LOGFILE} || /bin/sleep 60" &
|
||||||
|
|
||||||
# Get the pid of the xterm processor, which will be used in Test_Kill_Qemu
|
# Get the pid of the xterm processor, which will be used in Test_Kill_Qemu
|
||||||
XTERMPID=$!
|
XTERMPID=$!
|
||||||
@@ -436,6 +436,9 @@ Test_Create_Qemu()
|
|||||||
Test_Info "No qemu process appeared to start, exiting"
|
Test_Info "No qemu process appeared to start, exiting"
|
||||||
ps axww -O ppid
|
ps axww -O ppid
|
||||||
Test_Info "Process list dumped for debugging purposes"
|
Test_Info "Process list dumped for debugging purposes"
|
||||||
|
Test_Info "runqemu output log:"
|
||||||
|
cat ${RUNQEMU_LOGFILE}
|
||||||
|
echo
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -446,6 +449,9 @@ Test_Create_Qemu()
|
|||||||
Test_Info "There is no qemu process or qemu ip address found, return failed"
|
Test_Info "There is no qemu process or qemu ip address found, return failed"
|
||||||
ps -wwf
|
ps -wwf
|
||||||
ps axww -O ppid
|
ps axww -O ppid
|
||||||
|
Test_Info "runqemu output log:"
|
||||||
|
cat ${RUNQEMU_LOGFILE}
|
||||||
|
echo
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user