summaryrefslogtreecommitdiff
path: root/scripts/qemuimage-testlib
diff options
context:
space:
mode:
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()
TEST_ROOTFS_IMAGE="${TEST_TMP}/${QEMUTARGET}-${QEMUARCH}-test.ext3"
CP=`which cp`
+
+ # When SHARE_IMAGE is set, we use the existing image under tmp folder
if [ -e "$TEST_ROOTFS_IMAGE" ]; then
+ if [ ${SHARE_IMAGE} -eq 1 ]; then
+ ROOTFS_IMAGE="$TEST_ROOTFS_IMAGE"
+ TEST_ROOTFS_IMAGE="${TEST_TMP}/${QEMUTARGET}-${QEMUARCH}-shared-test.ext3"
+ fi
rm -rf $TEST_ROOTFS_IMAGE
fi
+
$CP $ROOTFS_IMAGE $TEST_ROOTFS_IMAGE
if [ $? -ne 0 ]; then