From 60c1b6d0e4eb5248faf0a3f83e92ace66cb71777 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Thu, 25 Aug 2016 11:40:57 +0200 Subject: [PATCH] Unify workdir manipulation 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 --- tsp/jobs/common_prep_flash_conf.sh | 4 ++++ tsp/jobs/img_test_common.sh | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tsp/jobs/common_prep_flash_conf.sh b/tsp/jobs/common_prep_flash_conf.sh index 0c3dab0..466ac97 100755 --- a/tsp/jobs/common_prep_flash_conf.sh +++ b/tsp/jobs/common_prep_flash_conf.sh @@ -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}" diff --git a/tsp/jobs/img_test_common.sh b/tsp/jobs/img_test_common.sh index 8b85e31..a425286 100755 --- a/tsp/jobs/img_test_common.sh +++ b/tsp/jobs/img_test_common.sh @@ -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" -- 2.7.4