]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex
Fix tests (again)
[wimlib] / tests / test-imagex
index dc67da2af0a8237e458d82aa52746ed5be3ff6a2..00bf0044711888ecd040889b7fd0239e3d40fa5f 100755 (executable)
@@ -4,8 +4,7 @@
 # tests every aspect of wimlib comprehensively.
 
 set -e
-srcdir=${srcdir:-.}
-srcdir=`realpath $srcdir`
+srcdir=`pwd`
 cd tests
 
 imagex() {
@@ -21,9 +20,7 @@ imagex_info() {
 cleanup() {
        rm -rf dir* tmp* *.wim *.swm
 }
-trap cleanup exit
-fusermount -u tmp || true
-rm -rf tmp || true
+cleanup
 
 # Make test directory
 mkdir dir
@@ -78,7 +75,7 @@ for comp_type in None LZX XPRESS; do
        if ! test "`readlink tmp/subdir/rel_symlink`" = "hello"; then
                error "Symlink target not correct"
        fi
-       
+
        rm -rf dir.wim tmp
 done
 
@@ -489,7 +486,7 @@ fi
 # We try with 5 different combinations of compression types to make sure we go
 # through all paths in the resource-handling code.
 for i in `seq 1 3`; do
-       case $i in 
+       case $i in
        1)
                cflag1="--compress=none";
                cflag2="--compress=none";
@@ -528,3 +525,4 @@ done
 echo "**********************************************************"
 echo "                 Basic imagex tests passed                "
 echo "**********************************************************"
+cleanup