]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex
Test suite: Allow out of directory build
[wimlib] / tests / test-imagex
index 33c58dbf3048f7837fd0ae922dc1814478d8ba27..a0b88a9658e948c7f452d972622aae07ed15621a 100755 (executable)
@@ -3,13 +3,13 @@
 # This script does some sanity testing of the 'imagex' program.  It by no means
 # tests every aspect of wimlib comprehensively.
 
 # This script does some sanity testing of the 'imagex' program.  It by no means
 # tests every aspect of wimlib comprehensively.
 
-# Assume an in-tree build.
 set -e
 set -e
+srcdir=`realpath $srcdir`
 cd tests
 
 imagex() {
        echo "imagex $@"
 cd tests
 
 imagex() {
        echo "imagex $@"
-       ../imagex $@
+       ../imagex $@ 
 }
 
 cleanup() {
 }
 
 cleanup() {
@@ -24,7 +24,7 @@ rm -rf tmp || true
 
 # Make test directory
 mkdir dir
 
 # Make test directory
 mkdir dir
-cp ../src/*.c ../src/*.h dir
+cp $srcdir/src/*.c $srcdir/src/*.h dir
 mkdir dir/subdir
 echo 'hello' > dir/subdir/hello
 echo 'hello' > dir/subdir/hello2
 mkdir dir/subdir
 echo 'hello' > dir/subdir/hello
 echo 'hello' > dir/subdir/hello2