samba_3_master*)
lcov --base-directory $builddir --directory $builddir/.. --capture --output-file $builddir/$tree.lcov.info
;;
- samba_4*)
- # rm -f heimdal/lib/*/{lex,parse,sel-lex}.{gcda,gcno}
- lcov --base-directory $builddir --directory $builddir/.. --capture --output-file $builddir/$tree.lcov.info
+ samba_4*|tdb|talloc|ldb|libreplace)
+ lcov --base-directory $builddir/bin --directory $builddir/bin --capture --output-file $builddir/$tree.lcov.info
+ ;;
+ waf)
+ lcov --base-directory $builddir/demos --directory $builddir/demos --capture --output-file $builddir/$tree.lcov.info
;;
*)
lcov --base-directory $builddir --directory $builddir --capture --output-file $builddir/$tree.lcov.info
fi
}
+action_callcatcherreport() {
+ if [ "$CALLCATCHER_REPORT" = "yes" ]; then
+ case "$tree" in
+ tdb|talloc|ldb)
+ callanalyse `find $builddir/bin -name \*.so*` $builddir/bin/* > $builddir/coverage/unused-fns.txt
+ ;;
+ samba_3_master|samba_4*)
+ callanalyse `find $builddir/bin -name \*.so*` $builddir/bin/* > $builddir/coverage/all-unused-fns.txt
+ grep -v -f $srcdir/callcatcher-exceptions.grep $builddir/coverage/all-unused-fns.txt > $builddir/coverage/unused-fns.txt
+ ;;
+ esac
+ rc=$?
+ echo "return code: $rc"
+ else
+ echo "CALLCATCHER_REPORT not set and callcatcher asked"
+ echo "Most probably an error please fix !"
+ return 1
+ fi
+}
+
############################
# configure the tree
############################
action_configure() {
-
+ # special handling for some trees
case "$tree" in
waf*)
$builddir/timelimit $MAXTIME ./waf configure
############################
action_config_header() {
- hdr_files="config.h include/config.h bin/default/config.h bin/default/source4/include/config.h bin/default/source3/include/config.h"
+ hdr_files="config.h include/config.h include/autoconf/config.h bin/default/config.h bin/default/include/config.h bin/default/source3/include/config.h"
for h in $hdr_files; do
if [ -f $h ]; then
echo "contents of $h:"
;;
waf*)
do_make build
+ bstatus=$?
;;
*)
do_make all
esac
if [ "$LCOV_REPORT" = "yes" ]; then
+ PRE_GCOV_CFLAGS=$CFLAGS
+ PRE_GCOV_LDFLAGS=$LDFLAGS
GCOV_FLAGS="--coverage"
CFLAGS="$CFLAGS $GCOV_FLAGS"
LDFLAGS="$LDFLAGS $GCOV_FLAGS"
send_logs_skip "$log" "$err"
unlock_file "$lck"
echo "Ending build of $tree.$compiler in process $$ at `date`"
+ if [ "$LCOV_REPORT" = "yes" ]; then
+ CFLAGS=$PRE_GCOV_CFLAGS
+ LDFLAGS=$PRE_GCOV_LDFLAGS
+ export CFLAGS LDFLAGS
+ fi
return
fi
actions="$*"
if [ "$actions" = "" ]; then
- actions="configure config_log config_header build install test"
+ actions="configure config_log config_header build install test $EXTRA_ACTIONS"
fi
# start the build
chmod u=rwX,g=rX,o=rX -R $builddir/coverage
rsync -rct -q --password-file=.password -z --timeout=200 \
$builddir/coverage/ $host@build.samba.org::lcov_data/$host/$tree/
+ CFLAGS=$PRE_GCOV_CFLAGS
+ LDFLAGS=$PRE_GCOV_LDFLAGS
+ export CFLAGS LDFLAGS
fi
cd $test_root
old_trees="web popt distcc samba-gtk smb-build lorikeet-heimdal samba_3_2"
old_trees="$old_tree samba_3_2_test samba4 samba_4_0_waf samba_4_0_waf.metze"
- old_trees="$old_tree samba_3_X_test samba_3_X_devel samba_3_X_devel"
+ old_trees="$old_tree samba_3_X_test samba_3_X_devel samba_3_X_devel samba_3_waf"
for d in $old_trees; do
delete_old_tree $d
done