From ac2c2eaa6b385e29f724a2c5fc0da47b9cd5d780 Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Fri, 9 Dec 2016 09:28:37 +0100 Subject: [PATCH] Fix false identical reporting Change-Id: If4849c2d01695271cd44eaeb00b64f9720ab3682 Signed-off-by: Aleksander Mistewicz --- tsp/jobs/img_test_common.sh | 2 +- tsp/jobs/publish.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tsp/jobs/img_test_common.sh b/tsp/jobs/img_test_common.sh index 304742f..4d7444f 100755 --- a/tsp/jobs/img_test_common.sh +++ b/tsp/jobs/img_test_common.sh @@ -48,7 +48,7 @@ check_diff() { if ( grep -q "identical" "${DIFF_FILE1}" ) && ( [ -z "${DIFF_FILE2}" ] || grep -q "identical" "${DIFF_FILE2}" ) then echo "Image is unchanged in respect to snapshot" - tspwb -L PUBLISH sh "${TSP_DIR}/jobs/publish.sh" "${JOB_NR}" "${TARGET}" + tspwb -L PUBLISH sh "${TSP_DIR}/jobs/publish.sh" "${JOB_NR}" "${TARGET}" "IDENTICAL" return 1 fi } diff --git a/tsp/jobs/publish.sh b/tsp/jobs/publish.sh index bc90920..39f19de 100755 --- a/tsp/jobs/publish.sh +++ b/tsp/jobs/publish.sh @@ -22,6 +22,7 @@ export TSP_DIR="$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)/.." BUILD_NR="$1" TARGET="$2" +IS_IDENTICAL="$3" test -n "$BUILD_NR" || die "Missing argument: build nr" test -n "$TARGET" || die "Missing argument: target" @@ -117,7 +118,7 @@ then TAG="Snapshot" else echo "Processing prerelease" - if grep -q "identical" "${DIFF_FILE}" + if [ -n "${IS_IDENTICAL}" ] then echo "Prerelease is identical with snapshot" TAG="Identical" -- 2.7.4