1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/buildtools/testwaf.sh

71 lines
1.4 KiB
Bash
Raw Normal View History

#!/bin/bash
2010-03-07 05:52:19 +03:00
set -e
set -x
2010-03-07 05:52:19 +03:00
d=$(dirname $0)
cd $d/..
PREFIX=$HOME/testprefix
2010-03-28 08:39:16 +04:00
if [ $# -gt 0 ]; then
tests="$*"
else
tests="lib/replace lib/talloc lib/tevent lib/tdb lib/ldb"
2010-03-28 08:39:16 +04:00
fi
echo "testing in dirs $tests"
for d in $tests; do
2010-03-07 05:52:19 +03:00
echo "`date`: testing $d"
pushd $d
2010-03-07 05:52:19 +03:00
rm -rf bin
type waf
waf dist
./configure -C --enable-developer --prefix=$PREFIX
time make
make install
make distcheck
2010-03-28 08:39:16 +04:00
case $d in
"lib/ldb")
ldd bin/ldbadd
2010-03-28 08:39:16 +04:00
;;
"lib/replace")
ldd bin/replace_testsuite
2010-03-28 08:39:16 +04:00
;;
"lib/talloc")
ldd bin/talloc_testsuite
2010-03-28 08:39:16 +04:00
;;
"lib/tdb")
ldd bin/tdbtool
2010-03-28 08:39:16 +04:00
;;
esac
2010-03-07 05:52:19 +03:00
popd
done
echo "testing python portability"
pushd lib/talloc
versions="python2.4 python2.5 python2.6 python3.0 python3.1"
for p in $versions; do
ret=$(which $p || echo "failed")
if [ $ret = "failed" ]; then
echo "$p not found, skipping"
continue
fi
echo "Testing $p"
$p ../../buildtools/bin/waf configure -C --enable-developer --prefix=$PREFIX
$p ../../buildtools/bin/waf build install
done
popd
echo "testing cross compiling"
pushd lib/talloc
ret=$(which arm-linux-gnueabi-gcc || echo "failed")
if [ $ret != "failed" ]; then
CC=arm-linux-gnueabi-gcc ./configure -C --prefix=$PREFIX --cross-compile --cross-execute='runarm'
make && make install
else
echo "Cross-compiler not installed, skipping test"
fi
popd