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 <thehobn@gmail.com> Reviewed-on: https://review.coreboot.org/14187 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
477a0d69e5
commit
2fb2483d44
|
@ -333,6 +333,21 @@ if [ $UPLOAD_RESULTS -eq 1 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd "board-status"
|
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}"
|
echo "Copying results to $(pwd)/${results}"
|
||||||
|
|
||||||
# Note: Result directory should be unique due to the timestamp.
|
# Note: Result directory should be unique due to the timestamp.
|
||||||
|
|
Loading…
Reference in New Issue