mirror of
https://0xacab.org/liberate/backupninja.git
synced 2024-11-08 20:02:32 +01:00
tests: Mount temporary test directories in tmpfs
This commit is contained in:
parent
b67d785937
commit
889d280a4e
@ -30,6 +30,11 @@ apt-get -qq install bats mailutils faketime
|
|||||||
TMPDIR=$(mktemp -t -d bntest.XXXXXX)
|
TMPDIR=$(mktemp -t -d bntest.XXXXXX)
|
||||||
export TMPDIR
|
export TMPDIR
|
||||||
|
|
||||||
|
# Mount temporary directories in tmpfs
|
||||||
|
# this should speed up the tests a little bit
|
||||||
|
mount -t tmpfs tmpfs "$TMPDIR"
|
||||||
|
mount -t tmpfs tmpfs /var/backups
|
||||||
|
|
||||||
# Run actual tests
|
# Run actual tests
|
||||||
for t in "$(dirname "$0")"/*.bats; do
|
for t in "$(dirname "$0")"/*.bats; do
|
||||||
echo "# $(basename -s .bats "$t")"
|
echo "# $(basename -s .bats "$t")"
|
||||||
@ -38,6 +43,8 @@ for t in "$(dirname "$0")"/*.bats; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Clean up
|
# Clean up
|
||||||
rm -rf "${TMPDIR}"
|
umount "$TMPDIR"
|
||||||
|
umount /var/backups
|
||||||
|
rmdir "$TMPDIR"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user