Add assert message.
[amitay/build-farm.git] / build_test
1 #!/bin/sh
2 # this is the main build script for build.samba.org
3 # it gets run on all the build boxes via cron
4
5 # any errors get put in build.log
6
7 # we used a fixed path that is a superset of the required paths.
8 build_test_path=.:$HOME/bin:/usr/local/bin:/usr/bin:/bin:/opt/SUNWspro/bin:/usr/pkg/bin:/usr/pkg/sbin:/usr/ccs/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/bsd
9 PATH=$build_test_path
10 export PATH
11 CFLAGS=""
12 export CFLAGS
13
14 build_test_id='$Id$'
15
16 # go to our main directory
17 cd $HOME/build_farm || exit 1
18
19 (
20
21     echo
22     date
23
24     #
25     # allow admins to configure things like
26     # PATH, RSYNC_PROXY, ...
27     #
28     if [ -f build_test.settings.local ]; then
29         build_test_settings_local_file="build_test.settings.local"
30         . $build_test_settings_local_file
31     fi
32
33     # we only want the short name of the host - use cut for portability
34     host=`hostname | cut -d. -f1`
35
36     # make sure the password isn't readable by anyone
37     chmod 600 .password
38
39     # grab the latest versions of the scripts
40     rsync --delete --include='*.fns' --exclude='*' --timeout=200 -q -az build.samba.org::build_farm/ .
41
42     # load general functions
43     . build_test.fns
44
45     #
46     # allow admins to overload things like send_logs()
47     # if it's required to have secret data in it,
48     # that can't be in a per host .fns file on
49     # the build-farm svn tree
50     #
51     if [ -f build_test.fns.local ]; then
52         build_test_fns_local_file="build_test.fns.local"
53         . $build_test_fns_local_file
54     fi
55
56     if [ -f $host.fns ]; then
57       # load host specific functions
58       build_test_used_fns_file="$host.fns"
59     else
60       build_test_used_fns_file="generic.fns"
61     fi
62     . $build_test_used_fns_file
63
64 ) >> build.log 2>&1