summaryrefslogtreecommitdiffstats
path: root/scripts/qemuimage-testlib
diff options
context:
space:
mode:
authorJiajun Xu <jiajun.xu@intel.com>2011-01-13 09:46:14 +0800
committerSaul Wold <sgw@linux.intel.com>2011-01-14 08:09:26 -0800
commit2119274314f49678de78dc1c5aa2971676fa6774 (patch)
tree3ebf3b48d3a0e99930f7184dfe147c7259bd90f1 /scripts/qemuimage-testlib
parent897530621fabf3c345c302050a5c21e16097a2ba (diff)
downloadpoky-2119274314f49678de78dc1c5aa2971676fa6774.tar.gz
qemuimagetest: Use the same image in sanity testing to fix the timeout issue on autobuilder
Fixes [BUGID #595] Because of the QEMU booting slowness issue(see bug #646 and #618), autobuilder may suffer a timeout issue when running sanity test. We introduce variable SHARE_IMAGE here to fix the issue. It is by default set to 1. Poky will copy latest built-out image and keep using it in sanity testing. If it is set to 0, latest built-out image will be copied and tested for each case, which will take much time. Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
Diffstat (limited to 'scripts/qemuimage-testlib')
-rw-r--r--scripts/qemuimage-testlib7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index e2c2d244c5..b9afcf5bb6 100644
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -383,9 +383,16 @@ Test_Create_Qemu()
383 TEST_ROOTFS_IMAGE="${TEST_TMP}/${QEMUTARGET}-${QEMUARCH}-test.ext3" 383 TEST_ROOTFS_IMAGE="${TEST_TMP}/${QEMUTARGET}-${QEMUARCH}-test.ext3"
384 384
385 CP=`which cp` 385 CP=`which cp`
386
387 # When SHARE_IMAGE is set, we use the existing image under tmp folder
386 if [ -e "$TEST_ROOTFS_IMAGE" ]; then 388 if [ -e "$TEST_ROOTFS_IMAGE" ]; then
389 if [ ${SHARE_IMAGE} -eq 1 ]; then
390 ROOTFS_IMAGE="$TEST_ROOTFS_IMAGE"
391 TEST_ROOTFS_IMAGE="${TEST_TMP}/${QEMUTARGET}-${QEMUARCH}-shared-test.ext3"
392 fi
387 rm -rf $TEST_ROOTFS_IMAGE 393 rm -rf $TEST_ROOTFS_IMAGE
388 fi 394 fi
395
389 $CP $ROOTFS_IMAGE $TEST_ROOTFS_IMAGE 396 $CP $ROOTFS_IMAGE $TEST_ROOTFS_IMAGE
390 397
391 if [ $? -ne 0 ]; then 398 if [ $? -ne 0 ]; then