summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-03-26 12:43:05 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-26 17:50:09 +0000
commit720492dd14290e7b559b870131cc8ee3d6630758 (patch)
treeebe625376ab15602d76d878aaf9b49c7347c2475
parentb45d63e2ecbc03c1aaebb619e3eea840e163699b (diff)
downloadpoky-720492dd14290e7b559b870131cc8ee3d6630758.tar.gz
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: 827106a57ca88760a19f9309d859b500c5c4fe97) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/imagetest-qemu.bbclass1
-rwxr-xr-xscripts/qemuimage-testlib10
2 files changed, 9 insertions, 2 deletions
diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass
index 0d18f065a4..63ba08718e 100644
--- a/meta/classes/imagetest-qemu.bbclass
+++ b/meta/classes/imagetest-qemu.bbclass
@@ -74,6 +74,7 @@ def qemuimagetest_main(d):
74 os.environ["TARGET_IPSAVE"] = d.getVar("TARGET_IPSAVE", True) 74 os.environ["TARGET_IPSAVE"] = d.getVar("TARGET_IPSAVE", True)
75 os.environ["TEST_SERIALIZE"] = d.getVar("TEST_SERIALIZE", True) 75 os.environ["TEST_SERIALIZE"] = d.getVar("TEST_SERIALIZE", True)
76 os.environ["SDK_NAME"] = d.getVar("SDK_NAME", True) 76 os.environ["SDK_NAME"] = d.getVar("SDK_NAME", True)
77 os.environ["RUNQEMU_LOGFILE"] = d.expand("${T}/log.runqemutest.%s" % os.getpid())
77 78
78 # Add in all variables from the user's original environment which 79 # Add in all variables from the user's original environment which
79 # haven't subsequntly been set/changed 80 # haven't subsequntly been set/changed
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 6377c7f27a..a800f681f2 100755
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -408,8 +408,8 @@ Test_Create_Qemu()
408 export MACHINE=$QEMUARCH 408 export MACHINE=$QEMUARCH
409 409
410 # Create Qemu in localhost VNC Port 1 410 # Create Qemu in localhost VNC Port 1
411 echo "Running xterm -display ${DISPLAY} -e 'OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} || /bin/sleep 60' &" 411 echo "Running xterm -display ${DISPLAY} -e 'OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} | tee ${RUNQEMU_LOGFILE} || /bin/sleep 60' &"
412 xterm -display ${DISPLAY} -e "OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} || /bin/sleep 60" & 412 xterm -display ${DISPLAY} -e "OE_TMPDIR=${OE_TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} | tee ${RUNQEMU_LOGFILE} || /bin/sleep 60" &
413 413
414 # Get the pid of the xterm processor, which will be used in Test_Kill_Qemu 414 # Get the pid of the xterm processor, which will be used in Test_Kill_Qemu
415 XTERMPID=$! 415 XTERMPID=$!
@@ -436,6 +436,9 @@ Test_Create_Qemu()
436 Test_Info "No qemu process appeared to start, exiting" 436 Test_Info "No qemu process appeared to start, exiting"
437 ps axww -O ppid 437 ps axww -O ppid
438 Test_Info "Process list dumped for debugging purposes" 438 Test_Info "Process list dumped for debugging purposes"
439 Test_Info "runqemu output log:"
440 cat ${RUNQEMU_LOGFILE}
441 echo
439 return 1 442 return 1
440 fi 443 fi
441 444
@@ -446,6 +449,9 @@ Test_Create_Qemu()
446 Test_Info "There is no qemu process or qemu ip address found, return failed" 449 Test_Info "There is no qemu process or qemu ip address found, return failed"
447 ps -wwf 450 ps -wwf
448 ps axww -O ppid 451 ps axww -O ppid
452 Test_Info "runqemu output log:"
453 cat ${RUNQEMU_LOGFILE}
454 echo
449 return 1 455 return 1
450 fi 456 fi
451 457