tests: Allow launching tests for specific component

This commit is contained in:
Jerome Charaoui 2018-07-13 10:25:42 -04:00
parent 889d280a4e
commit 51a796e0d4

View File

@ -36,11 +36,17 @@ mount -t tmpfs tmpfs "$TMPDIR"
mount -t tmpfs tmpfs /var/backups mount -t tmpfs tmpfs /var/backups
# Run actual tests # Run actual tests
for t in "$(dirname "$0")"/*.bats; do if [ -z "$1" ]; then
echo "# $(basename -s .bats "$t")" for t in "$(dirname "$0")"/*.bats; do
bats "$t" echo "# $(basename -s .bats "$t")"
echo bats "$t"
done echo
done
else
echo "# $1"
bats "$(dirname "$0")/${1}.bats"
fi
# Clean up # Clean up
umount "$TMPDIR" umount "$TMPDIR"