summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-01-09 20:31:09 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-01-11 04:00:01 -0600
commit279429cc7b1fbfd291cac15de574508b3ab1d2ae (patch)
tree8dae2b7f7d9a9c75d4fc5010694060d9a68f1d39
parent57b2c1cf905f327d8a81c730091ca65bbda49cda (diff)
allow thr next_priority setting to survice the sub-shell
-rw-r--r--bin/tinbuild_internals.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/tinbuild_internals.sh b/bin/tinbuild_internals.sh
index b1f7526..d6220b7 100644
--- a/bin/tinbuild_internals.sh
+++ b/bin/tinbuild_internals.sh
@@ -681,10 +681,10 @@ local log_type="$1"
fi
if [ "${retval?}" = "0" ] ; then
- log_msgs "Repport Success for gerrit ref '$GERRIT_REF'."
+ log_msgs "Report Success for gerrit ref '$GERRIT_TASK_TICKET'."
cat "${gzlog}" | ssh ${GERRIT_HOST?} buildbot put --id ${TINDER_ID?} --ticket "${GERRIT_TASK_TICKET}" --succeed --log -
else
- log_msgs "Repport Failure for gerrit ref '$GERRIT_REF'."
+ log_msgs "Report Failure for gerrit ref '$GERRIT_TASK_TICKET."
cat "${gzlog}" | ssh ${GERRIT_HOST?} buildbot report --id ${TINDER_ID?} --ticket "${GERRIT_TASK_TICKET}" --failed --log -
fi
}
@@ -857,8 +857,12 @@ run_tb_gerrit_loop()
if [ "${priority?}" = "fair" ] ; then
next_priority="tb"
+ if [ ! -f "${METADATA_DIR?}/tb_${B}_next_priority" ] ; then
+ echo -n "{next_priority}" > "${METADATA_DIR?}/tb_${B}_next_priority"
+ fi
+ else
+ echo -n "{next_priority}" > "${METADATA_DIR?}/tb_${B}_next_priority"
fi
-
while true; do
if [ -f tb_${B?}_stop ] ; then
@@ -867,6 +871,7 @@ run_tb_gerrit_loop()
(
do_flock -x 200
build_type=""
+ next_priority=$(cat "${METADATA_DIR?}/tb_${B}_next_priority")
if [ "${next_priority?}" = "tb" ] ; then
check_for_commit
if [ "${IS_NEW_COMMIT?}" = "yes" ] ; then
@@ -900,6 +905,7 @@ run_tb_gerrit_loop()
fi
fi
fi
+ echo -n "${next_priority}" > "${METADATA_DIR?}/tb_${B}_next_priority"
if [ "${build_type}" = "tb" ] ; then
last_checkout_date="$(cat "${METADATA_DIR?}/tb_${B}_current-git-timestamp.log")"