s3-security: use shared SECINFO_OWNER define.
[Samba/ekacnet.git] / buildtools / testwaf.sh
bloba9a17cfdef78a5a4903465da724f2f0ab9ccf0ec
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 source4/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 ./autogen-waf.sh
25 waf dist
26 ./configure -C --enable-developer --prefix=$PREFIX
27 time make
28 make install
29 make distcheck
30 case $d in
31 "source4/lib/ldb")
32 ldd bin/ldbadd
34 "lib/replace")
35 ldd bin/replace_testsuite
37 "lib/talloc")
38 ldd bin/talloc_testsuite
40 "lib/tdb")
41 ldd bin/tdbtool
43 esac
44 popd
45 done
47 echo "testing python portability"
48 pushd lib/talloc
49 versions="python2.4 python2.5 python2.6 python3.0 python3.1"
50 for p in $versions; do
51 ret=$(which $p || echo "failed")
52 if [ $ret == "failed" ]; then
53 echo "$p not found, skipping"
54 continue
56 echo "Testing $p"
57 $p ../../buildtools/bin/waf configure -C --enable-developer --prefix=$PREFIX
58 $p ../../buildtools/bin/waf build install
59 done
60 popd
62 echo "testing cross compiling"
63 pushd lib/talloc
64 ret=$(which arm-linux-gnueabi-gcc || echo "failed")
65 if [ $ret != "failed" ]; then
66 CC=arm-linux-gnueabi-gcc ./configure -C --prefix=$PREFIX --cross-compile --cross-execute='runarm'
67 make && make install
68 else
69 echo "Cross-compiler not installed, skipping test"
71 popd