[Libreoffice-commits] buildbot.git: bin/push_nightlies.sh bin/tinbuild2 bin/tinbuild_internals.sh
LuboÅ¡ LuÅák
l.lunak at suse.cz
Thu Aug 29 05:19:18 PDT 2013
bin/push_nightlies.sh | 55 +++++++++++++++++++++++++++++++++++++++++++++-
bin/tinbuild2 | 14 +++++++++++
bin/tinbuild_internals.sh | 6 ++++-
3 files changed, 73 insertions(+), 2 deletions(-)
New commits:
commit 4e28560d60d702d03eb90ad909c9f4e3d22a6777
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Aug 29 14:18:05 2013 +0200
add support for uploading also windows .pdb debug info
-pdb option activates this for -r, needs a path to a dir where
the .pdb info is stored and updated, and needs symstore.exe installed.
diff --git a/bin/push_nightlies.sh b/bin/push_nightlies.sh
index d3a7b19..ac62788 100755
--- a/bin/push_nightlies.sh
+++ b/bin/push_nightlies.sh
@@ -15,6 +15,7 @@ usage ()
echo "-t <time> pull time of this checkout"
echo "-n <name> name of this tinderbox"
echo "-l <kbps> bandwidth limit for upload (KBps)"
+ echo "-p <dir> location of the pdb symbol store to update and upload"
}
do_lock()
@@ -35,8 +36,11 @@ PULL_TIME=
BANDWIDTH_LIMIT=20
ASYNC=0
STAGE_DIR=/tmp
+SYMBOLS_DIR=
+SYMSTORE="/cygdrive/c/Program Files/Debugging Tools for Windows (x64)/symstore"
-while getopts aht:n:l: opt ; do
+
+while getopts aht:n:l:p: opt ; do
case "$opt" in
a) ASYNC=1 ;;
h) usage; exit ;;
@@ -44,6 +48,7 @@ while getopts aht:n:l: opt ; do
t) PULL_TIME="${OPTARG// /_}" ;;
n) BUILDER_NAME="${OPTARG// /_}" ;;
l) BANDWIDTH_LIMIT="$OPTARG" ;;
+ p) SYMBOLS_DIR="${OPTARG}";;
?) usage; exit ;;
esac
done
@@ -69,6 +74,8 @@ if [ -f config_host.mk ] ; then
INPATH=$(grep INPATH= config_host.mk | sed -e "s/.*=//")
fi
+topdir="$PWD"
+
cd instsetoo_native/${INPATH}
if [ $? != 0 ]; then
@@ -103,6 +110,46 @@ if [ -f ${core_dir}/build_info.txt ] ; then
fi
fi
+
+# Add pdb files for binaries of the given extension (exe,dll)
+# and type (Library/Executable) to the given list.
+add_pdb_files()
+{
+ extension=$1
+ type=$2
+ list=$3
+ for file in `find install/ -name *.${extension}`; do
+ filename=`basename $file .${extension}`
+ pdb=`echo workdir/*/LinkTarget/${type}/${filename}.pdb`
+ if test -f "$pdb"; then
+ echo `cygpath -w $pdb` >>$list
+ fi
+ done
+
+}
+
+if [ -n "$SYMBOLS_DIR" ] ; then
+ pushd "$topdir" >/dev/null
+ ssh upload at gimli.documentfoundation.org "mkdir -p \"/srv/www/dev-builds.libreoffice.org/daily/${BRANCH}/${BUILDER_NAME}/symbols\"" || exit 1
+ echo "update symbols"
+ rm -f symbols-pdb-list.txt
+ mkdir -p $SYMBOLS_DIR
+ add_pdb_files dll Library symbols-pdb-list.txt
+ add_pdb_files exe Executable symbols-pdb-list.txt
+ "${SYMSTORE}" add /f @symbols-pdb-list.txt /s `cygpath -w $SYMBOLS_DIR` /t LibreOffice /v "$PULL_TIME"
+ rm symbols-pdb-list.txt
+
+ # The maximum number of versions of symbols to keep, older revisions will be removed.
+ # Unless the .dll/.exe changes, the .pdb should be shared, so with incremental tinderbox several revisions should
+ # not be that space-demanding.
+ KEEP_MAX_REVISIONS=5
+ to_remove=`ls -1 ${SYMBOLS_DIR}/000Admin | grep -v '\.txt' | grep -v '\.deleted' | sort | head -n -${KEEP_MAX_REVISIONS}`
+ for revision in $to_remove; do
+ "${SYMSTORE}" del /i ${revision} /s `cygpath -w $SYMBOLS_DIR`
+ done
+ popd >/dev/null
+fi
+
if [ "$ASYNC" = "1" ] ; then
(
(
@@ -112,6 +159,9 @@ if [ "$ASYNC" = "1" ] ; then
ssh upload at gimli.documentfoundation.org "cd \"/srv/www/dev-builds.libreoffice.org/daily/${BRANCH}/${BUILDER_NAME}/\" && { rm current; ln -s \"${PULL_TIME}\" current ; }"
fi
rm -fr ${stage}/${tag}_*
+ if [ -n "$SYMBOLS_DIR" ] ; then
+ rsync --bwlimit=${BANDWIDTH} --delete -ave ssh ${SYMBOLS_DIR}/ "upload at gimli.documentfoundation.org:/srv/www/dev-builds.libreoffice.org/daily/${BRANCH}/${BUILDER_NAME}/symbols/" || exit 1
+ fi
)# 200>${lock_file?}
) &
else
@@ -119,4 +169,7 @@ else
if [ "$?" == "0" ] ; then
ssh upload at gimli.documentfoundation.org "cd \"/srv/www/dev-builds.libreoffice.org/daily/${BRANCH}/${BUILDER_NAME}/\" && { rm current; ln -s \"${PULL_TIME}\" current ; }"
fi
+ if [ -n "$SYMBOLS_DIR" ] ; then
+ rsync --bwlimit=${BANDWIDTH} --delete -ave ssh ${SYMBOLS_DIR}/ "upload at gimli.documentfoundation.org:/srv/www/dev-builds.libreoffice.org/daily/${BRANCH}/${BUILDER_NAME}/symbols/" || exit 1
+ fi
fi
diff --git a/bin/tinbuild2 b/bin/tinbuild2
index c2790c5..a13bc5b 100755
--- a/bin/tinbuild2
+++ b/bin/tinbuild2
@@ -12,6 +12,7 @@ BIN_DIR=$(dirname "$0")
PAUSE_SECONDS=$((15*60))
PUSH_NIGHTLIES=0
PUSH_TO_BIBISECT_REPO=0
+SYMBOLS_DIR=
ARTIFACTDIR=
SEND_MAIL="all"
LOCK=1
@@ -118,6 +119,7 @@ Options:
-n run with nice, can be combined with -i
-p <profile> profile to use.
-r <bandwidth> push the build nightly at a rate limited by <badnwidth> (in kB/s)
+ -pdb <dir> if -r is used, and update and upload also .pdb symbol store (Windows)
-t run the tests after a sucessfull build
-v verbose. print more progress messages
-w specify minimum wait between build attempt
@@ -373,6 +375,18 @@ while [ "${1}" != "" ]; do
BANDWIDTH="${arg}"
fi
;;
+ -pdb) # pdb symbol store
+ if [ -z "${has_arg}" ] ; then
+ shift;
+ arg="$1"
+ fi
+ if [ -z "${arg}" ] ; then
+ echo "Missing argument for option $parm" 1>&2
+ exit -1
+ else
+ SYMBOLS_DIR="${arg}"
+ fi
+ ;;
-s) # where to stage the build in case of -z with upload
if [ -z "${has_arg}" ] ; then
shift;
diff --git a/bin/tinbuild_internals.sh b/bin/tinbuild_internals.sh
index d0b7db5..d839573 100644
--- a/bin/tinbuild_internals.sh
+++ b/bin/tinbuild_internals.sh
@@ -635,7 +635,11 @@ push_nightly()
fi
[ $V ] && echo "Push Nightly builds"
prepare_upload_manifest
- ${BIN_DIR?}/push_nightlies.sh $push_opts -t "$(cat "${METADATA_DIR?}/tb_${B}_current-git-timestamp.log")" -n "$TINDER_NAME" -l "$BANDWIDTH"
+ if [ "$SYMBOLS_DIR" ] ; then
+ ${BIN_DIR?}/push_nightlies.sh $push_opts -t "$(cat "${METADATA_DIR?}/tb_${B}_current-git-timestamp.log")" -n "$TINDER_NAME" -l "$BANDWIDTH" -p "$SYMBOLS_DIR"/${B}
+ else
+ ${BIN_DIR?}/push_nightlies.sh $push_opts -t "$(cat "${METADATA_DIR?}/tb_${B}_current-git-timestamp.log")" -n "$TINDER_NAME" -l "$BANDWIDTH"
+ fi
# If we had a failure in pushing the build up, return
# immediately (making sure we do not mark this build as the
# last uploaded daily build).
More information about the Libreoffice-commits
mailing list