mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-08 11:52:32 +01:00
tests: Allow launching tests for specific component
This commit is contained in:
parent
889d280a4e
commit
51a796e0d4
16
test/test.sh
16
test/test.sh
@ -36,11 +36,17 @@ mount -t tmpfs tmpfs "$TMPDIR"
|
||||
mount -t tmpfs tmpfs /var/backups
|
||||
|
||||
# Run actual tests
|
||||
for t in "$(dirname "$0")"/*.bats; do
|
||||
echo "# $(basename -s .bats "$t")"
|
||||
bats "$t"
|
||||
echo
|
||||
done
|
||||
if [ -z "$1" ]; then
|
||||
for t in "$(dirname "$0")"/*.bats; do
|
||||
echo "# $(basename -s .bats "$t")"
|
||||
bats "$t"
|
||||
echo
|
||||
done
|
||||
else
|
||||
echo "# $1"
|
||||
bats "$(dirname "$0")/${1}.bats"
|
||||
fi
|
||||
|
||||
|
||||
# Clean up
|
||||
umount "$TMPDIR"
|
||||
|
Loading…
Reference in New Issue
Block a user