2 # example file to be used with --hookdir
4 # run tests. Current directory is top of source-code.
6 # 2005, 2007 Junichi Uekawa
10 echo "Installing the prerequisites"
11 for PKG in $(ls /tmp/buildd/*.deb | sed -e's,.*/,,;s,_.*,,' ); do
12 apt-get install -y --force-yes "$PKG" || true
13 apt-get remove -y "$PKG" || true
15 # ignore the failures since they are not the prime interest
17 dpkg -i /tmp/buildd/*.deb
19 if chmod a+x /tmp/buildd/*/debian/pbuilder-test/*; then
22 echo "W: no pbuilder-test script found, skipping"
31 # The current directory is the top of the source-tree.
32 cd /tmp/buildd/*/debian/..
34 for SCRIPT in $(run-parts --test /tmp/buildd/*/debian/pbuilder-test) ; do
35 echo "--- BEGIN test: ${SCRIPT##*/}"
41 FAIL[${#FAIL[@]}]="${SCRIPT##*/}"
44 echo "--- END test: ${SCRIPT##*/}"
49 echo "=== $SUCCESS out of $COUNT tests passed"
50 echo "${FAIL[@]/#/ failed }"
51 echo "-- end of testsuite."