summaryrefslogtreecommitdiff
path: root/buildtools/testwaf.sh
blob: 3be5ef96a976db5c632b85f94d8218f5b2e9e077 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

d=$(dirname $0)

cd $d/..
PREFIX=$HOME/testprefix

if [ $# -gt 0 ]; then
    tests="$*"
else
    tests="lib/replace lib/talloc lib/tevent lib/tdb source4/lib/ldb"
fi

echo "testing in dirs $tests"

for d in $tests; do
    echo "`date`: testing $d"
    pushd $d || exit 1
    rm -rf bin
    type waf
    waf configure -C --enable-developer --prefix=$PREFIX || exit 1
    time waf build || exit 1
    time waf build || exit 1
    waf install || exit 1
    case $d in
	"source4/lib/ldb")
	    ldd bin/ldbadd || exit 1
	    ;;
	"lib/replace")
	    ldd bin/replace_testsuite || exit 1
	    ;;
	"lib/talloc")
	    ldd bin/talloc_testsuite || exit 1
	    ;;
	"lib/tdb")
	    ldd bin/tdbtool || exit 1
	    ;;
    esac
    popd
done