]> wimlib.net Git - wimlib/blobdiff - tests/test-imagex
Test suite: Allow out of directory build
[wimlib] / tests / test-imagex
index 9fdaf03732f219bbe0d56fd83e6699c90e34f778..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.
 
-# Assume an in-tree build.
 set -e
+srcdir=`realpath $srcdir`
 cd tests
 
 imagex() {
        echo "imagex $@"
-       ../imagex $@
+       ../imagex $@ 
 }
 
 cleanup() {
@@ -24,7 +24,7 @@ rm -rf tmp || true
 
 # 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
@@ -612,5 +612,5 @@ if imagex export dir.wim all new.wim --boot; then
 fi
 
 echo "**********************************************************"
-echo "                     All tests passed                     "
+echo "                 Basic imagex tests passed                "
 echo "**********************************************************"