summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-01-11 03:56:13 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-01-11 03:56:13 -0600
commit3a55951b64bd3c3e8d81192bc593d5b1e5bf0d90 (patch)
treecd233ac655b2b0a53702132f974ebe3092521f96
parentd9bbd78b7c2d5dca47c712052f6356b065b1f2a8 (diff)
tb2: in gerrit related mode of operation, make sure TINDER_ID is set
-rwxr-xr-xbin/tinbuild226
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/tinbuild2 b/bin/tinbuild2
index 8583c8d..57d2a6c 100755
--- a/bin/tinbuild2
+++ b/bin/tinbuild2
@@ -440,6 +440,32 @@ if [ "${PUSH_TO_BIBISECT_REPO}" != "0" ] ; then
fi
fi
fi
+
+if [ "$MODE" = "gerrit-tb" -o "$MODE" = "tb-gerrit" -o "$MODE" = "gerrit" -o "$MODE" = "fair" ] ; then
+ if [ -z "$GERRIT_PLATFORM" ] ; then
+ os=$(uname)
+ case "$os" in
+ *Linux*)
+ GERRIT_PLATFORM="LINUX"
+ ;;
+ Darwin)
+ GERRIT_PLATFORM="MAC"
+ ;;
+ CYGWIN*)
+ GERRIT_PLATFORM="WINDOWS"
+ ;;
+ esac
+ fi
+ if [ -z "$GERRIT_PLATFORM" ] ; then
+ echo "Error: GERRIT_PLATFORM is required for mode involving gerrit"
+ exit 1
+ fi
+ if [ -z "$TINDER_ID" ] ; then
+ echo "Error: TINDER_ID is required for mode involving gerrit"
+ exit 1
+ fi
+fi
+
# if we want email to be sent, we must make sure that the required parameters are set in the profile (or in the environment)
case "$SEND_MAIL" in
all|tb|owner|debug|author)