test-imagex-*: Set $srcdir correctly
authorEric Biggers <ebiggers3@gmail.com>
Mon, 12 Nov 2012 17:20:00 +0000 (11:20 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Mon, 12 Nov 2012 17:20:00 +0000 (11:20 -0600)
tests/test-imagex
tests/test-imagex-capture_and_apply
tests/test-imagex-mount
tests/test-imagex-ntfs

index 0d49e22e63a5713868c684acf601505b0cfaab01..fcbf5406fb2b4a2cc4eb5fcb3726d033db5da233 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 $@"
index db3fcbe69e501d81fc595672907bc696c50890bb..00090281f378ab1b544c1191da182505293628f0 100755 (executable)
@@ -9,8 +9,9 @@
 # Also, test if the capture configuration file works correctly.
 
 set -e
-srcdir=`pwd`
 cd tests
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
 
 imagex() {
        echo "imagex $@"
index dcfb27d758488e5269438762ee6ad2a4fc15ea94..74cff3f7661adcb916a9a83ee46753ce3633a96b 100755 (executable)
@@ -3,8 +3,9 @@
 # Test WIM mounting
 
 set -e
-srcdir=`pwd`
 cd tests
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
 
 if [ ! -r /dev/fuse ]; then
        echo "WARNING: /dev/fuse is not readable."
index 5e9a2a3f365ccec392cee1cef9fc3b4d119082eb..85812baf022dad29c897e5c89fed840f73e02ebe 100755 (executable)
@@ -9,8 +9,9 @@
 # remain mounted.
 
 set -e
-srcdir=`pwd`
 cd tests
+srcdir="${srcdir:-.}/.."
+srcdir="$(cd $srcdir; pwd)"
 
 imagex() {
        ../imagex $@ > /dev/null