From a3c53f0d3e2ea2267ca89caf100cd41adfabd556 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 12 Nov 2012 11:20:00 -0600 Subject: [PATCH] test-imagex-*: Set $srcdir correctly --- tests/test-imagex | 3 ++- tests/test-imagex-capture_and_apply | 3 ++- tests/test-imagex-mount | 3 ++- tests/test-imagex-ntfs | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/test-imagex b/tests/test-imagex index 0d49e22e..fcbf5406 100755 --- a/tests/test-imagex +++ b/tests/test-imagex @@ -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 $@" diff --git a/tests/test-imagex-capture_and_apply b/tests/test-imagex-capture_and_apply index db3fcbe6..00090281 100755 --- a/tests/test-imagex-capture_and_apply +++ b/tests/test-imagex-capture_and_apply @@ -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 $@" diff --git a/tests/test-imagex-mount b/tests/test-imagex-mount index dcfb27d7..74cff3f7 100755 --- a/tests/test-imagex-mount +++ b/tests/test-imagex-mount @@ -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." diff --git a/tests/test-imagex-ntfs b/tests/test-imagex-ntfs index 5e9a2a3f..85812baf 100755 --- a/tests/test-imagex-ntfs +++ b/tests/test-imagex-ntfs @@ -9,8 +9,9 @@ # remain mounted. set -e -srcdir=`pwd` cd tests +srcdir="${srcdir:-.}/.." +srcdir="$(cd $srcdir; pwd)" imagex() { ../imagex $@ > /dev/null -- 2.43.0