build: enable python 3.0 and 3.1 in testwaf.sh
[samba.git] / buildtools / testwaf.sh
1 #!/bin/bash
2
3 set -e
4 set -x
5
6 d=$(dirname $0)
7
8 cd $d/..
9 PREFIX=$HOME/testprefix
10
11 if [ $# -gt 0 ]; then
12     tests="$*"
13 else
14     tests="lib/replace lib/talloc lib/tevent lib/tdb source4/lib/ldb"
15 fi
16
17 echo "testing in dirs $tests"
18
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     waf configure -C --enable-developer --prefix=$PREFIX
26     time waf build
27     time waf build
28     waf install
29     waf distcheck
30     case $d in
31         "source4/lib/ldb")
32             ldd bin/ldbadd
33             ;;
34         "lib/replace")
35             ldd bin/replace_testsuite
36             ;;
37         "lib/talloc")
38             ldd bin/talloc_testsuite
39             ;;
40         "lib/tdb")
41             ldd bin/tdbtool
42             ;;
43     esac
44     popd
45 done
46
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     echo "Testing $p"
52     $p ../../buildtools/bin/waf configure -C --enable-developer --prefix=$PREFIX
53     $p ../../buildtools/bin/waf build install
54 done
55 popd
56
57 echo "testing cross compiling"
58 pushd lib/talloc
59 CC=arm-linux-gnueabi-gcc ./configure -C --prefix=$PREFIX  --cross-compile --cross-execute='runarm'
60 make && make install
61 popd