#!/bin/sh

set -x

autoreconf -v -i -f

./configure

tests="$@"

failed=
for t in $tests ; do
	make test/${t} SOURCEDIR=/non-existent/ || failed="$failed $t"
done

if [ -z "$failed" ]; then
	echo "All tests passed!"
	exit 0
else
	echo "Tests failed: $failed"
	exit 1
fi
