[Libreoffice-commits] 3 commits - tb/tb tb/tb_internals.sh tb/tb_phases.sh

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jan 25 19:58:11 PST 2013


 tb/tb              |    8 ++++++++
 tb/tb_internals.sh |   27 ++++++++++++++++++++-------
 tb/tb_phases.sh    |    5 +++--
 3 files changed, 31 insertions(+), 9 deletions(-)

New commits:
commit 269c52a4b32c56cc4e0c8a521f9a3037c3493577
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Jan 25 21:45:31 2013 -0600

    tb: debug primer build

diff --git a/tb/tb_internals.sh b/tb/tb_internals.sh
index 3cdb5c7..861de7a 100644
--- a/tb/tb_internals.sh
+++ b/tb/tb_internals.sh
@@ -585,9 +585,17 @@ get_committers()
     get_commits_since_last_good people | sort | uniq | tr '\n' ','
 }
 
+get_first_branche()
+{
+    local top="$1"
+
+    echo "$top"
+
+}
+
 interupted_build()
 {
-    mgs_log "Interrupted by Signal"
+    log_msgs "Interrupted by Signal"
     if [ "$tb_BUILD_TYPE" = "gerrit" ] ; then
         if [ -n "${GERRIT_TASK_TICKET}" ] ;then
             # repport a cancellation if we already acquired the ticket
@@ -600,6 +608,9 @@ interupted_build()
             report_to_tinderbox "${tb_LAST_CHECKOUT_DATE?}" "fold" "no"
         fi
     fi
+    # propagate the stop request to the main loop
+    touch ${TB_METADATA_DIR?}/stop
+
     exit 4
 }
 
@@ -989,7 +1000,7 @@ local gzlog=
 report_to_tinderbox()
 {
     [ $V ] && echo "report_to_tinderbox status=$2"
-    if [ -z "${tb_SEND_MAIL}" -o "${tb_SEND_MAIL}" = "none" -o -z "${TB_NAME}" ] ; then
+    if [ -z "${tb_SEND_MAIL}" -o "${tb_SEND_MAIL}" = "none" ] ; then
         return 0
     fi
 
@@ -1192,12 +1203,14 @@ run_one_tb()
         # condition already
         if [ "${tb_ONE_SHOT?}" != "1" ] ; then
             prepare_git_repo_for_tb
+        else
+            collect_current_head
         fi
 
-        tb_LAST_CHECKOUT_DATE="$(cat "${TB_METADATA_DIR?}/${P}_${B?}_current-git-timestamp.log")"
         local phase_list
         local retry_count=3
 
+        tb_LAST_CHECKOUT_DATE="$(cat "${TB_METADATA_DIR?}/${P}_${B?}_current-git-timestamp.log")"
         report_to_tinderbox "${tb_LAST_CHECKOUT_DATE?}" "building" "no"
         tb_TB_BUILD_REPORTED=1
 
@@ -1214,7 +1227,7 @@ run_one_tb()
             do_build ${phase_list?}
 
             if [ "$R" = "0" ] ; then
-                report_to_tinderbox "${tb_LAST_CHECKOUT_DATE?}" "success" "yes"
+                report_to_tinderbox "${tb_LAST_CHECKOUT_DATE}" "success" "yes"
                 phase_list=
                 log_msgs "Successful tb build for sha:$(cat "${TB_METADATA_DIR?}/${P}_${B?}_current-git-head.log")"
             elif [ "$R" = "2" ] ; then
@@ -1265,7 +1278,7 @@ run_one_tb()
 #
 run_primer()
 {
-    check_branch_profile
+    check_branch_profiles
 
     # as a special case the select_next_task
     # if tb_ONE_SHOT=1 return the first branch
@@ -1550,8 +1563,8 @@ local rc
         tb)
             if [ "${tb_ONE_SHOT?}" = "1" ] ; then
                 tb_SEND_MAIL="none"
-                tb_BRANCHES=$(determine_current_branch ${tb_BRANCHES?})
-                B=${tb_BRANCHES}
+                tb_TB_BRANCHES="${tb_BRANCHES?}"
+                B=$(get_first_branche ${tb_BRANCHES?})
                 if [ "${tb_PUSH_NIGHTLIES}" = "1" ] ; then
                     rm -f "${METADATA_DIR?}/${P?}_${B?}_last-upload-day.txt"
                 fi
commit 005a65be478a5e15209e693efc6c795f57faffee
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Jan 25 21:45:08 2013 -0600

    tb: add support for a 'default' profile in the global config

diff --git a/tb/tb b/tb/tb
index f03183a..05e9c87 100755
--- a/tb/tb
+++ b/tb/tb
@@ -155,6 +155,10 @@ TB_DEFAULT_MODE=[gerrit|gerrit-tb|tb-gerrit|tb] Default mode of operation.
                                                 This is a G or P level parameter
                                                 The command line --mode= override both level.
                                                 Default is "tb".
+TB_DEFAULT_PROFILE=<profile_name> Default profile name.
+                                  This is a G level only parameter
+                                  This provide a default value in case -p <prifle> is not
+                                  present on the command line, but is required.
 TB_GERRIT_HOST<host> Gerrit host to contact in gerrit mode.
                      This parameter is mandatory to use a gerrit mode.
                      This is G or P-level parameter only
@@ -243,6 +247,10 @@ set_factory_default
 
 load_config
 
+if [ "${TB_DEFAULT_PROFILE}" ] ; then
+    P="${TB_DEFAULT_PROFILE}"
+fi
+
 while [ "${1}" != "" ]; do
     parm=${1%%=*}
     arg=${1#*=}
commit 2292ca0bbe82bd4efcc230df025f963e157e1ed4
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date:   Fri Jan 25 20:15:45 2013 -0600

    tb: quoting issue with EXTRA_BUILDID

diff --git a/tb/tb_phases.sh b/tb/tb_phases.sh
index e6daf74..0d9f2e8 100644
--- a/tb/tb_phases.sh
+++ b/tb/tb_phases.sh
@@ -85,14 +85,15 @@ local extra_buildid=""
         extra_buildid="TinderBox: ${TB_NAME?}, Branch:${B}, Time: $current_timestamp"
     fi
     if [ "${R}" = "0" ] ; then
-        if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} EXTRA_BUILDID="$extra_buildid" -sr > "tb_${B?}_build.log" 2>&1 ; then
+        export EXTRA_BUILDID="$extra_buildid"
+        if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} -sr > "tb_${B?}_build.log" 2>&1 ; then
             tb_REPORT_LOG="tb_${B?}_build.log"
             tb_REPORT_MSGS="build failed - error is:"
             R=1
         else
             # if we want to populate bibisect we need to 'install'
             if [ "${tb_BUILD_TYPE?}" = "tb" -a ${TB_BIBISECT} != "0" ] ; then
-                if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} EXTRA_BUILDID="${extra_buildid}" -sr install-tb >>"tb_${B?}_build.log" 2>&1 ; then
+                if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} -sr install-tb >>"tb_${B?}_build.log" 2>&1 ; then
                     tb_REPORT_LOG="tb_${B}_build.log"
                     tb_REPORT_MSGS="build failed - error is:"
                     R=1


More information about the Libreoffice-commits mailing list