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