Unify workdir manipulation 07/85707/7
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Thu, 25 Aug 2016 09:40:57 +0000 (11:40 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Tue, 6 Dec 2016 15:37:14 +0000 (16:37 +0100)
CWD is changed at tsp/jobs/common_prep_flash_conf.sh start
as it is in other scripts.

Change-Id: I1a97b5f3397195ed56567467bf78337502f3cce6
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
tsp/jobs/common_prep_flash_conf.sh
tsp/jobs/img_test_common.sh

index 0c3dab0..466ac97 100755 (executable)
@@ -22,10 +22,14 @@ export TSP_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)/.."
 
 BUILD_NR="$1"
 TARGET="$2"
+WORKDIR="${WS_TEST}/${BUILD_NR}"
 
 test -n "${BUILD_NR}" || die "Missing argument: build nr"
 test -n "$TARGET" || die "Missing argument: target"
 
+mkdir -p "${WORKDIR}"
+cd "${WORKDIR}"
+
 WORKDIR_REMOTE="${WS_TEST_REMOTE}/${BUILD_NR}"
 DWN_WORKDIR="${WS_DOWNLOAD}/${BUILD_NR}"
 
index 8b85e31..a425286 100755 (executable)
@@ -47,8 +47,6 @@ test -n "$TARGET" || die "Missing argument: target"
 DIFF_FILE="${DWN_WORKDIR}/diff-${TARGET}.report"
 
 rm -rf "${WORKDIR}"
-mkdir -p "${WORKDIR}"
-cd "${WORKDIR}"
 if check_diff "${DIFF_FILE}" "$1" "${TARGET}";
 then
     echo "Add common_prep_flash_conf job to the $TARGET queue"