From 2fb2483d44c69d5a5493cb257c82a28aac326806 Mon Sep 17 00:00:00 2001 From: Huimin Zhang Date: Wed, 30 Mar 2016 00:54:16 -0700 Subject: Reject duplicate results in board-status. This is in response to issue #28: board-status should reject duplicate uploads. Change-Id: Iff99be154b35e8c0f9f05f9470d1c2dcff8510b8 Signed-off-by: Huimin Zhang Reviewed-on: https://review.coreboot.org/14187 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- util/board_status/board_status.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'util') diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh index 058a3d9394..b315be1c18 100755 --- a/util/board_status/board_status.sh +++ b/util/board_status/board_status.sh @@ -333,6 +333,21 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then fi cd "board-status" + + echo "Checking for duplicate results" + # get any updates to board-status + git pull + + echo "${tagged_version}" | grep dirty >/dev/null 2>&1 + clean_version=$? + existing_results=$(git ls-files "${mainboard_dir}/${tagged_version}") + + # reject duplicate results of non-dirty versions + if [ "${clean_version}" -eq 1 ] && [ -n "${existing_results}" ] ; then + echo "Result is a duplicate, aborting" + exit $EXIT_FAILURE + fi + echo "Copying results to $(pwd)/${results}" # Note: Result directory should be unique due to the timestamp. -- cgit v1.2.3