X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=tests%2Ftest-imagex;h=2a4f7ec14f557a370fb5515888dece5eccd9352b;hb=d0e7f039e4ab206b9fd973c983e3fb841fcd2bf2;hp=dc67da2af0a8237e458d82aa52746ed5be3ff6a2;hpb=54193a504d8dcf1e2dfae727c76cd1b44884518b;p=wimlib diff --git a/tests/test-imagex b/tests/test-imagex index dc67da2a..2a4f7ec1 100755 --- a/tests/test-imagex +++ b/tests/test-imagex @@ -19,11 +19,10 @@ imagex_info() { } cleanup() { + fusermount -u tmp &> /dev/null || true 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 +77,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 +488,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 +527,4 @@ done echo "**********************************************************" echo " Basic imagex tests passed " echo "**********************************************************" +cleanup