]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex
Test suite: Allow out of directory build
[wimlib] / tests / test-imagex
index 2c729cb4b468d4077e153d6f4bfc7542af3a30da..a0b88a9658e948c7f452d972622aae07ed15621a 100755 (executable)
@@ -3,8 +3,8 @@
 # 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() {
 cd tests
 
 imagex() {
@@ -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