From f37016879230b73d3f2c35fb566b1bf9ae0eab82 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Wed, 7 Sep 2016 11:35:11 +0300 Subject: [PATCH] Look for sysbench in $PWD/../sysbench in addition to other directories. --- tests/test_run.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) 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