summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2017-01-10 10:38:49 (GMT)
committerAleksander Mistewicz <a.mistewicz@samsung.com>2017-03-29 10:48:09 (GMT)
commit39889bad953d30a7fe47d7429706a16fa3eeb7b2 (patch)
tree8effe6f9982f4525904df07853800fe936716ca2
parent4b6994c2e588c6b096776ac254b5ee74b33753ad (diff)
downloadmajor-39889bad953d30a7fe47d7429706a16fa3eeb7b2.zip
major-39889bad953d30a7fe47d7429706a16fa3eeb7b2.tar.gz
major-39889bad953d30a7fe47d7429706a16fa3eeb7b2.tar.bz2
Do not try to test target if flash failedrefs/changes/22/121922/1
Change-Id: If6566029affbbcba4013858cdbf7e2e9109a2f7b Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
-rwxr-xr-xtsp/scripts/common_prep_flash_conf.sh45
1 files changed, 28 insertions, 17 deletions
diff --git a/tsp/scripts/common_prep_flash_conf.sh b/tsp/scripts/common_prep_flash_conf.sh
index 066139b..880922d 100755
--- a/tsp/scripts/common_prep_flash_conf.sh
+++ b/tsp/scripts/common_prep_flash_conf.sh
@@ -66,17 +66,40 @@ fi
echo "sdmux allocated: ${SDMUX}"
+clean() {
+ case "$TARGET" in
+ *odroid*|*artik*)
+ rm -v "$USR_IMG" "$BOOT_IMG"
+ ;;
+ *minnow*)
+ rm -v "$USR_IMG" "$USR_IMG_BMAP"
+ ;;
+ *mbr64*)
+ rm -v "$USR_IMG" "$KERNEL" tizen-common.img
+ ;;
+ esac
+}
+
+failed() {
+ echo "$1"
+ echo "FAILED 1" >> sysctl.result
+ python "${TESTLAB_MAJOR}/tct/resource_locking.py" --unlockfailed "${SDMUX}"
+ echo "$(date): ${SDMUX}" >> "${FAILED_DEVICE_LOG}"
+ clean
+ exit 1
+}
+
case "$TARGET" in
*odroid*)
- "${TESTLAB_MAJOR}/tct/odroid_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" "$BOOT_IMG"
+ "${TESTLAB_MAJOR}/tct/odroid_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" "$BOOT_IMG" || failed "Flash failed"
"${TESTLAB_MAJOR}/tct/odroid_run.sh" "$SDMUX"
;;
*artik*)
- "${TESTLAB_MAJOR}/tct/artik_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" "$BOOT_IMG"
+ "${TESTLAB_MAJOR}/tct/artik_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" "$BOOT_IMG" || failed "Flash failed"
"${TESTLAB_MAJOR}/tct/odroid_run.sh" "$SDMUX"
;;
*minnow*)
- "${TESTLAB_MAJOR}/tct/minnow_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG"
+ "${TESTLAB_MAJOR}/tct/minnow_prepare_flash_conf.sh" "$SDMUX" "$USR_IMG" || failed "Flash failed"
"${TESTLAB_MAJOR}/tct/minnow_run.sh" "$SDMUX"
;;
*mbr64*)
@@ -96,9 +119,7 @@ esac
if grep -q "Testing failed." sysctl.result
then
- echo "FAILED 1" >> sysctl.result
- python "${TESTLAB_MAJOR}/tct/resource_locking.py" --unlockfailed "${SDMUX}"
- echo "$(date): ${SDMUX}" >> "${FAILED_DEVICE_LOG}"
+ failed "Testing failed"
else
echo "FAILED 0" >> sysctl.result
python "${TESTLAB_MAJOR}/tct/resource_locking.py" --unlock "${SDMUX}"
@@ -106,14 +127,4 @@ fi
echo "sdmux used: ${SDMUX}" >> sysctl.result
-case "$TARGET" in
- *odroid*|*artik*)
- rm -v "$USR_IMG" "$BOOT_IMG"
- ;;
- *minnow*)
- rm -v "$USR_IMG" "$USR_IMG_BMAP"
- ;;
- *mbr64*)
- rm -v "$USR_IMG" "$KERNEL" tizen-common.img
- ;;
-esac
+clean