2011-01-14 10:18:25 +03:00
#!/bin/bash
2010-03-07 05:52:19 +03:00
2010-04-19 07:42:53 +04: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
2011-07-05 04:01:32 +04:00
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 "
2010-04-19 07:42:53 +04:00
pushd $d
2010-03-07 05:52:19 +03:00
rm -rf bin
type waf
2010-04-19 07:42:53 +04:00
waf dist
2010-05-05 16:11:56 +04:00
./configure -C --enable-developer --prefix= $PREFIX
time make
make install
make distcheck
2010-03-28 08:39:16 +04:00
case $d in
2011-07-05 04:01:32 +04:00
"lib/ldb" )
2010-04-19 07:42:53 +04:00
ldd bin/ldbadd
2010-03-28 08:39:16 +04:00
; ;
"lib/replace" )
2010-04-19 07:42:53 +04:00
ldd bin/replace_testsuite
2010-03-28 08:39:16 +04:00
; ;
"lib/talloc" )
2010-04-19 07:42:53 +04:00
ldd bin/talloc_testsuite
2010-03-28 08:39:16 +04:00
; ;
"lib/tdb" )
2010-04-19 07:42:53 +04:00
ldd bin/tdbtool
2010-03-28 08:39:16 +04:00
; ;
esac
2010-03-07 05:52:19 +03:00
popd
done
2010-04-19 07:42:53 +04:00
echo "testing python portability"
pushd lib/talloc
2010-05-04 13:58:28 +04:00
versions = "python2.4 python2.5 python2.6 python3.0 python3.1"
2010-04-19 07:42:53 +04:00
for p in $versions ; do
2010-05-11 16:24:47 +04:00
ret = $( which $p || echo "failed" )
2010-12-02 12:14:07 +03:00
if [ $ret = "failed" ] ; then
2010-05-11 16:24:47 +04:00
echo " $p not found, skipping "
continue
fi
2010-04-19 07:42:53 +04:00
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
2010-05-11 16:24:47 +04:00
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
2010-04-19 07:42:53 +04:00
popd