From: Aleksander Mistewicz Date: Wed, 15 Nov 2017 15:29:14 +0000 (+0100) Subject: Remove directory with unpacked images if present X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F50%2F181850%2F1;p=tools%2Ftestlab%2Fmajor.git Remove directory with unpacked images if present Change-Id: I07bbefff1b373ff4e187cef9d82b844808d61695 --- diff --git a/tct/artik_prepare_flash_conf.sh b/tct/artik_prepare_flash_conf.sh index 2d74a8c..cc58eab 100755 --- a/tct/artik_prepare_flash_conf.sh +++ b/tct/artik_prepare_flash_conf.sh @@ -57,6 +57,7 @@ T_DIR="/tmpfs/${SDMUX}" mkdir -p "${T_DIR}" IMAGE_UNPACKED="${T_DIR}/unpacked" +test -d "$IMAGE_UNPACKED" && rm -rf "$IMAGE_UNPACKED" IMAGE_MOUNTPOINT="${T_DIR}/mounted" TMP_TAR="/tmpfs/tizen-${SDMUX}.tar" diff --git a/tct/odroid_prepare_flash_conf.sh b/tct/odroid_prepare_flash_conf.sh index 2da5933..eb8cb11 100755 --- a/tct/odroid_prepare_flash_conf.sh +++ b/tct/odroid_prepare_flash_conf.sh @@ -40,6 +40,7 @@ test -n "${IMAGE}" || die "Missing argument: image!" echo "### prepare ###" IMAGE_UNPACKED="/tmpfs/image_unpacked_${SDMUX}" +test -d "$IMAGE_UNPACKED" && rm -rf "$IMAGE_UNPACKED" IMAGE_MOUNTPOINT="/tmpfs/image_mounted_${SDMUX}" switch2testserver "${SDMUX}" diff --git a/tct/rpi3_prepare_flash_conf.sh b/tct/rpi3_prepare_flash_conf.sh index 5895229..09f14d5 100755 --- a/tct/rpi3_prepare_flash_conf.sh +++ b/tct/rpi3_prepare_flash_conf.sh @@ -39,6 +39,7 @@ test -n "${IMAGE}" || die "Missing argument: image!" echo "### prepare ###" IMAGE_UNPACKED="/tmpfs/image_unpacked_${SDMUX}" +test -d "$IMAGE_UNPACKED" && rm -rf "$IMAGE_UNPACKED" IMAGE_MOUNTPOINT="/tmpfs/image_mounted_${SDMUX}" switch2testserver "${SDMUX}"