From 35e7e156621a6193384c9fdae6e1ac407b968e57 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Mon, 22 May 2017 12:40:18 +0200 Subject: Revert "Update tct/artik_prepare_flash_conf.sh" This reverts commit 1ce6059b98fbe0bd326714121dabbaf9be6a1851. Change-Id: Ib052621835ac0d3e799eca3af601115f7ee5e0e5 --- tct/artik_prepare_flash_conf.sh | 20 ++++++++++++++------ tct/common.sh | 1 - 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/tct/artik_prepare_flash_conf.sh b/tct/artik_prepare_flash_conf.sh index 7fecf9e..9efec81 100755 --- a/tct/artik_prepare_flash_conf.sh +++ b/tct/artik_prepare_flash_conf.sh @@ -52,6 +52,7 @@ mkdir -p "${T_DIR}" IMAGE_UNPACKED="${T_DIR}/unpacked" IMAGE_MOUNTPOINT="${T_DIR}/mounted" +TMP_TAR="${T_DIR}/tizen-${SDMUX}.tar" switch2testserver "${SDMUX}" @@ -66,25 +67,32 @@ install_hdmi_force "${IMAGE_MOUNTPOINT}" unmount_image "${IMAGE_MOUNTPOINT}/opt/usr" unmount_image "${IMAGE_MOUNTPOINT}/opt" unmount_image "${IMAGE_MOUNTPOINT}" +tar cvf "${TMP_TAR}" -C "${IMAGE_UNPACKED}" $(tar tf "${USR_IMAGE}") || die "tar: failed" echo "### flash ###" UUID_FILE="/var/tmp/uuid-${SDMUX}" DEV_SDCARD=$(uuid2dev "${UUID_FILE}" "${SDMUX}") || die "sdcard not found!" -cd "${IMAGE_UNPACKED}" -"${TESTLAB_SCRIPTS}/flash/flash_dd_artik.sh" "${DEV_SDCARD}" -RET=$? + +ARTIK_FLASH_SCRIPT_DIR="$(dirname "${ARTIK_FLASH_SCRIPT}")" +cd "${ARTIK_FLASH_SCRIPT_DIR}" +TMP_BOOT_IMG="${ARTIK_FLASH_SCRIPT_DIR}/tizen-boot-${SDMUX}.tar" +PLATFORM_IMG="${ARTIK_FLASH_SCRIPT_DIR}/tizen-${SDMUX}.tar" +mv "${BOOT_IMG}" "${TMP_BOOT_IMG}" +mv "${TMP_TAR}" "${PLATFORM_IMG}" +sudo "${ARTIK_FLASH_SCRIPT}" -d "${DEV_SDCARD}" -m "${MODEL}" -p "tizen-${SDMUX}.tar" -b "tizen-boot-${SDMUX}.tar" cd "${OLDPWD}" +RET=$? change_uuid "${UUID_FILE}" "${DEV_SDCARD}" if [ $RET -ne 0 ]; then - die "flash_dd_artik exited with an error" "$RET" + die "${ARTIK_FLASH_SCRIPT} exited with an error" "$RET" fi - switch2device "${SDMUX}" -restart_device "${SDMUX}" "${ARTIK_RESTART_SLEEP}" +restart_device "${SDMUX}" dyper_restart "${SDMUX}" "dyper1" echo "### cleanup ###" rm -rf "${T_DIR}" +rm "${PLATFORM_IMG}" diff --git a/tct/common.sh b/tct/common.sh index 2c0d440..5990121 100755 --- a/tct/common.sh +++ b/tct/common.sh @@ -36,7 +36,6 @@ MAX_SLEEP=160 TL_IP_CONF="/etc/opt/testlab-major/ip_addr" SCREENSHOOTER_RPM="/opt/screenshooter.rpm" ARTIK_FLASH_SCRIPT="/opt/sdboot/mk_sdboot.sh" -ARTIK_RESTART_SLEEP="5000" BMAP_TIME_LIMIT="600" -- cgit v1.2.3