summaryrefslogtreecommitdiff
path: root/tct
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-11-15 16:29:14 +0100
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-12-08 12:19:25 +0100
commit1abedadc921a62fdc330c33504ec33e5d085c704 (patch)
tree0375aed3e975107a3bd32e2cf603ccd7091685da /tct
parent50757ee7dbc65f81c714249ef17a1d16fd4940a2 (diff)
downloadmajor-1abedadc921a62fdc330c33504ec33e5d085c704.tar.gz
major-1abedadc921a62fdc330c33504ec33e5d085c704.tar.bz2
major-1abedadc921a62fdc330c33504ec33e5d085c704.zip
Remove directory with unpacked images if present
Change-Id: I07bbefff1b373ff4e187cef9d82b844808d61695
Diffstat (limited to 'tct')
-rwxr-xr-xtct/artik_prepare_flash_conf.sh1
-rwxr-xr-xtct/odroid_prepare_flash_conf.sh1
-rwxr-xr-xtct/rpi3_prepare_flash_conf.sh1
3 files changed, 3 insertions, 0 deletions
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}"