Subunit diff.
[build-farm.git] / build_test.fns
index bd42cabf3e2539b411368c66edb734e5ff282b78..b7649bde3db5bbfd80774fe7ebc21ccba4831a39 100644 (file)
@@ -7,11 +7,13 @@
 # Copyright (C) 2001, 2003 by Martin Pool <mbp@samba.org>
 
 # default maximum runtime for any command
-MAXTIME=12000
+MAXTIME=25200 # 7 hours
+SMBD_MAXTIME=18000 # 5 hours for a samba process ..
 # default maximum memory size (100M) for any command
 MAXMEM=100000
 RUN_FROM_BUILD_FARM=yes
 export RUN_FROM_BUILD_FARM
+export MAXTIME SMBD_MAXTIME
 
 deptrees="";
 
@@ -195,7 +197,7 @@ lock_file() {
                fi
 
                if test -f "$lckf"; then
-                       test $machine = $host || {
+                       test x$machine = x$host || {
                                echo "lock file $lckf is valid for other machine $machine"
                                return 1
                        }
@@ -304,9 +306,7 @@ action_lcovreport() {
                        lcov --base-directory $builddir --directory $builddir/.. --capture --output-file $builddir/$tree.lcov.info
                        ;;
                samba_4*)
-                       # ugly hack for s4, as lcov is otherwise not able to find
-                       # these files
-                       rm -f heimdal/lib/*/{lex,parse,sel-lex}.{gcda,gcno}
+                       # rm -f heimdal/lib/*/{lex,parse,sel-lex}.{gcda,gcno}
                        lcov --base-directory $builddir --directory $builddir/.. --capture --output-file $builddir/$tree.lcov.info
                        ;;
                *)
@@ -809,9 +809,25 @@ test_tree() {
                        mount
                        vmstat
 
+                       if [ "x$PREHOOKS" != "x" ]; then
+                               for hooks in $PREHOOKS; do
+                                       if [ "x$hooks" = "x$action" ]; then
+                                               ( prehook_$action )
+                                       fi
+                               done
+                       fi
+
                        ( action_$action )
                        action_status=$?
 
+                       if [ "x$POSTHOOKS" != "x" ]; then
+                               for hooks in $POSTHOOKS; do
+                                       if [ "x$hooks" = "x$action" ]; then
+                                               ( posthook_$action )
+                                       fi
+                               done
+                       fi
+
                        df .
 
                        if [ $action_status != 0 ]; then