autotest: fixed sense of test for autotest directory

fixes PR#2593
This commit is contained in:
Andrew Tridgell 2015-07-23 14:36:18 +10:00
parent d7ac725a64
commit 5cc7c456a7
1 changed files with 3 additions and 1 deletions

View File

@ -282,7 +282,9 @@ if [ -n "$OVERRIDE_BUILD_TARGET" ]; then
fi
autotest="../Tools/autotest"
[ -d "$autotest" ] && {
[ -d "$autotest" ] || {
# we are not running from one of the standard vehicle directories. Use
# the location of the sim_vehicle.sh script to find the path
autotest=$(dirname $(readlink -e $0))
}
pushd $autotest/../../$VEHICLE || {