#!/bin/sh

set -e

pear_pkg=`ls | grep DB`

cd ${pear_pkg}
PKG_ROOT=`pwd`
cd tests

for i in *.phpt ; do
	echo Testing with ${i}
	phpunit -d include_path=".:/usr/share/php:${PKG_ROOT}" ${i}
done
