diff --git a/tests/test_run.sh b/tests/test_run.sh index c1ed01d..3d86252 100755 --- a/tests/test_run.sh +++ b/tests/test_run.sh @@ -24,15 +24,19 @@ testroot=$(cd $(dirname "$0"); echo $PWD) if [ -x "$testroot/../sysbench/sysbench" ] then # Invoked from a source directory? - export PATH="$testroot/../sysbench:$PATH" + PATH="$testroot/../sysbench:$PATH" elif [ -x "$testroot/../bin" ] then # Invoked from a standalone install root directory? - export PATH="$testroot/../bin:$PATH" + PATH="$testroot/../bin:$PATH" elif [ -x "$testroot/../../../bin/sysbench" ] then # Invoked from a system-wide install (e.g. /usr/local/share/sysbench/tests)? - export PATH="$testroot/../../../bin:$PATH" + PATH="$testroot/../../../bin:$PATH" +elif [ -x "$PWD/../sysbench/sysbench" ] +then + # Invoked from the build directory by 'make distcheck'? + PATH="$PWD/../sysbench:$PATH" fi if ! which sysbench >/dev/null 2>&1 @@ -41,6 +45,7 @@ then echo "testroot=$testroot" echo "PWD=$PWD" ls -l $PWD + ls -l $PWD/../sysbench ls -l $testroot ls -l $testroot/.. ls -l $testroot/../sysbench