From 6abbb99e95860e7ac7835ff1aee830c8f1d6a369 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Tue, 12 Jul 2016 18:09:35 +0200 Subject: [PATCH] Use new version of tct/resource_locking script Change-Id: Ie684ba0aecf2f6ab76da3a9a95560d29c6c4c549 Signed-off-by: Aleksander Mistewicz --- tsp/scripts/common_prep_flash_conf.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/tsp/scripts/common_prep_flash_conf.sh b/tsp/scripts/common_prep_flash_conf.sh index c904ace..09d8d03 100755 --- a/tsp/scripts/common_prep_flash_conf.sh +++ b/tsp/scripts/common_prep_flash_conf.sh @@ -43,17 +43,11 @@ else fi # Lock resource -if [ "${FAIL_CNT}" -ge 1 ]; then - SDMUX="`${TESTLAB_MAJOR}/tct/resource_locking.sh failed_${TARGET}`" -else - SDMUX="`${TESTLAB_MAJOR}/tct/resource_locking.sh ${TARGET}`" -fi +SDMUX="$(python "${TESTLAB_MAJOR}/tct/resource_locking.py" --retrylock "${TARGET}")" if [ -z "${SDMUX}" ]; then echo "Failed to allocate SD MUX device." >> sysctl.result exit 1 fi -UUID_FILE="/var/tmp/uuid-${SDMUX}" -lockfile-create --use-pid --retry 12 "${UUID_FILE}" case "$TARGET" in *odroid*) @@ -64,7 +58,12 @@ case "$TARGET" in ;; esac -lockfile-remove "${UUID_FILE}" +if grep -q "Testing failed." sysctl.result +then + python "${TESTLAB_MAJOR}/tct/resource_locking.py" --unlockfailed "${SDMUX}" +else + python "${TESTLAB_MAJOR}/tct/resource_locking.py" --unlock "${SDMUX}" +fi echo "sdmux used: ${SDMUX}" >> sysctl.result -- 2.7.4