source: vendor/current/buildtools/testwaf.sh@ 740

Last change on this file since 740 was 740, checked in by Silvan Scherrer, 12 years ago

Samba Server: update vendor to 3.6.0

File size: 1.5 KB
Line 
1#!/bin/bash
2
3set -e
4set -x
5
6d=$(dirname $0)
7
8cd $d/..
9PREFIX=$HOME/testprefix
10
11if [ $# -gt 0 ]; then
12 tests="$*"
13else
14 tests="lib/replace lib/talloc lib/tevent lib/tdb source4/lib/ldb"
15fi
16
17echo "testing in dirs $tests"
18
19for 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 "source4/lib/ldb")
31 ldd bin/ldbadd
32 ;;
33 "lib/replace")
34 ldd bin/replace_testsuite
35 ;;
36 "lib/talloc")
37 ldd bin/talloc_testsuite
38 ;;
39 "lib/tdb")
40 ldd bin/tdbtool
41 ;;
42 esac
43 popd
44done
45
46echo "testing python portability"
47pushd lib/talloc
48versions="python2.4 python2.5 python2.6 python3.0 python3.1"
49for p in $versions; do
50 ret=$(which $p || echo "failed")
51 if [ $ret = "failed" ]; then
52 echo "$p not found, skipping"
53 continue
54 fi
55 echo "Testing $p"
56 $p ../../buildtools/bin/waf configure -C --enable-developer --prefix=$PREFIX
57 $p ../../buildtools/bin/waf build install
58done
59popd
60
61echo "testing cross compiling"
62pushd lib/talloc
63ret=$(which arm-linux-gnueabi-gcc || echo "failed")
64if [ $ret != "failed" ]; then
65 CC=arm-linux-gnueabi-gcc ./configure -C --prefix=$PREFIX --cross-compile --cross-execute='runarm'
66 make && make install
67else
68 echo "Cross-compiler not installed, skipping test"
69fi
70popd
Note: See TracBrowser for help on using the repository browser.