[oe-commits] Richard Purdie : imagetest-qemu/runqueue: Since we no longer support BUILDDIR, use TMPDIR

git version control git at git.openembedded.org
Fri Sep 9 17:42:34 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: de470333dbdeea444199340e4cd458c13fed6a5a
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=de470333dbdeea444199340e4cd458c13fed6a5a

Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date:   Fri Sep  9 18:14:56 2011 +0100

imagetest-qemu/runqueue: Since we no longer support BUILDDIR, use TMPDIR

Commit 993672fa2739794a6dd0dbd7bb232fa60522b897 removed the BUILDDIR
support from runqueue which broke the imagetest-qemu integration. We now
therefore need to set TMPDIR and pass this through the environment to
ensure the runqueue script finds the right locations without running
bitbake directly.

This patch also adds a sleep to the qemu command in the error case so that
this remains on the screen for a period of time so the user can see errors
more easily.

This change unbreaks automated testing failures on the autobuilder.

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/classes/imagetest-qemu.bbclass |    1 +
 scripts/qemuimage-testlib           |    5 +++--
 scripts/runqemu                     |    2 --
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass
index 25304de..18798e0 100644
--- a/meta/classes/imagetest-qemu.bbclass
+++ b/meta/classes/imagetest-qemu.bbclass
@@ -70,6 +70,7 @@ def qemuimagetest_main(d):
         os.environ["DISPLAY"] = bb.data.getVar("DISPLAY", d, True)
         os.environ["COREBASE"] = bb.data.getVar("COREBASE", d, True)
         os.environ["TOPDIR"] = bb.data.getVar("TOPDIR", d, True)
+        os.environ["TMPDIR"] = bb.data.getVar("TMPDIR", d, True)
         os.environ["TEST_STATUS"] = bb.data.getVar("TEST_STATUS", d, True)
         os.environ["TARGET_IPSAVE"] = bb.data.getVar("TARGET_IPSAVE", d, True)
         os.environ["TEST_SERIALIZE"] = bb.data.getVar("TEST_SERIALIZE", d, True)
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index c2dbf60..9ffaa7c 100644
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -457,6 +457,7 @@ Test_Create_Qemu()
 		timeout=50
 	else
 		rm -rf $TEST_ROOTFS_IMAGE
+		echo "Copying rootfs $ROOTFS_IMAGE to $TEST_ROOTFS_IMAGE"
 		$CP $ROOTFS_IMAGE $TEST_ROOTFS_IMAGE
 		if [ $? -ne 0 ]; then
 			Test_Info "Image ${ROOTFS_IMAGE} copy to ${TEST_ROOTFS_IMAGE} failed, return fail"
@@ -466,8 +467,8 @@ Test_Create_Qemu()
 		export MACHINE=$QEMUARCH
 
 		# Create Qemu in localhost VNC Port 1
-		echo "Running xterm -display ${DISPLAY} -e 'BUILDDIR=${TOPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE}' &"
-	    	xterm -display ${DISPLAY} -e "BUILDDIR=${TOPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE}" &
+		echo "Running xterm -display ${DISPLAY} -e 'TMPDIR=${TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} && /bin/sleep 60' &"
+	    	xterm -display ${DISPLAY} -e "TMPDIR=${TMPDIR} ${RUNQEMU} ${KERNEL} ${TEST_ROOTFS_IMAGE} && /bin/sleep 60" &
 	
 		# Get the pid of the xterm processor, which will be used in Test_Kill_Qemu
 		PID=$!
diff --git a/scripts/runqemu b/scripts/runqemu
index 74938f7..364fa1c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -55,8 +55,6 @@ SCRIPT_QEMU_OPT=""
 SCRIPT_QEMU_EXTRA_OPT=""
 SCRIPT_KERNEL_OPT=""
 
-TMPDIR=""
-
 # Determine whether the file is a kernel or QEMU image, and set the
 # appropriate variables
 process_filename() {





More information about the Openembedded-commits mailing list