]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex
Make different threads use different FILE*'s
[wimlib] / tests / test-imagex
index 0d49e22e63a5713868c684acf601505b0cfaab01..2601d876d49cb01efbbf760e74088074c5fd1f41 100755 (executable)
@@ -4,8 +4,9 @@
 # tests every aspect of wimlib comprehensively.
 
 set -e
-srcdir=`pwd`
 cd tests
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
 
 imagex() {
        echo "imagex $@"
@@ -18,7 +19,8 @@ imagex_info() {
 }
 
 cleanup() {
-       rm -rf dir* tmp* *.wim *.swm
+       fusermount -u tmp &> /dev/null || true
+       rm -rf dir* tmp* *.wim *.swm &> /dev/null || true
 }
 cleanup