s3:smb2_write: pass fsp->fnum to init_strict_lock_struct()
[Samba/gebeck_regimport.git] / buildtools / testwaf.sh
blob127e52589103e455423ccbc24c464d43540df9cd
1 #!/bin/bash
3 set -e
4 set -x
6 d=$(dirname $0)
8 cd $d/..
9 PREFIX=$HOME/testprefix
11 if [ $# -gt 0 ]; then
12 tests="$*"
13 else
14 tests="lib/replace lib/talloc lib/tevent lib/tdb lib/ldb"
17 echo "testing in dirs $tests"
19 for d in $tests; do
20 echo "`date`: testing $d"
21 pushd $d
22 rm -rf bin
23 type waf
24 waf dist
25 ./configure -C --enable-developer --prefix=$PREFIX
26 time make
27 make install
28 make distcheck
29 case $d in
30 "lib/ldb")
31 ldd bin/ldbadd
33 "lib/replace")
34 ldd bin/replace_testsuite
36 "lib/talloc")
37 ldd bin/talloc_testsuite
39 "lib/tdb")
40 ldd bin/tdbtool
42 esac
43 popd
44 done
46 echo "testing python portability"
47 pushd lib/talloc
48 versions="python2.4 python2.5 python2.6 python3.0 python3.1"
49 for p in $versions; do
50 ret=$(which $p || echo "failed")
51 if [ $ret = "failed" ]; then
52 echo "$p not found, skipping"
53 continue
55 echo "Testing $p"
56 $p ../../buildtools/bin/waf configure -C --enable-developer --prefix=$PREFIX
57 $p ../../buildtools/bin/waf build install
58 done
59 popd
61 echo "testing cross compiling"
62 pushd lib/talloc
63 ret=$(which arm-linux-gnueabi-gcc || echo "failed")
64 if [ $ret != "failed" ]; then
65 CC=arm-linux-gnueabi-gcc ./configure -C --prefix=$PREFIX --cross-compile --cross-execute='runarm'
66 make && make install
67 else
68 echo "Cross-compiler not installed, skipping test"
70 popd