diff options
author | Jakob Unterwurzacher | 2018-10-10 22:24:20 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2018-10-10 22:24:20 +0200 |
commit | 5a1ebdb4f7449759656a1344d3c63ba3798e2782 (patch) | |
tree | a551606ba0c53521fee1b93c71ee268682493644 /test.bash | |
parent | e4f1a32a9a109805107fc0655006f2eedf75c52c (diff) |
tests: respect TMPDIR if set
Setting TMPDIR now allows to run the tests against
a directory of your choice, making it easier to test
different filesystems.
Diffstat (limited to 'test.bash')
-rwxr-xr-x | test.bash | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,10 +1,16 @@ #!/bin/bash +if [[ -z $TMPDIR ]]; then + TMPDIR=/tmp +else + echo "Using TMPDIR=$TMPDIR" +fi + set -eu cd "$(dirname "$0")" MYNAME=$(basename "$0") -TESTDIR=/tmp/gocryptfs-test-parent +TESTDIR=$TMPDIR/gocryptfs-test-parent mkdir -p $TESTDIR LOCKFILE=$TESTDIR/$MYNAME.lock |