diff options
author | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-11-07 11:07:16 +0100 |
---|---|---|
committer | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2017-01-16 11:07:49 +0100 |
commit | 359f78aa48584394cb9283c49e11bee62871db60 (patch) | |
tree | cff178d87b660cdb5659a4f614883307d49fe7f5 /tsp/jobs/common_prep_flash_conf.sh | |
parent | a3f9e0af3ca9c7e54a9b2d52e83522c382428434 (diff) | |
download | major-359f78aa48584394cb9283c49e11bee62871db60.tar.gz major-359f78aa48584394cb9283c49e11bee62871db60.tar.bz2 major-359f78aa48584394cb9283c49e11bee62871db60.zip |
Make TITS profile independent
Overall TITS adjustments
Change-Id: I8a9b1255a122efa50a8275a558c0bc01174ad4fa
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tsp/jobs/common_prep_flash_conf.sh')
-rwxr-xr-x | tsp/jobs/common_prep_flash_conf.sh | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/tsp/jobs/common_prep_flash_conf.sh b/tsp/jobs/common_prep_flash_conf.sh index 9499195..fabec78 100755 --- a/tsp/jobs/common_prep_flash_conf.sh +++ b/tsp/jobs/common_prep_flash_conf.sh @@ -33,24 +33,37 @@ cd "${WORKDIR}" WORKDIR_REMOTE="${WS_TEST_REMOTE}/${BUILD_NR}" DWN_WORKDIR="${WS_DOWNLOAD}/${BUILD_NR}" +SR="$(project2sr "${DWN_WORKDIR}/project.conf")" +PROFILE="$(sr2profile "${SR}")" + # Update status in database -update_db "$(project2sr "${DWN_WORKDIR}/project-${TARGET}.conf")" "Testing" "$BUILD_NR" "$TARGET" +update_db "${SR}" "Testing" "$BUILD_NR" "$TARGET" +USR_IMG_DIR="$(get_userspace_dir "${TARGET}" "${DWN_WORKDIR}")" case "$TARGET" in *odroid*|*artik*) - BOOT_IMG="$(ls "${DWN_WORKDIR}"/tizen-common_*-boot-*.tar.gz)" - USERSPACE_IMG="$(ls "${DWN_WORKDIR}"/tizen-common_*-3parts-*.tar.gz)" + BOOT_IMG="$(ls "$(get_boot_dir "${TARGET}" "${DWN_WORKDIR}")"/*.tar.gz)" + test -f "${BOOT_IMG}" || BOOT_IMG="$(ls "$(get_boot_dir "${TARGET}" "${SNAPSHOT_WS_DOWNLOAD}-${PROFILE}")"/*.tar.gz)" + USERSPACE_IMG="$(ls "${USR_IMG_DIR}"/*.tar.gz)" + test -f "${USERSPACE_IMG}" || USERSPACE_IMG="$(ls "$(get_userspace_dir "${TARGET}" "${SNAPSHOT_WS_DOWNLOAD}-${PROFILE}")"/*.tar.gz)" + # TODO: Both images shouldn't be replaced by snapshot's at the same time ;; *minnow*) - USERSPACE_IMG="$(ls "${DWN_WORKDIR}"/tizen-common_*-wayland-*-sda.raw.bz2)" - USERSPACE_IMG_BMAP="$(ls "${DWN_WORKDIR}"/tizen-common_*-wayland-*-sda.bmap)" + USERSPACE_IMG="$(ls "${USR_IMG_DIR}"/*.raw.bz2)" + USERSPACE_IMG_BMAP="$(ls "${USR_IMG_DIR}"/*.bmap)" ;; *mbr64*) - USERSPACE_IMG="$(ls "${DWN_WORKDIR}"/tizen-common_*-minimal-mbr-*.tar.gz)" - KERNEL="$(ls "${DWN_WORKDIR}"/tizen-common_*-minimal-mbr-*-vmlinuz-*)" + USERSPACE_IMG="$(ls "${USR_IMG_DIR}"/*.tar.gz)" + KERNEL="$(ls "${USR_IMG_DIR}"/*-vmlinuz-*)" + ;; + *) + die "Unknown target: ${TARGET}" ;; esac +test -z "${BOOT_IMG}" || test -f "${BOOT_IMG}" || die "No boot image found: ${BOOT_IMG}!" +test -f "${USERSPACE_IMG}" || die "No userspace image found: ${USERSPACE_IMG}!" + FAIL_CNT="$3" test -n "${FAIL_CNT}" || FAIL_CNT=0 @@ -66,7 +79,7 @@ retrigger() { tsrun_target "${TARGET#headless-}" -L "RETRIGGERED_$(echo "$TARGET" | tr '[:lower:]' '[:upper:]')_PREPARE_FLASH_CONF" \ sh "${TSP_DIR}/jobs/common_prep_flash_conf.sh" "$BUILD_NR" "${TARGET}" "$((FAIL_CNT + 1))" # Update status in database - update_db "$(project2sr "${DWN_WORKDIR}/project-${TARGET}.conf")" "In test queue" "$BUILD_NR" "$TARGET" + update_db "${SR}" "In test queue" "$BUILD_NR" "$TARGET" exit 0 } |