Skip to content
Snippets Groups Projects
Commit 889d280a authored by Jérôme Charaoui's avatar Jérôme Charaoui
Browse files

tests: Mount temporary test directories in tmpfs

parent b67d7859
Branches
Tags
1 merge request!46Add a testsuite
......@@ -30,6 +30,11 @@ apt-get -qq install bats mailutils faketime
TMPDIR=$(mktemp -t -d bntest.XXXXXX)
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
for t in "$(dirname "$0")"/*.bats; do
echo "# $(basename -s .bats "$t")"
......@@ -38,6 +43,8 @@ for t in "$(dirname "$0")"/*.bats; do
done
# Clean up
rm -rf "${TMPDIR}"
umount "$TMPDIR"
umount /var/backups
rmdir "$TMPDIR"
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment