]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex
Fix sequential extraction, and include progress info
[wimlib] / tests / test-imagex
index 85c17b4d6219470d530e29ef00e01c2f8f8da8c1..0ac5fc3592672214aa6502a2fe855ae45be59b3c 100755 (executable)
@@ -1,12 +1,12 @@
-#!/bin/sh
+#!/usr/bin/env bash
 
 # This script does some sanity testing of the 'imagex' program.  It by no means
 # tests every aspect of wimlib comprehensively.
 
 set -e
-srcdir=${srcdir:-.}
-srcdir=`realpath $srcdir`
 cd tests
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
 
 imagex() {
        echo "imagex $@"
@@ -20,7 +20,7 @@ imagex_info() {
 
 cleanup() {
        fusermount -u tmp &> /dev/null || true
-       rm -rf dir* tmp* *.wim *.swm
+       rm -rf dir* tmp* *.wim *.swm &> /dev/null || true
 }
 cleanup
 
@@ -77,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
 
@@ -488,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";