test that build farm locks are > 0 size
[build-farm.git] / build_test.fns
index d0299c5a74551f24a049496c1ee6000780099137..2358524ad9d35a3f991b852a1705d950fd886d57 100644 (file)
@@ -164,7 +164,7 @@ choose_scm() {
        tree=$1
 
        case "$tree" in
-                       samba* | rsync | libreplace | talloc | tdb | ldb | pidl | ccache* | waf*)
+                       samba* | rsync | libreplace | talloc | tdb* | ldb | pidl | ccache* | waf*)
                        echo "git"
                                return 0
                        ;;
@@ -196,7 +196,9 @@ lock_file() {
                        return 0
                fi
 
-               if test -f "$lckf"; then
+               # We need to assert that the file is > 0 size, as otherwise we never
+                # recover from disk full situations
+               if test -f "$lckf" && test -s "$lckf"; then
                        test x$machine = x$host || {
                                echo "lock file $lckf is valid for other machine $machine"
                                return 1
@@ -253,7 +255,7 @@ do_make() {
        MMTIME=$MAXTIME
        # some trees don't need as much time
        case "$tree" in
-               rsync | tdb | talloc | libreplace | ccache* | waf*)
+               rsync | tdb* | talloc | libreplace | ccache* | waf*)
                        if [ "$compiler" != "checker" ]; then
                                MMTIME=`expr $MMTIME / 5`
                        fi
@@ -321,7 +323,7 @@ action_lcovreport() {
                samba_3_master*)
                        lcov --base-directory $builddir --directory $builddir/.. --capture --output-file $builddir/$tree.lcov.info
                        ;;
-               samba_4*|tdb|talloc|ldb|libreplace)
+               samba_4*|tdb*|talloc|ldb|libreplace)
                        lcov --base-directory $builddir/bin --directory $builddir/bin --capture --output-file $builddir/$tree.lcov.info
                        ;;
                waf)
@@ -344,11 +346,12 @@ action_lcovreport() {
 action_callcatcherreport() {
        if [ "$CALLCATCHER_REPORT" = "yes" ]; then
                case "$tree" in
-               samba_3_master*)
-                       callanalyse `find $builddir/bin -name \*.so*` $builddir/bin/* | grep -v -f $srcdir/callcatcher-exceptions.grep > $builddir/coverage/unused-fns.txt
+               tdb*|talloc|ldb)
+                       callanalyse `find $builddir/bin -name \*.so*` $builddir/bin/* > $builddir/coverage/unused-fns.txt
                        ;;
-               samba_4*)
-                       callanalyse `find $builddir/bin -name \*.so*` $builddir/bin/* | grep -v -f $srcdir/callcatcher-exceptions.grep > $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=$?