Improve formatting in web output.
[amitay/build-farm.git] / m104.fns
1 # Build control file for Stratus VOS
2 # Contact: Paul.Green at stratus.com (paulg at samba.org)
3
4 export CC="gcc"
5 export CFLAGS=""
6 export CPPFLAGS="-D_POSIX_C_SOURCE=200112L -D_SYSV -D_VOS_EXTENDED_NAMES"
7 export MAXTIME=14400
8 export TIMELIMIT_FLAGS="-D_POSIX_C_SOURCE=200112L"
9 export noclean="yes"
10
11 # avoid vos bug bin-340
12 export LDFLAGS="-specs=/s/pg/bf/posix/command_library/pg.specs"
13
14 # avoid vos bug ac-79
15 export ac_cv_prog_cc_ccache_c_o=yes
16
17 # ensure vos pathnames do not contain % or # characters
18 # workaround until vos suggestion posix-1014 is implemented
19 test_root=/build_farm
20
21 ############################
22 # configure the tree
23 # VOS: modified to print message and invoke bash explicitly
24 action_configure() {
25         echo " "
26         echo "NOTE: VOS has some restrictions that cause build or test"
27         echo "      failures. I am working to resolve these."
28         echo "      1. VOS does not implement Unix-domain sockets."
29         echo "      2. VOS is missing some POSIX or Unix functions. I am"
30         echo "         supplying private versions to avoid build errors."
31         echo "      3. VOS implements the POSIX-style shared memory API,"
32         echo "         not the System V-style shared memory API."
33         echo "      4. VOS seems to have some bugs in POSIX file locking."
34         echo " "
35         echo "The following differences from standard POSIX systems are"
36         echo "essentially unfixable:"
37         echo "      5. VOS has symbolic links not hard links. link() is a dummy."
38         echo "      6. VOS has a 256-character limit on pathnames."
39         echo "      7. VOS does not implement shared libraries (no gcc -shared)."
40         echo " "
41         echo "Please contact Paul dot Green at stratus.com for further information."
42         echo " "
43         if [ ! -x $srcdir/configure ]; then
44             ls -l $srcdir/configure
45             echo "$srcdir/configure is missing"
46             cstatus=255
47             echo "CONFIGURE STATUS: $cstatus"
48             return $cstatus;
49         fi
50         echo "CPPFLAGS=$CPPFLAGS"
51         echo "CFLAGS=$CFLAGS"
52         echo configure options: $config_and_prefix
53         echo CC="$CCACHE $compiler" $srcdir/configure $config_and_prefix
54         CC="$CCACHE $compiler"
55         export CC
56 # VOS: explicitly invoke bash here.
57         ./timelimit $MAXTIME bash $srcdir/configure $config_and_prefix
58         cstatus=$?
59         if [ x"$cstatus" != x"0" ]; then
60                 if [ -f config.log ]; then
61                         echo "contents of config.log:"
62                         cat config.log
63                 fi
64         fi
65         echo "CONFIGURE STATUS: $cstatus"
66         return $cstatus;
67 }
68
69 ############################
70 # VOS: apply any pending patches.
71 apply_patches() {
72         tree=$1
73         if [ -f $tree.patch.txt ]; then
74                 cd $tree
75              echo "Patching $tree with local changes."
76                 ../patch -u -b -p 2 -i ../$tree.patch.txt
77                 cd ..
78         fi
79 }
80
81 ############################
82 # VOS: fake up df command, since VOS doesn't have it.
83 function df {
84         display_disk_info;
85 }
86
87 ############################
88 # fetch the latest copy of the tree
89 # VOS: apply local patches to the tree, skip files w/long names.
90 fetch_tree() {
91         if [ "$norsync" = "yes" ]; then
92                 echo "skipping tree transfer"
93         else
94                 fetchtree=$1
95                 if rsync --exclude=autom4te.cache/ --exclude=.svn/ --exclude=.git/ --delete-excluded -q --partial --timeout=200 -crlpz --delete --ignore-errors \
96                         samba.org::ftp/unpacked/$fetchtree/ $test_root/$fetchtree; then
97                         echo "transferred $fetchtree OK"
98                 else
99                         echo "transfer of $fetchtree failed code $?"
100                         return 1
101                 fi
102         fi
103         apply_patches "$fetchtree"
104         return 0
105 }
106
107 ############################
108 # VOS: fake up mount command, since VOS doesn't have it.
109 mount() {
110      return 0;
111 }
112
113 ############################
114 # VOS: fake up ulimit command, since VOS doesn't have it.
115 ulimit() {
116      return 0;
117 }
118
119 ############################
120 # VOS: fake up vmstat command, since VOS doesn't have it.
121 vmstat() {
122      return 0;
123 }
124
125 per_run_hook
126
127 . common.fns
128
129 test_tree samba_3_current source gcc
130 test_tree samba_3_next source gcc
131 test_tree samba_3_master source gcc