[SCM] build.samba.org - branch master updated
Matthieu Patou
mat at samba.org
Fri Nov 5 01:38:37 MDT 2010
The branch, master has been updated
via 5129e80 Add doc
via 2495a59 More reformat
via b9c813f add .pyc to gitignore
via 3f25051 Allow Solaris to build the file and make it run
via df2e202 quiet stderr
via ca5178c test if file exists before mv or cmp
via 79e242f Reformat
from 43cebea add some more discontinued build trees
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5129e80d45a3eda2e4abfde32ce107c1d49b0600
Author: Matthieu Patou <mat at matws.net>
Date: Fri Nov 5 09:36:00 2010 +0300
Add doc
commit 2495a59b76a53bfee5c92baf958e19df7facec66
Author: Matthieu Patou <mat at matws.net>
Date: Fri Nov 5 09:27:03 2010 +0300
More reformat
commit b9c813f6986736de5a88752db6a72c242ad40b4d
Author: Matthieu Patou <mat at matws.net>
Date: Fri Nov 5 09:05:51 2010 +0300
add .pyc to gitignore
commit 3f2505127825a6fc4045a0e58892e104194d230e
Author: Matthieu Patou <mat at matws.net>
Date: Fri Nov 5 08:54:58 2010 +0300
Allow Solaris to build the file and make it run
Fix the MAX_PATH to 1024 if it hasn't been defined before,
avoid the use of asprintf as it's not available.
Also /proc/pid/cwd never point to the current working directory, instead
some version have /proc/pid/path/cwd so let's use it !
commit df2e202b86b73d7f80db4fb326922662424562d8
Author: Matthieu Patou <mat at matws.net>
Date: Fri Nov 5 00:24:22 2010 +0300
quiet stderr
commit ca5178c2e5ce5cc1411dfede69368e588732daf3
Author: Matthieu Patou <mat at matws.net>
Date: Thu Nov 4 23:32:58 2010 +0300
test if file exists before mv or cmp
commit 79e242fe6a78ba64eb1d2d2b539f3c1f944ecf25
Author: Matthieu Patou <mat at matws.net>
Date: Thu Nov 4 23:19:32 2010 +0300
Reformat
-----------------------------------------------------------------------
Summary of changes:
.gitignore | 1 +
build_test.fns | 690 +++++++++++++++++++++++++++++++-------------------------
killbysubdir.c | 25 ++-
3 files changed, 402 insertions(+), 314 deletions(-)
Changeset truncated at 500 lines:
diff --git a/.gitignore b/.gitignore
index 222c794..8945e11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
hostdb.sqlite
_trial_temp
+*.pyc
diff --git a/build_test.fns b/build_test.fns
index 33f22ab..7ed0ed0 100644
--- a/build_test.fns
+++ b/build_test.fns
@@ -1,4 +1,4 @@
-#!/bin/sh -*- mode: shell-script; sh-indentation: 8; indent-tabs-mode: t; -*-
+#!/bin/sh -*- mode: shell-script; -*-
# build_farm -- distributed build/test architecture for samba, rsync, etc
@@ -17,11 +17,22 @@ deptrees="";
build_test_fns_id='$Id$'
+copy_dir() {
+ Tsrc=$1
+ Tdst=$2
+ pwd
+ echo rsync -a --delete $Tsrc/ $Tdst
+ rsync -a --delete $Tsrc/ $Tdst || return 1
+ return 0
+}
+
#############################
# build a signature of a tree, used to see if we
# need to rebuild
+#############################
+
sum_tree() {
- sum_tree_test_root=$1
+ sum_tree_test_root=$1
sum_tree_tree=$2
sum_tree_sum=$3
sum_tree_scm=$4
@@ -29,25 +40,27 @@ sum_tree() {
sum build_test build_test.fns >> $sum_tree_sum
if [ -f "$host.fns" ]; then
- sum $host.fns >> $sum_tree_sum
+ sum $host.fns >> $sum_tree_sum
else
- sum generic.fns >> $sum_tree_sum
+ sum generic.fns >> $sum_tree_sum
fi
if [ -f "$test_root/$tree.$scm" ]; then
- sum "$test_root/$tree.$scm" >> $sum_tree_sum
+ sum "$test_root/$tree.$scm" >> $sum_tree_sum
fi
for d in $deptrees; do
- dscm=`choose_scm "$d"`
- if [ -f "$test_root/$d.$dscm" ]; then
+ dscm=`choose_scm "$d"`
+ if [ -f "$test_root/$d.$dscm" ]; then
sum "$test_root/$d.$dscm" >> $sum_tree_sum
- fi
+ fi
done
}
#############################
# send the logs to the master site
+#############################
+
send_logs() {
if [ "$nologreturn" = "yes" ]; then
echo "skipping log transfer"
@@ -76,7 +89,7 @@ send_logs() {
find $err -size +40000 | $XARGS_I sh -c 'dd if={} bs=1024 count=20000 of={}.tmp && mv {}.tmp {} && echo "\n***LOG TRUNCATED***" >> {}'
rsync $* -c -q --password-file=.password -z --timeout=200 \
- "$log" "$err" $host at build.samba.org::build_farm_data/
+ "$log" "$err" $host at build.samba.org::build_farm_data/
fi
}
@@ -85,13 +98,17 @@ send_logs() {
# the aim is to just update the servers timestamp.
# sending with a very large rsync block size does this
# with minimal network traffic
+#############################
+
send_logs_skip() {
- touch "$1" "$2"
- send_logs "$1" "$2" -B 10000000
+ touch "$1" "$2"
+ send_logs "$1" "$2" -B 10000000
}
############################
# fetch the latest copy of the tree
+############################
+
fetch_tree() {
if [ "$norsync" = "yes" ]; then
echo "skipping tree transfer"
@@ -111,40 +128,44 @@ fetch_tree() {
############################
# fetch the latest copy of the rev meta info
+############################
+
fetch_revinfo() {
- tree=$1
- scm=$2
+ tree=$1
+ scm=$2
- test -z "$scm" && return 1
- test x"$scm" = x"unknown" && return 1
- test x"$scm" = x"cvs" && return 1
+ test -z "$scm" && return 1
+ test x"$scm" = x"unknown" && return 1
+ test x"$scm" = x"cvs" && return 1
- if [ "$norsync" = "yes" ]; then
- echo "skipping .revinfo.$scm transfer"
- else
+ if [ "$norsync" = "yes" ]; then
+ echo "skipping .revinfo.$scm transfer"
+ else
+ if [ -r $test_root/$tree.$scm ]; then
+ [ -f $test_root/$tree.$scm.old ] && rm -f $test_root/$tree.$scm.old
+ [ -f $test_root/$tree.$scm ] && mv $test_root/$tree.$scm $test_root/$tree.$scm.old
+ fi
+ rsync -q --timeout=200 -clz --ignore-errors \
+ samba.org::ftp/unpacked/$tree/.revinfo.$scm $test_root/$tree.$scm
+ fi
if [ -r $test_root/$tree.$scm ]; then
- rm -f $test_root/$tree.$scm.old
- mv $test_root/$tree.$scm $test_root/$tree.$scm.old
+ return 0;
fi
- rsync -q --timeout=200 -clz --ignore-errors \
- samba.org::ftp/unpacked/$tree/.revinfo.$scm $test_root/$tree.$scm
- fi
- if [ -r $test_root/$tree.$scm ]; then
- return 0;
- fi
- return 1
+ return 1
}
############################
# choose the scm that is used for the given project
+############################
+
choose_scm() {
tree=$1
case "$tree" in
- samba* | rsync | libreplace | talloc | tdb | ldb | pidl | ccache*)
+ samba* | rsync | libreplace | talloc | tdb | ldb | pidl | ccache*)
echo "git"
- return 0
- ;;
+ return 0
+ ;;
esac
echo "svn"
@@ -156,188 +177,203 @@ locknesting=0
############################
# grab a lock file. Not atomic, but close :)
# tries to cope with NFS
+############################
+
lock_file() {
- if [ -z "$lock_root" ]; then
- lock_root=`pwd`;
- fi
- lckf="$lock_root/$1"
- machine=`cat "$lckf" 2> /dev/null | cut -d: -f1`
- pid=`cat "$lckf" 2> /dev/null | cut -d: -f2`
-
- if [ "$pid" = "$$" ]; then
- locknesting=`expr $locknesting + 1`
- echo "lock nesting now $locknesting"
- return 0
- fi
-
- if test -f "$lckf"; then
- test $machine = $host || {
- echo "lock file $lckf is valid for other machine $machine"
- return 1
- }
- kill -0 $pid && {
- echo "lock file $lckf is valid for process $pid"
- return 1
- }
- echo "stale lock file $lckf for $machine:$pid"
- cat "$lckf"
- /bin/rm -f "$lckf"
- fi
- echo "$host:$$" > "$lckf"
- return 0
+ if [ -z "$lock_root" ]; then
+ lock_root=`pwd`;
+ fi
+
+ lckf="$lock_root/$1"
+ machine=`cat "$lckf" 2> /dev/null | cut -d: -f1`
+ pid=`cat "$lckf" 2> /dev/null | cut -d: -f2`
+
+ if [ "$pid" = "$$" ]; then
+ locknesting=`expr $locknesting + 1`
+ echo "lock nesting now $locknesting"
+ return 0
+ fi
+
+ if test -f "$lckf"; then
+ test $machine = $host || {
+ echo "lock file $lckf is valid for other machine $machine"
+ return 1
+ }
+
+ kill -0 $pid && {
+ echo "lock file $lckf is valid for process $pid"
+ return 1
+ }
+
+ echo "stale lock file $lckf for $machine:$pid"
+ cat "$lckf"
+ /bin/rm -f "$lckf"
+ fi
+ echo "$host:$$" > "$lckf"
+ return 0
}
############################
# unlock a lock file
+############################
+
unlock_file() {
- if [ -z "$lock_root" ]; then
- lock_root=`pwd`;
- fi
+ if [ -z "$lock_root" ]; then
+ lock_root=`pwd`;
+ fi
if [ "$locknesting" != "0" ]; then
- locknesting=`expr $locknesting - 1`
- echo "lock nesting now $locknesting"
+ locknesting=`expr $locknesting - 1`
+ echo "lock nesting now $locknesting"
else
- lckf="$lock_root/$1"
- /bin/rm -f "$lckf"
+ lckf="$lock_root/$1"
+ /bin/rm -f "$lckf"
fi
}
############################
# run make, and print trace
+############################
+
do_make() {
+ if [ x"$MAKE" = x ]; then
+ MAKE=make
+ fi
- if [ x"$MAKE" = x ]
- then
- MAKE=make
- fi
-
- MMTIME=$MAXTIME
- # some trees don't need as much time
- case "$tree" in
- rsync | tdb | talloc | libreplace | ccache*)
- if [ "$compiler" != "checker" ]; then
- MMTIME=`expr $MMTIME / 5`
- fi
- ;;
- esac
-
-
- for t in $*; do
- if [ x"$BUILD_FARM_NUM_JOBS" = x ]; then
- echo "$MAKE $t"
- $builddir/timelimit $MMTIME "$MAKE" "$t"
- status=$?
- else
- # we can parallelize everything and all targets
- if [ x"$t" = xeverything ] || [ x"$t" = xall]; then
- echo "$MAKE" "-j$BUILD_FARM_NUM_JOBS" "$t"
- $builddir/timelimit $MMTIME "$MAKE" "-j$BUILD_FARM_NUM_JOBS" "$t"
- status=$?
- else
- echo "$MAKE $t"
- $builddir/timelimit $MMTIME "$MAKE" "$t"
- status=$?
- fi
- fi
-
- if [ $status != 0 ]; then
- case "$t" in
- test | check | installcheck)
- ;;
- *)
- # run again with V=1, so we see failed commands
- $builddir/timelimit $MMTIME "$MAKE" "$t" V=1
- status=$?
+ MMTIME=$MAXTIME
+ # some trees don't need as much time
+ case "$tree" in
+ rsync | tdb | talloc | libreplace | ccache*)
+ if [ "$compiler" != "checker" ]; then
+ MMTIME=`expr $MMTIME / 5`
+ fi
;;
esac
- fi
- if [ $status != 0 ]; then
- return $status;
- fi
- done
+ for t in $*; do
+ if [ x"$BUILD_FARM_NUM_JOBS" = x ]; then
+ echo "$MAKE $t"
+ $builddir/timelimit $MMTIME "$MAKE" "$t"
+ status=$?
+ else
+ # we can parallelize everything and all targets
+ if [ x"$t" = xeverything ] || [ x"$t" = xall]; then
+ echo "$MAKE" "-j$BUILD_FARM_NUM_JOBS" "$t"
+ $builddir/timelimit $MMTIME "$MAKE" "-j$BUILD_FARM_NUM_JOBS" "$t"
+ status=$?
+ else
+ echo "$MAKE $t"
+ $builddir/timelimit $MMTIME "$MAKE" "$t"
+ status=$?
+ fi
+ fi
+
+ if [ $status != 0 ]; then
+ case "$t" in
+ test|check|installcheck)
+ ;;
+ *)
+ #run again with V=1, so we see failed commands
+ $builddir/timelimit $MMTIME "$MAKE" "$t" V=1
+ status=$?
+ ;;
+ esac
+ fi
+
+ if [ $status != 0 ]; then
+ return $status;
+ fi
- return 0
-}
+ done
+
+ return 0
+}
############################
# configure the tree
+############################
+
action_configure() {
+
if [ ! -x $srcdir/configure -a -r $srcdir/Makefile.PL ]; then
perl $srcdir/Makefile.PL PREFIX="$prefix"
cstatus=$?
echo "CONFIGURE STATUS: $cstatus"
return $cstatus;
fi
- if [ ! -x $srcdir/configure ]; then
- ls -l $srcdir/configure
- echo "$srcdir/configure is missing"
- cstatus=255
- echo "CONFIGURE STATUS: $cstatus"
- return $cstatus;
+
+ if [ ! -x $srcdir/configure ]; then
+ ls -l $srcdir/configure
+ echo "$srcdir/configure is missing"
+ cstatus=255
+ echo "CONFIGURE STATUS: $cstatus"
+ return $cstatus;
fi
+
echo "CFLAGS=$CFLAGS"
echo configure options: $config_and_prefix
echo CC="$CCACHE $compiler" $srcdir/configure $config_and_prefix
+
CC="$CCACHE $compiler"
export CC
$builddir/timelimit $MAXTIME $srcdir/configure $config_and_prefix
cstatus=$?
+
if [ x"$cstatus" != x"0" ]; then
- if [ -f config.log ]; then
+ if [ -f config.log ]; then
echo "contents of config.log:"
cat config.log
fi
- if [ -f bin/config.log ]; then
+
+ # Waf style
+ if [ -f bin/config.log ]; then
echo "contents of config.log:"
cat bin/config.log
fi
fi
echo "CONFIGURE STATUS: $cstatus"
- return $cstatus;
+ return $cstatus
}
############################
# show the configure log
+############################
+
action_config_log() {
- log_files="config.log bin/config.log"
- for f in $log_files; do
- if [ -f $f ]; then
- echo "contents of config.log:"
- cat $f
- return 0;
- fi
- done
- return 0
+
+ log_files="config.log bin/config.log"
+ for f in $log_files; do
+ if [ -f $f ]; then
+ echo "contents of config.log:"
+ cat $f
+ return 0
+ fi
+ done
+ return 0
}
############################
# show the config.h
+############################
+
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"
- for h in $hdr_files; do
- if [ -f $h ]; then
- echo "contents of $h:"
- cat $h
- return 0;
- fi
- done
- return 0;
-}
+ hdr_files="config.h include/config.h bin/default/config.h bin/default/source4/include/config.h bin/default/source3/include/config.h"
+ for h in $hdr_files; do
+ if [ -f $h ]; then
+ echo "contents of $h:"
+ cat $h
+ return 0
+ fi
+ done
-copy_dir() {
- Tsrc=$1
- Tdst=$2
- pwd
- echo rsync -a --delete $Tsrc/ $Tdst
- rsync -a --delete $Tsrc/ $Tdst || return 1
return 0
}
+
############################
# build the tree
+############################
action_build() {
case "$tree" in
samba_4*)
@@ -361,10 +397,12 @@ action_build() {
############################
# show static analysis results
+############################
+
action_cc_checker() {
--
build.samba.org
More information about the samba-cvs
mailing list