mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-08 20:02: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
|
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user