[Libreoffice-commits] buildbot.git: lcov-report/tinderbox
Maarten Hoes
hoes.maarten at gmail.com
Sun Jan 4 12:53:56 PST 2015
lcov-report/tinderbox/.tb/config | 13 +
lcov-report/tinderbox/.tb/profiles/lcov-make-check/autogen.lastrun | 4
lcov-report/tinderbox/.tb/profiles/lcov-make-check/config | 15 +
lcov-report/tinderbox/.tb/profiles/lcov-make-check/phases.sh | 93 ++++++++++
lcov-report/tinderbox/README.tb | 22 ++
5 files changed, 147 insertions(+)
New commits:
commit 088d47921c083f67e8fe1e1d8361014b32cbd292
Author: Maarten Hoes <hoes.maarten at gmail.com>
Date: Sun Dec 21 19:40:23 2014 +0100
An example config for integration of lcov-report.sh with tinderbox.
Change-Id: Ibfb619c91ffd0ac41f2d6872817822ca0907f025
Reviewed-on: https://gerrit.libreoffice.org/13581
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/lcov-report/tinderbox/.tb/config b/lcov-report/tinderbox/.tb/config
new file mode 100644
index 0000000..2ba1d30
--- /dev/null
+++ b/lcov-report/tinderbox/.tb/config
@@ -0,0 +1,13 @@
+TB_ACTIVE_PROFILES=lcov-make-check
+TB_BRANCH=master
+TB_BUILD_DIR=~/build
+TB_GIT_DIR=~/source/libo-core
+TB_NAME=Linux-lcovreports-x86 at 140
+TB_OWNER=someone at somewhere.net
+TB_TRIGGER_FILE=~/tmp/TINDERBOX_START_LCOV
+TB_LOGFILE=~/tmp/tinderbox.logfile.txt
+
+TB_SMTP_HOST=foo at bar.com
+TB_SMTP_PASSWORD=no.just.no
+TB_SMTP_USER=none
+TB_SEND_MAIL=none
diff --git a/lcov-report/tinderbox/.tb/profiles/lcov-make-check/autogen.lastrun b/lcov-report/tinderbox/.tb/profiles/lcov-make-check/autogen.lastrun
new file mode 100644
index 0000000..972c3e5
--- /dev/null
+++ b/lcov-report/tinderbox/.tb/profiles/lcov-make-check/autogen.lastrun
@@ -0,0 +1,4 @@
+--enable-python=internal
+--disable-online-update
+--without-system-libs
+--without-system-headers
diff --git a/lcov-report/tinderbox/.tb/profiles/lcov-make-check/config b/lcov-report/tinderbox/.tb/profiles/lcov-make-check/config
new file mode 100644
index 0000000..b7e778e
--- /dev/null
+++ b/lcov-report/tinderbox/.tb/profiles/lcov-make-check/config
@@ -0,0 +1,15 @@
+TB_TYPE=tb
+
+# These are for use in the lcov script
+TB_LCOV_TRACEFILE_DIR=~/tmp/traces
+TB_LCOV_HTML_DIR=~/tmp/html
+TB_LCOV_TEST_NAME="make check"
+TB_LCOV_REPORT=~/source/buildbot/lcov-report/lcov-report.sh
+
+# These are set for gcov/lcov code coverage
+LDFLAGS='-fprofile-arcs'
+CFLAGS='-fprofile-arcs -ftest-coverage'
+CXXFLAGS='-fprofile-arcs -ftest-coverage'
+CPPFLAGS='-fprofile-arcs -ftest-coverage'
+export LDFLAGS CFLAGS CXXFLAGS CPPFLAGS
+
diff --git a/lcov-report/tinderbox/.tb/profiles/lcov-make-check/phases.sh b/lcov-report/tinderbox/.tb/profiles/lcov-make-check/phases.sh
new file mode 100644
index 0000000..3a2b5f8
--- /dev/null
+++ b/lcov-report/tinderbox/.tb/profiles/lcov-make-check/phases.sh
@@ -0,0 +1,93 @@
+#!/usr/bin/env bash
+# -*- tab-width : 4; indent-tabs-mode : nil -*-
+
+lcov-make-check_do_make()
+{
+ if [ "${R}" = "0" ] ; then
+ # we for MAKE_RESTARTS=1 because 1/ we know that Makefile is up to date
+ # and 2/ the 'restart' mechanism in make is messed-up by the fact that we trap SIGINT
+ if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} MAKE_RESTARTS=1 build-nocheck > "tb_${P?}_build-nocheck.log" 2>&1 ; then
+ tb_REPORT_LOG="tb_${P?}_build-nocheck.log"
+ tb_REPORT_MSGS="build failed - error is:"
+ [ $V ] && echo "make failed :"
+ [ $V ] && cat tb_${P?}_build-nocheck.log
+ R=1
+ else
+ if ! ${TB_LCOV_REPORT} -b -C "$TB_BUILD_DIR" -s "$TB_GIT_DIR" -t "$TB_LCOV_TRACEFILE_DIR" -d "$TB_LCOV_TEST_NAME" >> "tb_${P?}_build-nocheck.log" 2>&1 ; then
+ tb_REPORT_LOG="tb_${P}_build-nocheck.log"
+ tb_REPORT_MSGS="lcov before failed - error is:"
+ [ $V ] && echo "lcov before failed :"
+ [ $V ] && cat tb_${P?}_build-nocheck.log
+ R=1
+ else
+ if ! ${TB_NICE} ${TB_WATCHDOG} ${MAKE?} MAKE_RESTARTS=1 check >> "tb_${P?}_build-nocheck.log" 2>&1 ; then
+ tb_REPORT_LOG="tb_${P?}_build-nocheck.log"
+ tb_REPORT_MSGS="make check failed - error is:"
+ [ $V ] && echo "make failed :"
+ [ $V ] && cat tb_${P?}_build-nocheck.log
+ R=1
+ else
+ if ! ${TB_LCOV_REPORT} -a -s "$TB_GIT_DIR" -C "$TB_BUILD_DIR" -t "$TB_LCOV_TRACEFILE_DIR" -d "$TB_LCOV_TEST_NAME" -w "$TB_LCOV_HTML_DIR" >> "tb_${P?}_build-nocheck.log" 2>&1 ; then
+ tb_REPORT_LOG="tb_${P?}_build-nocheck.log"
+ tb_REPORT_MSGS="lcov after failed - error is:"
+ [ $V ] && echo "lcov after failed :"
+ [ $V ] && cat tb_${P?}_build-nocheck.log
+ R=1
+ fi
+ fi
+ fi
+ fi
+ fi
+}
+
+do_make()
+{
+ lcov-make-check_do_make
+}
+
+lcov-make-check_do_autogen()
+{
+local current_timestamp=
+
+ if [ "${R}" = "0" ] ; then
+ export EXTRA_BUILDID=
+ if [ "${TB_TYPE?}" = "tb" ] ; then
+ current_timestamp=$(sed -e "s/ /_/" "${TB_METADATA_DIR?}/${P?}_current-git-timestamp.log")
+ export EXTRA_BUILDID="TinderBox: ${TB_NAME?}, Branch:${TB_BRANCH?}, Time: $current_timestamp"
+ fi
+ "${TB_GIT_DIR?}/autogen.sh" > "tb_${P?}_autogen.log" 2>&1
+ if [ "$?" != "0" ] ; then
+ tb_REPORT_LOG=tb_${P?}_autogen.log
+ tb_REPORT_MSGS="autogen/configure failed - error is:"
+ [ $V ] && echo "autogen failed"
+ [ $V ] && cat tb_${P?}_autogen.log
+ R=1
+ fi
+ fi
+}
+
+do_autogen()
+{
+ lcov-make-check_do_autogen
+}
+
+lcov-make-check_do_test()
+{
+ return 0
+}
+
+do_test()
+{
+ lcov-make-check_do_test
+}
+
+lcov-make-check_do_push()
+{
+ return 0
+}
+
+do_push()
+{
+ lcov-make-check_do_push
+}
+
diff --git a/lcov-report/tinderbox/README.tb b/lcov-report/tinderbox/README.tb
new file mode 100644
index 0000000..e525527
--- /dev/null
+++ b/lcov-report/tinderbox/README.tb
@@ -0,0 +1,22 @@
+
+This directory contains an example configuration for the integration of
+the lcov-report.sh shell script with tinderbox/buildbot.
+
+
+The directory tree contains the following items:
+
+- An example profile called 'lcov-make-check', in the directory
+ '.tb/profiles/lcov-make-check'
+- An example configuration file in '.tb/profiles/lcov-make-check/config'
+- Custom tinderbox 'phases' or functions in
+ '.tb/profiles/lcov-make-check/phases.sh'
+- Custom autogen.sh / configure.sh flags in
+ '.tb/profiles/lcov-make-check/autogen.lastrun'
+
+
+If you would like to use these examples, you can copy the '.tb'
+directory tree to your existing ~/.tb tree, and add the profile
+'lcov-make-check' to 'TB_ACTIVE_PROFILES' in your '~/.tb/config'. You
+also need to set 'TB_BRANCH', 'TB_BUILD_DIR', and 'TB_GIT_DIR'
+there. Additionally, you need to modify the 'TB_LCOV_*' variables in
+'./.tb/profiles/lcov-make-check/config' to reflect your situation.
More information about the Libreoffice-commits
mailing list